Centrally symmetric sets (AbstractCentrallySymmetric)

Centrally symmetric 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 functions:

  • center(::AbstractCentrallySymmetric) – return the center point
  • center(::AbstractCentrallySymmetric, i::Int) – return the center point at index i

The subtypes of AbstractCentrallySymmetric:

julia> subtypes(AbstractCentrallySymmetric)
2-element Vector{Any}:
 AbstractBallp
 Ellipsoid
source

This interface defines the following functions:

LazySets.dimMethod
dim(S::AbstractCentrallySymmetric)

Return the ambient dimension of a centrally symmetric set.

Input

  • S – centrally symmetric set

Output

The ambient dimension of the set.

source
LazySets.isboundedMethod
isbounded(S::AbstractCentrallySymmetric)

Check whether a centrally symmetric set is bounded.

Input

  • S – centrally symmetric set

Output

true (since a set with a unique center must be bounded).

source
LazySets.isuniversalMethod
isuniversal(S::AbstractCentrallySymmetric{N},
            [witness]::Bool=false) where {N}

Check whether a centrally symmetric set is universal.

Input

  • S – centrally symmetric set
  • witness – (optional, default: false) compute a witness if activated

Output

  • If witness option is deactivated: false
  • If witness option is activated: (false, v) where $v ∉ S$

Algorithm

Centrally symmetric sets are bounded. A witness is obtained by computing the support vector in direction d = [1, 0, …, 0] and adding d on top.

source
LazySets.an_elementMethod
an_element(S::AbstractCentrallySymmetric)

Return some element of a centrally symmetric set.

Input

  • S – centrally symmetric set

Output

The center of the centrally symmetric set.

source
Base.isemptyMethod
isempty(S::AbstractCentrallySymmetric)

Check whether a centrally symmetric set is empty.

Input

  • S – centrally symmetric set

Output

false.

source
LazySets.centerMethod
center(H::AbstractCentrallySymmetric, i::Int)

Return the center of a centrally symmetric set along a given dimension.

Input

  • S – centrally symmetric set
  • i – dimension of interest

Output

The center along the given dimension.

source
Base.extremaMethod
extrema(S::AbstractCentrallySymmetric, i::Int)

Return the lower and higher coordinate of a centrally symmetric set in a given dimension.

Input

  • S – centrally symmetric set
  • i – dimension of interest

Output

The lower and higher coordinate of the centrally symmetric set in the given dimension.

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
Base.extremaMethod
extrema(S::AbstractCentrallySymmetric)

Return two vectors with the lowest and highest coordinate of a centrally symmetric set.

Input

  • S – centrally symmetric set

Output

Two vectors with the lowest and highest coordinates of S.

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

Implementations