Convex hull
Binary convex hull (ConvexHull)
LazySets.ConvexHull
— TypeConvexHull{N, S1<:LazySet{N}, S2<:LazySet{N}} <: LazySet{N}
Type that represents the convex hull of the union of two sets, that is the set
\[Z = \{z ∈ \mathbb{R}^n : z = λx + (1-λ)y,\qquad x ∈ X, y ∈ Y,λ ∈ [0, 1] \}.\]
Fields
X
– setY
– set
Notes
The EmptySet
is the neutral element for ConvexHull
.
This type is always convex.
Examples
Convex hull of two 100-dimensional Euclidean balls:
julia> b1, b2 = Ball2(zeros(100), 0.1), Ball2(4*ones(100), 0.2);
julia> c = ConvexHull(b1, b2);
julia> typeof(c)
ConvexHull{Float64,Ball2{Float64,Array{Float64,1}},Ball2{Float64,Array{Float64,1}}}
LazySets.CH
— TypeCH
Alias for ConvexHull
.
LazySets.swap
— Methodswap(ch::ConvexHull)
Return a new ConvexHull
object with the arguments swapped.
Input
ch
– convex hull of two sets
Output
A new ConvexHull
object with the arguments swapped.
LazySets.dim
— Methoddim(ch::ConvexHull)
Return the dimension of a convex hull of two sets.
Input
ch
– convex hull of two sets
Output
The ambient dimension of the convex hull of two sets.
LazySets.ρ
— Methodρ(d::AbstractVector, ch::ConvexHull)
Return the support function of the convex hull of two sets in a given direction.
Input
d
– directionch
– convex hull of two sets
Output
The support function of the convex hull in the given direction.
LazySets.σ
— Methodσ(d::AbstractVector, ch::ConvexHull)
Return the support vector of the convex hull of two sets in a given direction.
Input
d
– directionch
– convex hull of two sets
Output
The support vector of the convex hull in the given direction.
LazySets.isbounded
— Methodisbounded(ch::ConvexHull)
Determine whether the convex hull of two sets is bounded.
Input
ch
– convex hull of two sets
Output
true
iff both wrapped sets are bounded.
Base.isempty
— Methodisempty(ch::ConvexHull)
Return if the convex hull of two sets is empty or not.
Input
ch
– convex hull
Output
true
iff both wrapped sets are empty.
LazySets.vertices_list
— Methodvertices_list(ch::ConvexHull; apply_convex_hull::Bool=true, backend=nothing)
Return the list of vertices of the convex hull of two sets.
Input
ch
– convex hull of two setsapply_convex_hull
– (optional, default:true
) iftrue
, post-process the vertices using a convex-hull algorithmbackend
– (optional, default:nothing
) backend for computing the convex hull (see argumentapply_convex_hull
)
Output
The list of vertices.
Inherited from LazySet
:
$n$-ary convex hull (ConvexHullArray)
LazySets.ConvexHullArray
— TypeConvexHullArray{N, S<:LazySet{N}} <: LazySet{N}
Type that represents the symbolic convex hull of a finite number of sets.
Fields
array
– array of sets
Notes
The EmptySet
is the neutral element for ConvexHullArray
.
Constructors:
ConvexHullArray(array::Vector{<:LazySet})
– default constructorConvexHullArray([n]::Int=0, [N]::Type=Float64)
– constructor for an empty hull with optional size hint and numeric type
Examples
Convex hull of 100 two-dimensional balls whose centers follow a sinusoidal:
julia> b = [Ball2([2*pi*i/100, sin(2*pi*i/100)], 0.05) for i in 1:100];
julia> c = ConvexHullArray(b);
LazySets.CHArray
— TypeCHArray
Alias for ConvexHullArray
.
LazySets.dim
— Methoddim(cha::ConvexHullArray)
Return the dimension of the convex hull of a finite number of sets.
Input
cha
– convex hull array
Output
The ambient dimension of the convex hull of a finite number of sets.
LazySets.ρ
— Methodρ(d::AbstractVector, cha::ConvexHullArray)
Return the support function of a convex hull array in a given direction.
Input
d
– directioncha
– convex hull array
Output
The support function of the convex hull array in the given direction.
Algorithm
This algorihm calculates the maximum over all $ρ(d, X_i)$ where the $X_1, …, X_k$ are the sets in the array cha
.
LazySets.σ
— Methodσ(d::AbstractVector, cha::ConvexHullArray)
Return the support vector of a convex hull array in a given direction.
Input
d
– directioncha
– convex hull array
LazySets.isbounded
— Methodisbounded(cha::ConvexHullArray)
Determine whether a convex hull of a finite number of sets is bounded.
Input
cha
– convex hull of a finite number of sets
Output
true
iff all wrapped sets are bounded.
LazySets.array
— Methodarray(cha::ConvexHullArray)
Return the array of a convex hull of a finite number of sets.
Input
cha
– convex hull array
Output
The array of a convex hull of a finite number of sets.
Base.isempty
— Methodisempty(cha::ConvexHullArray)
Return if a convex hull array is empty or not.
Input
cha
– convex hull array
Output
true
iff all wrapped sets are empty.
LazySets.vertices_list
— Methodvertices_list(cha::ConvexHullArray; apply_convex_hull::Bool=true,
backend=nothing)
Return the list of vertices of the convex hull of a finite number of sets.
Input
cha
– convex hull of a finite number of setsapply_convex_hull
– (optional, default:true
) iftrue
, post-process the vertices using a convex-hull algorithmbackend
– (optional, default:nothing
) backend for computing the convex hull (see argumentapply_convex_hull
)
Output
The list of vertices.
Inherited from LazySet
: