Universe
LazySets.UniverseModule.Universe
— TypeUniverse{N} <: AbstractPolyhedron{N}
Type that represents the universal set, i.e., the set of all elements.
Fields
dim
– the ambient dimension of the set
Operations
LazySets.API.dim
— Methoddim(U::Universe)
Return the dimension of a universe.
Input
U
– universe
Output
The ambient dimension of a universe.
LazySets.API.ρ
— Methodρ(d::AbstractVector, U::Universe)
Return the support function of a universe.
Input
d
– directionU
– 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
.
LazySets.API.σ
— Methodσ(d::AbstractVector, U::Universe)
Return the support vector of a universe.
Input
d
– directionU
– universe
Output
A vector with infinity values, except in dimensions where the direction is zero.
Base.:∈
— Method∈(x::AbstractVector, U::Universe)
Check whether a given point is contained in a universe.
Input
x
– point/vectorU
– universe
Output
true
.
Examples
julia> [1.0, 0.0] ∈ Universe(2)
true
Base.rand
— Methodrand(::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 dispatchN
– (optional, default:Float64
) numeric typedim
– (optional, default: 2) dimensionrng
– (optional, default:GLOBAL_RNG
) random number generatorseed
– (optional, default:nothing
) seed for reseeding
Output
The (only) universe of the given numeric type and dimension.
LazySets.API.an_element
— Methodan_element(U::Universe{N}) where {N}
Return some element of a universe.
Input
U
– universe
Output
The origin.
an_element(P::AbstractPolyhedron{N};
[solver]=default_lp_solver(N)) where {N}
Return some element of a polyhedron.
Input
P
– polyhedronsolver
– (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.
Base.isempty
— Methodisempty(U::Universe)
Check whether a universe is empty.
Input
U
– universe
Output
false
.
LazySets.API.isbounded
— Methodisbounded(U::Universe)
Check whether a universe is bounded.
Input
U
– universe
Output
false
.
LazySets.API.isuniversal
— Methodisuniversal(U::Universe{N}, [witness]::Bool=false) where {N}
Check whether a universe is universal.
Input
U
– universewitness
– (optional, default:false
) compute a witness if activated
Output
- If
witness
option is deactivated:true
- If
witness
option is activated:(true, [])
LinearAlgebra.norm
— Functionnorm(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
– universep
– (optional, default:Inf
) norm
Output
An error.
LazySets.API.radius
— Functionradius(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
– universep
– (optional, default:Inf
) norm
Output
An error.
LazySets.API.diameter
— Functiondiameter(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
– universep
– (optional, default:Inf
) norm
Output
An error.
LazySets.API.constraints
— Methodconstraints(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.
LazySets.API.constraints_list
— Methodconstraints_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.
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
.
LazySets.constrained_dimensions
— Methodconstrained_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.
LazySets.API.translate
— Methodtranslate(U::Universe, v::AbstractVector)
Translate (i.e., shift) a universe by a given vector.
Input
U
– universev
– translation vector
Output
The universe.
LazySets.API.translate!
— Methodtranslate!(U::Universe, v::AbstractVector)
Translate (i.e., shift) a universe by a given vector, in-place.
Input
U
– universev
– translation vector
Output
The universe.
SparseArrays.permute
— Methodpermute(U::Universe, p::AbstractVector{Int})
Permute the dimensions according to a permutation vector.
Input
U
– universep
– permutation vector
Output
The same universe.
LazySets.API.complement
— Methodcomplement(U::Universe{N}) where {N}
Return the complement of an universe.
Input
∅
– universe
Output
The empty set of the same dimension.
LazySets.API.reflect
— Methodreflect(U::Universe)
Concrete reflection of a universe U
, resulting in the reflected set -U
.
Input
U
– universe
Output
The same universe.