ZonotopeMD
LazySets.ZonotopeMDModule.ZonotopeMD
— TypeZonotopeMD{N,VN<:AbstractVector{N},MN<:AbstractMatrix{N},DN<:AbstractVector{N}}
<: AbstractZonotope{N}
Type that represents a structured zonotope.
Fields
center
– center of the zonotopeM
– matrix of general (non-axis-aligned) generatorsd
– vector representing a diagonal matrix of axis-aligned generators
Notes
A structured zonotope is defined as the set
\[Z = \left\{ x ∈ ℝ^n : x = c + Mξ + dIη, ~~ ξ ∈ [-1, 1]^m, ~~ η ∈ [-1, 1]^n \right\},\]
where $M ∈ ℝ^{n×m}$ is a matrix of general generators with $m = n (k - 1)$ and $d ∈ ℝⁿ$ is a vector of axis-aligned generators. Equivalently, this can be seen as a zonotope with generator matrix $[M D]$, where $D$ is the diagonal matrix formed from the vector $d$.
A ZonotopeMD
can be constructed in two ways: by passing $M$ and a vector $d$ separately or by passing the full generator matrix $[M D]$.
Examples
Constructing a structured zonotope from a center, general generator matrix $M$, and diagonal vector $d$:
julia> c = [0.0, 0.0];
julia> M = [1.0 2.0; 3.0 1.0];
julia> d = [0.1, 0.2];
julia> Z = ZonotopeMD(c, M, d)
ZonotopeMD{Float64, Vector{Float64}, Matrix{Float64}, Vector{Float64}}([0.0, 0.0], [1.0 2.0; 3.0 1.0], [0.1, 0.2])
julia> center(Z)
2-element Vector{Float64}:
0.0
0.0
julia> genmat(Z)
2×4 SparseArrays.SparseMatrixCSC{Float64, Int64} with 6 stored entries:
1.0 2.0 0.1 ⋅
3.0 1.0 ⋅ 0.2
Constructing the same zonotope by passing the full generator matrix $[M D]$ directly:
julia> G = [1.0 2.0 0.1 0.0;
3.0 1.0 0.0 0.2];
julia> Z2 = ZonotopeMD(c, G)
ZonotopeMD{Float64, Vector{Float64}, Matrix{Float64}, Vector{Float64}}([0.0, 0.0], [1.0 2.0; 3.0 1.0], [0.1, 0.2])
The generator matrix returned by genmat
is the concatenation $[M D]$ represented as a sparse matrix.
julia> genmat(Z2) == G
true
One can also convert back to a standard Zonotope
if needed:
julia> Zstd = convert(Zonotope, Z)
Zonotope{Float64, Vector{Float64}, SparseArrays.SparseMatrixCSC{Float64, Int64}}([0.0, 0.0], sparse([1, 2, 1, 2, 1, 2], [1, 1, 2, 2, 3, 4], [1.0, 3.0, 2.0, 1.0, 0.1, 0.2], 2, 4))
Operations
LazySets.genmat
— Methodgenmat(Z::ZonotopeMD)
Return the generator matrix of a structured zonotope.
Input
Z
– structured zonotope
Output
A matrix where each column represents one generator of the zonotope Z
.
LazySets.API.cartesian_product
— Methodcartesian_product(Z1::ZonotopeMD, Z2::ZonotopeMD)
Return the Cartesian product of two structured zonotopes.
Input
Z1
– structured zonotopeZ2
– structured zonotope
Output
A new ZonotopeMD
representing the Cartesian product Z1 × Z2
.
Undocumented implementations:
Inherited from LazySet
:
area
chebyshev_center_radius
complement
concretize
constraints
convex_hull
copy(::Type{LazySet})
diameter
eltype
eltype
isoperation
norm
polyhedron
radius
rationalize
rectify
singleton_list
tosimplehrep
triangulate
triangulate_faces
vertices
affine_map
exponential_map
is_interior_point
sample
translate
convex_hull
exact_sum
≈
==
isequivalent
⊂
Inherited from ConvexSet
:
Inherited from AbstractPolyhedron
:
Inherited from AbstractPolytope
:
Inherited from AbstractCentrallySymmetricPolytope
:
Inherited from AbstractZonotope
: