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

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(S::AbstractCentrallySymmetric)

Return some element of a centrally symmetric set.

Input

  • S – centrally symmetric set

Output

The center of the centrally symmetric set.

source
LazySets.API.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.API.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)

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
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
LazySets.API.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
Base.isemptyMethod
isempty(S::AbstractCentrallySymmetric)

Check whether a centrally symmetric set is empty.

Input

  • S – centrally symmetric set

Output

false.

source
LazySets.API.isuniversalFunction
isuniversal(S::AbstractCentrallySymmetric, [witness]::Bool=false)

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

Implementations