# Empty set (EmptySet)

LazySets.dimMethod
dim(∅::EmptySet)

Return the dimension of an empty set.

Input

• ∅ – an empty set

Output

The dimension of the empty set.

source
LazySets.σMethod
σ(d::AbstractVector, ∅::EmptySet)

Return the support vector of an empty set.

Input

• d – direction
• ∅ – empty set

Output

An error.

source
LazySets.ρMethod
ρ(d::AbstractVector, ∅::EmptySet)

Evaluate the support function of an empty set in a given direction.

Input

• d – direction
• ∅ – empty set

Output

An error.

source
Base.:∈Method
∈(x::AbstractVector, ∅::EmptySet)

Check whether a given point is contained in an empty set.

Input

• x – point/vector
• ∅ – empty set

Output

The output is always false.

Examples

julia> [1.0, 0.0] ∈ ∅(2)
false
source
Base.randMethod
rand(::Type{EmptySet}; [N]::Type{<:Real}=Float64, [dim]::Int=0,
[rng]::AbstractRNG=GLOBAL_RNG, [seed]::Union{Int, Nothing}=nothing)

Create an empty set (note that there is nothing to randomize).

Input

• EmptySet – type for dispatch
• N – (optional, default: Float64) numeric type
• dim – (optional, default: 2) dimension
• rng – (optional, default: GLOBAL_RNG) random number generator
• seed – (optional, default: nothing) seed for reseeding

Output

The (only) empty set of the given numeric type and dimension.

source
LazySets.isboundedMethod
isbounded(∅::EmptySet)

Determine whether an empty set is bounded.

Input

• ∅ – empty set

Output

true.

source
Base.isemptyMethod
isempty(∅::EmptySet)

Return if the empty set is empty or not.

Input

• ∅ – empty set

Output

true.

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

Check whether an empty is universal.

Input

• ∅ – empty 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$, although we currently throw an error
source
LazySets.verticesMethod
vertices(S::AbstractSingleton{N}) where {N}

Construct an iterator over the vertices of a set with a single value.

Input

• S – set with a single value

Output

An iterator with a single value.

source
vertices(∅::EmptySet{N}) where {N}

Construct an iterator over the vertices of an empty set.

Input

• ∅ – empty set

Output

The empty iterator, as the empty set does not contain any vertices.

source
LazySets.vertices_listMethod
vertices_list(P::AbstractHPolygon{N};
apply_convex_hull::Bool=true,
check_feasibility::Bool=true) where {N}

Return the list of vertices of a polygon in constraint representation.

Input

• P – polygon in constraint representation
• apply_convex_hull – (optional, default: true) flag to post-process the intersection of constraints with a convex hull
• check_feasibility – (optional, default: true) flag to check whether the polygon was empty (required for correctness in case of empty polygons)

Output

List of vertices.

Algorithm

We compute each vertex as the intersection of consecutive lines defined by the half-spaces. If check_feasibility is active, we then check if the constraints of the polygon were actually feasible (i.e., they pointed in the right direction). For this we compute the average of all vertices and check membership in each constraint.

source
vertices_list(B::Ball1{N, VN}) where {N, VN<:AbstractVector}

Return the list of vertices of a ball in the 1-norm.

Input

• B – ball in the 1-norm

Output

A list containing the vertices of the ball in the 1-norm.

source
vertices_list(∅::EmptySet{N}) where {N}

Return the list of vertices of an empty set.

Input

• ∅ – empty set

Output

The empty list of vertices, as the empty set does not contain any vertices.

source
vertices_list(P::HPolytope{N};
[backend]=nothing, [prune]::Bool=true) where {N}

Return the list of vertices of a polytope in constraint representation.

Input

• P – polytope in constraint representation
• backend – (optional, default: nothing) the polyhedral computations backend
• prune – (optional, default: true) flag to remove redundant vertices

Output

List of vertices.

Algorithm

If the polytope is two-dimensional, the polytope is converted to a polygon in H-representation and then its vertices_list function is used. This ensures that, by default, the optimized two-dimensional methods are used.

It is possible to use the Polyhedra backend in two-dimensions as well by passing, e.g. backend=CDDLib.Library().

If the polytope is not two-dimensional, the concrete polyhedra manipulation library Polyhedra is used. The actual computation is performed by a given backend; for the default backend used in LazySets see default_polyhedra_backend(P). For further information on the supported backends see Polyhedra's documentation.

source
vertices_list(cp::CartesianProduct{N}) where {N}

Return the list of vertices of a (polytopic) Cartesian product.

Input

• cp – Cartesian product

Output

A list of vertices.

Algorithm

We assume that the underlying sets are polytopic. Then the high-dimensional set of vertices is just the Cartesian product of the low-dimensional sets of vertices.

source

vertices_list(cpa::CartesianProductArray{N}) where {N}

Return the list of vertices of a (polytopic) Cartesian product of a finite number of sets.

Input

• cpa – Cartesian product array

Output

A list of vertices.

Algorithm

We assume that the underlying sets are polytopic. Then the high-dimensional set of vertices is just the Cartesian product of the low-dimensional sets of vertices.

source
vertices_list(em::ExponentialMap{N};
[backend]=get_exponential_backend()) where {N}

Return the list of vertices of a (polytopic) exponential map.

Input

• em – exponential map
• backend – (optional; default: get_exponential_backend()) exponentiation backend

Output

A list of vertices.

Algorithm

We assume that the underlying set X is polytopic. Then the result is just the exponential map applied to the vertices of X.

source
LinearAlgebra.normFunction
norm(S::EmptySet, [p]::Real=Inf)

Return the norm of an empty set. It is the norm of the enclosing ball (of the given $p$-norm) of minimal volume that is centered in the origin.

Input

• S – empty set
• p – (optional, default: Inf) norm

Output

An error.

source
IntervalArithmetic.radiusFunction
radius(S::EmptySet, [p]::Real=Inf)

Return the radius of an empty set. It is the radius of the enclosing ball (of the given $p$-norm) of minimal volume with the same center.

Input

• S – empty set
• p – (optional, default: Inf) norm

Output

An error.

source
LazySets.diameterFunction
diameter(S::EmptySet, [p]::Real=Inf)

Return the diameter of an empty set. It is the maximum distance between any two elements of the set, or, equivalently, the diameter of the enclosing ball (of the given $p$-norm) of minimal volume with the same center.

Input

• S – empty set
• p – (optional, default: Inf) norm

Output

An error.

source
LazySets.linear_mapMethod
linear_map(M::AbstractMatrix{N}, ∅::EmptySet{N}) where {N}

Return the linear map of an empty set.

Input

• M – matrix
• ∅ – empty set

Output

The empty set.

source
LazySets.translateMethod
translate(∅::EmptySet, v::AbstractVector)

Translate (i.e., shift) an empty set by a given vector.

Input

• ∅ – empty set
• v – translation vector

Output

The empty set.

source
LazySets.plot_recipeMethod
plot_recipe(∅::EmptySet{N}, [ε]=zero(N)) where {N}

Convert an empty set to a sequence of points for plotting. In the special case of an empty set, we define the sequence as nothing.

Input

• ∅ – empty set
• ε – (optional, default: 0) ignored, used for dispatch

Output

nothing.

source
RecipesBase.apply_recipeMethod
plot_emptyset(∅::EmptySet, [ε]::N=zero(N); ...)

Plot an empty set.

Input

• ∅ – empty set
• ε – (optional, default: 0) ignored, used for dispatch
source
LazySets.areaMethod
area(X::ConvexSet{N}) where {N}

Compute the area of a two-dimensional polytopic set using the Shoelace formula.

Input

• X – two-dimensional set

Output

A number representing the area of X.

Notes

This algorithm is applicable to any lazy set X such that its list of vertices, vertices_list, can be computed.

Algorithm

Let m be the number of vertices of X. The following instances are considered:

• m = 0, 1, 2: the output is zero.
• m = 3: the triangle case is computed using the Shoelace formula with 3 points.
• m = 4: the quadrilateral case is obtained by the factored version of the Shoelace formula with 4 points.

Otherwise, the general Shoelace formula is used; for detals see the wikipedia article Shoelace formula.

source
area(∅::EmptySet{N}) where {N}

Return the area of an empty set.

Input

• ∅ – empty set

Output

The zero element of type N.

source

Inherited from ConvexSet: