Centrally symmetric sets (AbstractCentrallySymmetric)
Centrally symmetric convex sets such as balls of different norms are characterized by a center. Note that there is a special interface combination Centrally symmetric polytope.
LazySets.AbstractCentrallySymmetric — TypeAbstractCentrallySymmetric{N} <: ConvexSet{N}Abstract type for centrally symmetric compact convex sets.
Notes
Every concrete AbstractCentrallySymmetric must define the following function:
center(::AbstractCentrallySymmetric)– return the center point
The subtypes of AbstractCentrallySymmetric:
julia> subtypes(AbstractCentrallySymmetric)
2-element Vector{Any}:
AbstractBallp
EllipsoidThis interface requires to implement the following function:
LazySets.API.center — Methodcenter(X::LazySet)Compute the center of a centrally symmetric set.
Input
X– centrally symmetric set
Output
A vector with the center, or midpoint, of X.
This interface defines the following functions:
LazySets.API.an_element — Methodan_element(X::LazySet)Return some element of a nonempty set.
Input
X– set
Output
An element of X unless X is empty.
LazySets.API.an_element — MethodExtended help
an_element(S::AbstractCentrallySymmetric)Output
The center of the centrally symmetric set.
Base.extrema — Methodextrema(X::LazySet)Compute the lowest and highest coordinate of a set in each dimension.
Input
X– set
Output
Two vectors with the lowest and highest coordinates of X in each dimension.
Notes
See also extrema(X::LazySet, i::Int).
The result is equivalent to (low(X), high(X)), but sometimes it can be computed more efficiently.
The resulting points are the lowest and highest corners of the box approximation, so they are not necessarily contained in X.
Algorithm
The default implementation computes the extrema via low and high.
Base.extrema — MethodExtended help
extrema(S::AbstractCentrallySymmetric)Notes
The result is equivalent to (low(S), high(S)).
Algorithm
We compute high(S) and then compute the lowest coordinates with the help of center(S) (which is assumed to be cheaper to obtain).
Base.extrema — Methodextrema(X::LazySet, i::Int)Compute the lowest and highest coordinate of a set in a given dimension.
Input
X– seti– dimension
Output
Two real numbers representing the lowest and highest coordinate of the set in the given dimension.
Notes
The result is equivalent to (low(X, i), high(X, i)), but sometimes it can be computed more efficiently.
The resulting values are the lower and upper ends of the projection.
Base.extrema — MethodExtended help
extrema(S::AbstractCentrallySymmetric, i::Int)Notes
The result is equivalent to (low(S, i), high(S, i)).
Algorithm
We compute high(S, i) and then compute the lowest coordinates with the help of center(S, i) (which is assumed to be cheaper to obtain).
LazySets.API.isuniversal — Methodisuniversal(X::LazySet, witness::Bool=false)Check whether a set is universal.
Input
X– setwitness– (optional, default:false) compute a witness if activated
Output
- If the
witnessoption is deactivated:trueiff $X = ℝ^n$ - If the
witnessoption is activated:(true, [])iff $X = ℝ^n$(false, v)iff $X ≠ ℝ^n$ for some $v ∉ X$
LazySets.API.isuniversal — FunctionExtended help
isuniversal(S::AbstractCentrallySymmetric, [witness]::Bool=false)Algorithm
A witness is obtained by computing the support vector in direction d = [1, 0, …, 0] and adding d on top.
Undocumented implementations:
Inherited from LazySet:
areachebyshev_center_radiuscomplementconcretizeconstraintsconvex_hullcopy(::Type{LazySet})diametereltypeeltypehighhighisoperationispolyhedralispolyhedraltypeispolytopiclowlownormpolyhedronradiusrationalizerectifyreflectsingleton_listtosimplehreptriangulatetriangulate_facesverticesaffine_mapexponential_mapis_interior_pointlinear_mapprojectsamplescaleρtranslatecartesian_productconvex_hullexact_sumisapproxisdisjoint==isequivalent⊂⊆minkowski_differenceminkowski_sum
Inherited from ConvexSet:
Convenience functions
LazySets.○ — Method○(c, a)Convenience constructor of Ellipsoids or Ball2s depending on the type of a.
Input
c– centera– additional parameter (either a shape matrix forEllipsoidor a radius forBall2)
Output
A Ellipsoids or Ball2s depending on the type of a.
Notes
"○" can be typed by \bigcirc<tab>.