Universe

Universe

Universe{N<:Real} <: AbstractPolyhedron{N}

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

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

Return the dimension of a universe.

Input

  • U – universe

Output

The dimension of a universe.

source
LazySets.ρMethod.
ρ(d::AbstractVector{N}, U::Universe{N}) where {N<:Real}

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{N}, U::Universe{N}) where {N<:Real}

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{N}, U::Universe{N}) where {N<:Real}

Check whether a given point is contained in a universe.

Input

  • x – point/vector
  • U – universe

Output

The output is always 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
an_element(U::Universe{N}) where {N<:Real}

Return some element of a universe.

Input

  • U – universe

Output

The origin.

source
Base.isemptyMethod.
isempty(U::Universe)

Return if a universe is empty or not.

Input

  • U – universe

Output

false.

source
LazySets.isboundedMethod.
isbounded(U::Universe)

Determine whether a universe is bounded.

Input

  • U – universe

Output

false as the universe is unbounded.

source
isuniversal(U::Universe{N}, [witness]::Bool=false) where {N<:Real}

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.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 with the same center.

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

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

Output

An error.

source
constraints_list(U::Universe{N}) where {N<:Real}

Return the list of constraints defining a universe.

Input

  • U – universe

Output

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

source
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{N}, v::AbstractVector{N}) where {N<:Real}

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

Input

  • U – universe
  • v – translation vector

Output

The universe.

source