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

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