Universe

LazySets.UniverseModule.UniverseType
Universe{N} <: AbstractPolyhedron{N}

Type that represents the universal set, i.e., the set of all elements.

Fields

  • dim – the ambient dimension of the set
source

Operations

LazySets.API.dimMethod
dim(U::Universe)

Return the dimension of a universe.

Input

  • U – universe

Output

The ambient dimension of a universe.

source
LazySets.API.ρMethod
ρ(d::AbstractVector, U::Universe)

Return the support function of a universe.

Input

  • d – direction
  • U – universe

Output

The support function in the given direction.

Algorithm

If the direction is all zero, the result is zero. Otherwise, the result is Inf.

source
LazySets.API.σMethod
σ(d::AbstractVector, U::Universe)

Return the support vector of a universe.

Input

  • d – direction
  • U – universe

Output

A vector with infinity values, except in dimensions where the direction is zero.

source
Base.:∈Method
∈(x::AbstractVector, U::Universe)

Check whether a given point is contained in a universe.

Input

  • x – point/vector
  • U – universe

Output

true.

Examples

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

Create a universe (note that there is nothing to randomize).

Input

  • Universe – 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) universe of the given numeric type and dimension.

source
LazySets.API.an_elementMethod
an_element(U::Universe{N}) where {N}

Return some element of a universe.

Input

  • U – universe

Output

The origin.

source
an_element(P::AbstractPolyhedron{N};
           [solver]=default_lp_solver(N)) where {N}

Return some element of a polyhedron.

Input

  • P – polyhedron
  • solver – (optional, default: default_lp_solver(N)) LP solver

Output

An element of the polyhedron, or an error if the polyhedron is empty.

Algorithm

An element is obtained by solving a feasibility linear program.

source
Base.isemptyMethod
isempty(U::Universe)

Check whether a universe is empty.

Input

  • U – universe

Output

false.

source
LazySets.API.isuniversalMethod
isuniversal(U::Universe{N}, [witness]::Bool=false) where {N}

Check whether a universe is universal.

Input

  • U – universe
  • witness – (optional, default: false) compute a witness if activated

Output

  • If witness option is deactivated: true
  • If witness option is activated: (true, [])
source
LinearAlgebra.normFunction
norm(U::Universe, [p]::Real=Inf)

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

Input

  • U – universe
  • p – (optional, default: Inf) norm

Output

An error.

source
LazySets.API.radiusFunction
radius(U::Universe, [p]::Real=Inf)

Return the radius of a universe. It is the radius of the enclosing ball (of the given $p$-norm) of minimal volume.

Input

  • U – universe
  • p – (optional, default: Inf) norm

Output

An error.

source
LazySets.API.diameterFunction
diameter(U::Universe, [p]::Real=Inf)

Return the diameter of a universe. It is the diameter of the enclosing ball (of the given $p$-norm) of minimal volume .

Input

  • U – universe
  • p – (optional, default: Inf) norm

Output

An error.

source
LazySets.API.constraintsMethod
constraints(U::Universe{N}) where {N}

Construct an iterator over the constraints of a universe.

Input

  • U – universe

Output

The empty iterator, as the universe is unconstrained.

source
LazySets.API.constraints_listMethod
constraints_list(U::Universe{N}) where {N}

Return the list of constraints defining a universe.

Input

  • U – universe

Output

The empty list of constraints, as the universe is unconstrained.

source
constraints_list(H::AbstractHyperrectangle{N}) where {N}

Return the list of constraints of a hyperrectangular set.

Input

  • H – hyperrectangular set

Output

A list of $2n$ linear constraints, where $n$ is the dimension of H.

source
LazySets.constrained_dimensionsMethod
constrained_dimensions(U::Universe)

Return the indices in which a universe is constrained.

Input

  • U – universe

Output

The empty vector, as the universe is unconstrained in every dimension.

source
LazySets.API.translateMethod
translate(U::Universe, v::AbstractVector)

Translate (i.e., shift) a universe by a given vector.

Input

  • U – universe
  • v – translation vector

Output

The universe.

source
LazySets.API.translate!Method
translate!(U::Universe, v::AbstractVector)

Translate (i.e., shift) a universe by a given vector, in-place.

Input

  • U – universe
  • v – translation vector

Output

The universe.

source
SparseArrays.permuteMethod
permute(U::Universe, p::AbstractVector{Int})

Permute the dimensions according to a permutation vector.

Input

  • U – universe
  • p – permutation vector

Output

The same universe.

source
LazySets.API.complementMethod
complement(∅::EmptySet{N}) where {N}

Return the complement of an empty set.

Input

  • – empty set

Output

The universe of the same dimension.

source
complement(U::Universe{N}) where {N}

Return the complement of an universe.

Input

  • – universe

Output

The empty set of the same dimension.

source
LazySets.API.reflectMethod
reflect(U::Universe)

Concrete reflection of a universe U, resulting in the reflected set -U.

Input

  • U – universe

Output

The same universe.

source