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.AbstractCentrallySymmetricType
AbstractCentrallySymmetric{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
 Ellipsoid
source

This interface requires to implement the following function:

LazySets.API.centerMethod
center(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.

source

This interface defines the following functions:

LazySets.API.an_elementMethod
an_element(X::LazySet)

Return some element of a nonempty set.

Input

  • X – set

Output

An element of X unless X is empty.

source
Base.extremaMethod
extrema(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.

source
Base.extremaMethod

Extended 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).

source
Base.extremaMethod
extrema(X::LazySet, i::Int)

Compute the lowest and highest coordinate of a set in a given dimension.

Input

  • X – set
  • i – 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.

source
Base.extremaMethod

Extended 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).

source
LazySets.API.isuniversalMethod
isuniversal(X::LazySet, witness::Bool=false)

Check whether a set is universal.

Input

  • X – set
  • witness – (optional, default: false) compute a witness if activated

Output

  • If the witness option is deactivated: true iff $X = ℝ^n$
  • If the witness option is activated:
    • (true, []) iff $X = ℝ^n$
    • (false, v) iff $X ≠ ℝ^n$ for some $v ∉ X$
source
LazySets.API.isuniversalFunction

Extended 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.

source

Undocumented implementations:

Inherited from LazySet:

Inherited from ConvexSet:

Implementations