Singleton
LazySets.SingletonModule.Singleton — TypeSingleton{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])Operations
LazySets.element — Methodelement(S::Singleton)Return the element of a singleton.
Input
S– singleton
Output
The element of the singleton.
Base.rand — Methodrand(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 typeN– (optional, default:Float64) numeric typedim– (optional, default: 2) dimensionrng– (optional, default:GLOBAL_RNG) random number generatorseed– (optional, default:nothing) seed for reseeding
Output
A random set of the given set type.
Base.rand — Methodrand(::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.
LazySets.singleton_list — Methodsingleton_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).
LazySets.singleton_list — Methodsingleton_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.
LazySets.API.translate! — Methodtranslate!(X::LazySet, v::AbstractVector)Translate a set with a vector by modifying it.
Input
X– setv– vector
Output
The translated set representing $X + \{v\}$.
LazySets.API.translate! — MethodExtended help
translate!(S::Singleton, v::AbstractVector)Algorithm
We add the vector to the point in the singleton.
Undocumented implementations:
Inherited from LazySet:
complementconcretizeconstraintsconvex_hullcopy(::Type{LazySet})diametereltypeeltypeisoperationpolyhedronrationalizetosimplehreptriangulatetriangulate_facesaffine_mapexponential_mapis_interior_pointsampletranslateconvex_hullisapprox==⊂
Inherited from ConvexSet:
Inherited from AbstractPolyhedron:
Inherited from AbstractPolytope:
Inherited from AbstractCentrallySymmetricPolytope:
Inherited from AbstractZonotope:
Inherited from AbstractHyperrectangle:
Inherited from AbstractSingleton: