AbstractMatrixZonotope

LazySets.MatrixZonotopeModule.AbstractMatrixZonotopeType
AbstractMatrixZonotope{N}

Abstract supertype for all matrix zonotope representations.

Every concrete AbstractSparsePolynomialZonotope must define the following functions:

  • size(::AbstractSparsePolynomialZonotope, [dim]) – return the size of the matrix zonotope
source

This interface requires to implement the following functions:

Base.sizeMethod
size(::AbstractMatrixZonotope, [dim])

Return a tuple containing the dimensions of a matrix zonotope. Optionally you can specify a dimension to just get the length of that dimension.

source

MatrixZonotope

LazySets.MatrixZonotopeModule.MatrixZonotopeType
MatrixZonotope{N, MN<:AbstractMatrix{N}}(A0::MN, Ai::Vector{MN},
                idx::Vector{Int}=collect(1:length(Aᵢ))) <: AbstractMatrixZonotope{N}

Type that represents a matrix zonotope.

Fields

  • A0 – center of the matrix zonotope
  • Ai – vector of matrices; each matrix is a generator of the matrix zonotope
  • idx – identifier vector of positive integers for each factor

Notes

Mathematically a matrix zonotope is defined as the set of matrices

\[\mathcal{A} = \left\{A ∈ ℝ^{n×m} : A^{(0)} + ∑_{i=1}^p ξ_i A^{(i)},~~ ξ_i ∈ [-1, 1]~~ ∀ i = 1,…, p \right\},\]

It can be written in shorthand notation as ``\mathcal{A} = \braket{A^{(0)},A^{(1)}, ..., A^{(p)} }_{MZ}. Matrix zonotopes were introduced in Althoff et al. [ALK11].

Examples

julia> A0 = [2.0 1.0; -1.0 0.0];

julia> Ai = [[1.0 -1.0; 0.0 -1.0], [0.0 2.0; -1.0 1.0]];

julia> idx = [1, 3];

julia> MZ = MatrixZonotope(A0, Ai, idx)
MatrixZonotope{Float64, Matrix{Float64}}([2.0 1.0; -1.0 0.0], [[1.0 -1.0; 0.0 -1.0], [0.0 2.0; -1.0 1.0]], [1, 3])
source

Operations

LazySets.API.centerMethod
center(MZ::MatrixZonotope)

Return the center matrix of a matrix zonotope.

Input

  • MZ – matrix zonotope

Output

The center matrix of MZ.

source
LazySets.generatorsMethod
generators(MZ::MatrixZonotope)

Return the generators of a matrix zonotope.

Input

  • MZ – matrix zonotope

Output

The generators of MZ.

source
Base.transposeMethod
transpose(MZ::MatrixZonotope)

Return the transpose of a matrix zonotope.

Notes

The transpose of a matrix zonotope is defined as:

\[ \mathcal{A}ᵀ = \braket{(A^{(0)})ᵀ,(A^{(1)})ᵀ, \dots, (A^{(p)})ᵀ }\]

source
LazySets.ngensMethod
ngens(MZ::MatrixZonotope)

Return the number of generators of a matrix zonotope.

Input

  • MZ – matrix zonotope

Output

An integer representing the number of generators.

source
Base.randMethod

Extended help

rand(::Type{MatrixZonotope}; [N]::Type{<:Real}=Float64, [dim]::Tuple{Int,Int}=(2, 2),
     [rng]::AbstractRNG=GLOBAL_RNG, [seed]::Union{Int, Nothing}=nothing,
     [num_generators]::Int=-1)

Algorithm

All numbers are normally distributed with mean 0 and standard deviation 1.

The number of generators can be controlled with the argument num_generators. For a negative value we choose a random number in the range 1:maximum(dim).

source
LinearAlgebra.normMethod
norm(MZ::MatrixZonotope, p::Real=Inf)

Compute the operator $p$-norm of a matrix zonotope.

Input

  • MZ – matrix zonotope
  • p – (optional, default: Inf) norm

Output

A real number representing the norm.

Notes

For a matrix zonotope \mathcal{A}, itsp`-norm is defined as

\[‖\mathcal{A}‖_p = \sup_{A \in \mathcal{A}} ‖A‖_p\]

where $‖A‖_p$ denotes the induced matrix norm.

source
LazySets.API.linear_mapMethod
linear_map(M::AbstractMatrix, MZ::MatrixZonotope)

Apply a linear transformation to a matrix zonotope from the left.

Input

  • M – a linear map / matrix
  • MZ – a matrix zonotope

Output

A matrix zonotope with transformed center and generators

source
LazySets.API.linear_mapMethod
linear_map(M::AbstractMatrix, MZ::MatrixZonotope)

Apply a linear transformation to a matrix zonotope from the right.

Input

  • M – a linear map / matrix
  • MZ – a matrix zonotope

Output

A matrix zonotope with transformed center and generators

source
LazySets.MatrixZonotopeModule._rowwise_zonotope_normFunction
_rowwise_zonotope_norm(MZ::MatrixZonotope{N}, norm_fn::Function) where {N}

Compute the induced matrix norm of a matrix zonotope by reducing to row-wise zonotope $ℓ₁$ norms.

Input

  • MZ – matrix zonotope
  • norm_fn – function to approximate the zonotope $ℓ₁$ norm

Output

The induced matrix $p$-norm of the matrix zonotope.

Algorithm

For each row index $i = 1, ..., n$, we construct a zonotope with center given by the $i$-th row of the center matrix and as generators the $i$-th row of each generator matrix. The norm of this zonotope is then computed using the provided norm_fn. The final result is the maximum of these $n$ row-wise zonotope norms.

source

Undocumented implementations:

Undocumented implementations:

MatrixZonotopeProduct

LazySets.MatrixZonotopeModule.MatrixZonotopeProductType
MatrixZonotopeProduct{N}(factors::Vector{<:MatrixZonotope{N}}) <: AbstractMatrixZonotope{N}

Represents the product of multiple matrix zonotopes.

Fields

  • factors – a vector of matrix zonotopes [A1, A2, ..., An]

Notes

Mathematically, this represents the set:

\[\mathcal{C} = \{ A_1 A_2 \dots A_n ~|~ A_i \in \mathcal{A}_i \}\]

source

Operations

Undocumented implementations:

MatrixZonotopeExp

LazySets.MatrixZonotopeModule.MatrixZonotopeExpType
MatrixZonotopeExp{N}(MZ::AbstractMatrixZonotope{N}) <: AbstractMatrixZonotope{N}

Represents the matrix exponential of a matrix zonotope.

Fields

  • M – a square matrix zonotope representing the exponent.

Notes

Mathematically, this represents the set:

\[\mathcal{C} = \{ \exp(M) ~|~ M \in \mathcal{M} \}\]

source

Operations

Undocumented implementations: