Complement

Complement

Note that the complement of a convex set is generally not convex. Hence this set type is not part of the convex-set family LazySet.

Complement{N<:Real, S<:LazySet{N}}

Type that represents the complement of a convex set.

Fields

  • X – convex set

Notes

Since X is assumed to be closed, unless X is empty or the universe, its complement is open (i.e., not closed). Since X is assumed to be closed, unless X is empty, the universe, or a half-space, its complement is not convex.

The complement of the complement is the original set again.

Examples

julia> B = BallInf(zeros(2), 1.);

julia> C = Complement(B)
Complement{Float64,BallInf{Float64,Array{Float64,1}}}(BallInf{Float64,Array{Float64,1}}([0.0, 0.0], 1.0))

julia> Complement(C)
BallInf{Float64,Array{Float64,1}}([0.0, 0.0], 1.0)
source
LazySets.dimMethod.
dim(C::Complement)

Return the dimension of the complement of a convex set.

Input

  • C – complement of a convex set

Output

The dimension of the complement of a convex set.

source
Base.:∈Method.
∈(x::AbstractVector{N}, C::Complement{N}) where {N<:Real}

Check whether a given point is contained in the complement of a convex set.

Input

  • x – point/vector
  • C – complement of a convex set

Output

true iff the vector is contained in the complement.

Algorithm

\[ x ∈ X^C ⟺ x ∉ X\]
source
Base.isemptyMethod.
isempty(C::Complement)

Return if the complement of a convex set is empty or not.

Input

  • C – complement of a convex set

Output

false unless the original set is universal.

Algorithm

We use the isuniversal method.

source