Universe

LazySets.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
LazySets.dimMethod
dim(U::Universe)

Return the dimension of a universe.

Input

  • U – universe

Output

The ambient dimension of a universe.

source
LazySets.ρ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.σ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.an_elementMethod
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
an_element(U::Universe{N}) where {N}

Return some element of a universe.

Input

  • U – universe

Output

The origin.

source
Base.isemptyMethod
isempty(U::Universe)

Check whether a universe is empty.

Input

  • U – universe

Output

false.

source
LazySets.isboundedMethod
isbounded(U::Universe)

Check whether a universe is bounded.

Input

  • U – universe

Output

false.

source
LazySets.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
IntervalArithmetic.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.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.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.constraints_listMethod
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
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
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.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.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.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
Polyhedra.polyhedronMethod
polyhedron(U::Universe; [backend]=default_polyhedra_backend(P))

Return an HRep polyhedron from Polyhedra.jl given a universe.

Input

  • U – universe
  • backend – (optional, default: call default_polyhedra_backend(P)) the backend for polyhedral computations

Output

An HRep polyhedron.

Notes

For further information on the supported backends see Polyhedra's documentation.

source
LazySets.reflectMethod
reflect(U::Universe)

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

Input

  • U – universe

Output

The same universe.

source