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(::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 dispatchN
– (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 singleton.
Algorithm
The element is a normally distributed vector with entries of mean 0 and standard deviation 1.
ReachabilityBase.Arrays.rectify
— Methodrectify(S::Singleton)
Concrete rectification of a singleton.
Input
S
– singleton
Output
The Singleton
that corresponds to the rectification of S
.
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.linear_map
— Methodlinear_map(M::AbstractMatrix, S::Singleton)
Concrete linear map of a singleton.
Input
M
– matrixS
– singleton
Output
A singleton.
SparseArrays.permute
— Methodpermute(S::Singleton, p::AbstractVector{Int})
Permute the dimensions according to a permutation vector.
Input
S
– singletonp
– permutation vector
Output
A new Singleton
with the permuted dimensions.
LazySets.API.project
— Methodproject(S::Singleton, block::AbstractVector{Int}; kwargs...)
Concrete projection of a singleton.
Input
S
– singletonblock
– block structure, a vector with the dimensions of interest
Output
A set representing the projection of the singleton S
on the dimensions specified by block
.
LazySets.API.translate!
— Methodtranslate!(S::Singleton, v::AbstractVector)
Translate (i.e., shift) a singleton by a given vector, in-place.
Input
S
– singletonv
– translation vector
Output
The singleton S
translated by v
.
Algorithm
We add the vector to the point in the singleton.
Notes
See also translate(::Singleton, ::AbstractVector)
for the out-of-place version.
Inherited from LazySet
:
complement
concretize
constraints
convex_hull
diameter
eltype
eltype
isoperation
surface
affine_map
exponential_map
is_interior_point
sample
scale
translate
≈
==
⊂
Inherited from ConvexSet
:
Inherited from AbstractPolyhedron
:
Inherited from AbstractPolytope
:
Inherited from AbstractCentrallySymmetricPolytope
:
Inherited from AbstractZonotope
:
Inherited from AbstractHyperrectangle
:
Inherited from AbstractSingleton
: