Singleton

Singleton

Singleton{N<:Real, VN<:AbstractVector{N}} <: AbstractSingleton{N}

Type that represents a singleton, that is, a set with a unique element.

Fields

  • element – the only element of the set
source
Base.randMethod.
rand(::Type{Singleton}; [N]::Type{<:Real}=Float64, [dim]::Int=2,
     [rng]::AbstractRNG=GLOBAL_RNG, [seed]::Union{Int, Nothing}=nothing)

Create a random singleton.

Input

  • Singleton – 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

A random singleton.

Algorithm

The element is a normally distributed vector with entries of mean 0 and standard deviation 1.

source
LazySets.elementMethod.
element(S::Singleton{N}) where {N<:Real}

Return the element of a singleton.

Input

  • S – singleton

Output

The element of the singleton.

source
LazySets.elementMethod.
element(S::Singleton{N}, i::Int) where {N<:Real}

Return the i-th entry of the element of a singleton.

Input

  • S – singleton
  • i – dimension

Output

The i-th entry of the element of the singleton.

source
LazySets.translateMethod.
translate(S::Singleton{N}, v::AbstractVector{N}) where {N<:Real}

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

Input

  • S – singleton
  • v – translation vector

Output

A translated singleton.

Algorithm

We add the vector to the point in the singleton.

source

Inherited from LazySet:

Inherited from AbstractPolytope:

Inherited from AbstractCentrallySymmetricPolytope:

Inherited from AbstractZonotope:

Inherited from AbstractHyperrectangle:

Inherited from AbstractSingleton: