Singleton

LazySets.SingletonModule.SingletonType
Singleton{N, VN<:AbstractVector{N}} <: AbstractSingleton{N}

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

Fields

  • element – the only element of the set

Examples

julia> Singleton([1.0, 2.0])
Singleton{Float64, Vector{Float64}}([1.0, 2.0])

julia> Singleton(1.0, 2.0)  # convenience constructor from numbers
Singleton{Float64, Vector{Float64}}([1.0, 2.0])
source

Operations

LazySets.elementMethod
element(S::Singleton)

Return the element of a singleton.

Input

  • S – singleton

Output

The element of the singleton.

source
Base.randMethod
rand(T::Type{<:LazySet}; [N]::Type{<:Real}=Float64, [dim]::Int=2,
     [rng]::AbstractRNG=GLOBAL_RNG, [seed]::Union{Int, Nothing}=nothing
    )

Create a random set of the given set type.

Input

  • T – set type
  • 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 set of the given set type.

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

Algorithm

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

source
LazySets.singleton_listMethod
singleton_list(P::LazySet)

Return the vertices of a polytopic set as a list of singletons.

Input

  • P – polytopic set

Output

A list of the vertices of P as Singletons.

Notes

This function relies on vertices_list, which raises an error if the set is not polytopic (e.g., unbounded).

source
LazySets.singleton_listMethod
singleton_list(S::Singleton)

Return the vertices of a singleton as a list of singletons.

Input

  • S – singleton

Output

The list of vertices of S, as Singleton.

source
LazySets.API.translate!Method
translate!(X::LazySet, v::AbstractVector)

Translate a set with a vector by modifying it.

Input

  • X – set
  • v – vector

Output

The translated set representing $X + \{v\}$.

source
LazySets.API.translate!Method

Extended help

translate!(S::Singleton, v::AbstractVector)

Algorithm

We add the vector to the point in the singleton.

source

Undocumented implementations:

Inherited from LazySet:

Inherited from ConvexSet:

Inherited from AbstractPolyhedron:

Inherited from AbstractPolytope:

Inherited from AbstractCentrallySymmetricPolytope:

Inherited from AbstractZonotope:

Inherited from AbstractHyperrectangle:

Inherited from AbstractSingleton: