From 0ce2a41d242248547c21c076472830960e807761 Mon Sep 17 00:00:00 2001 From: schillic Date: Thu, 17 Jan 2019 19:52:51 +0100 Subject: [PATCH] concrete intersection for AbstractSingleton --- docs/src/lib/binary_functions.md | 1 + docs/src/man/set_operations.md | 50 ++++++++++----------- src/concrete_intersection.jl | 74 ++++++++++++++++++++++++++++++++ test/unit_Singleton.jl | 5 ++- 4 files changed, 104 insertions(+), 26 deletions(-) diff --git a/docs/src/lib/binary_functions.md b/docs/src/lib/binary_functions.md index c556be16f7..ca4e50baff 100644 --- a/docs/src/lib/binary_functions.md +++ b/docs/src/lib/binary_functions.md @@ -44,6 +44,7 @@ convex_hull(::VPolygon{N}, ::VPolygon{N}) where {N<:Real} ## Intersection of two sets ```@docs +intersection(::AbstractSingleton{N}, ::Union{LazySet{N}, UnionSet{N}, UnionSetArray{N}}) where {N<:Real} intersection(::Line{N}, ::Line{N}) where {N<:Real} intersection(::AbstractHyperrectangle{N}, ::AbstractHyperrectangle{N}) where {N<:Real} intersection(::Interval{N}, ::Interval{N}) where {N<:Real} diff --git a/docs/src/man/set_operations.md b/docs/src/man/set_operations.md index eb18855960..7c0db92bab 100644 --- a/docs/src/man/set_operations.md +++ b/docs/src/man/set_operations.md @@ -222,50 +222,50 @@ The table entries consist of subsets of the following list of operations. | type ↓ \ type → |LazyS |APtop |ACSym |ACSPt |APgon |AHrec |AHPgn |ASing |Ball1 |Ball2 |BInf |Ballp |Ellip |Empty |HalfS |HPgon |HPhed |HPtop |Hplan |Hrect |Itrvl |Line |LineS |Singl |VPgon |VPtop |ZeroS |Zonot | CP | CPA | CH | CHA |EMap | EPM |Itsct |ItscA |LiMap | MS | MSA | CMS | SIH | |------------------------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------| | **Interfaces** | | | | | | | | | | | | | | | ⊎ | | | | | | | | | | | | | | | | | | | | | | | | | | | -| `LazySet` | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i |⊆ ⊎i |⊆i ⊎ | ⊎ | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎ | ⊎ |⊆i ⊎ |⊆i ⊎i | ⊎i | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | -| `APolytope` |⊆ ⊎i |⊆i ⊎i ∩ |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆ ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩ |⊆i ⊎i ∩ |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | -| `ACentrallySymmetric` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `LazySet` | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i |⊆ ⊎i |⊆i ⊎ | ⊎ ∩ | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎ | ⊎ |⊆i ⊎ |⊆i ⊎i | ⊎i | ⊎ | ⊎i | ⊎i ∩i | ⊎i | ⊎i | ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | +| `APolytope` |⊆ ⊎i |⊆i ⊎i ∩ |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆ ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩ |⊆i ⊎i ∩ |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | +| `ACentrallySymmetric` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | | `ACentrallySymmetricPolytope` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | | `APolygon` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |- |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | | `AHyperrectangle` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆ ⊎ ∩ |⊆i ⊎i ∩i |⊆i ⊎ ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | | `AHPolygon` |⊆i ⊎ |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩ |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |- |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i C |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | -| `ASingleton` |⊆ ⊎ |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆ ⊎ ∩i |⊆i ⊎i ∩i |⊆ ⊎ ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | +| `ASingleton` |⊆ ⊎ ∩ |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆ ⊎ ∩i |⊆i ⊎i ∩i |⊆ ⊎ ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i | | | | | | | | | | | | | | | | | ⊎ | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Basic set types** | | | | | | | | | | | | | | | ⊎ | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Ball1` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | -| `Ball2` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆ ⊎i | ⊎i |⊆ ⊎ |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆ ⊎i | ⊎i | ⊎i |⊆ ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `Ball2` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆ ⊎i ∩i | ⊎i |⊆ ⊎ |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆ ⊎i ∩i | ⊎i | ⊎i |⊆ ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | | `BallInf` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | -| `Ballp` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆ ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆ ⊎i | ⊎i | ⊎i |⊆ ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `Ellipsoid` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `EmptySet` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `HalfSpace` | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎ | ⊎i | ⊎i ∩ | ⊎i ∩ | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `Ballp` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆ ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆ ⊎i ∩i | ⊎i | ⊎i |⊆ ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `Ellipsoid` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `EmptySet` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `HalfSpace` | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎ | ⊎i | ⊎i ∩ | ⊎i ∩ | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | | `HPolygon`/`HPolygonOpt` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i C |⊆i ⊎i ∩i C |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i C |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i |⊆i ⊎i ∩i C |⊆i ⊎i |⊆i ⊎i ∩i Ci|- |⊆i ⊎i |⊆i ⊎i ∩i C |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i Ci| | `HPolyhedron` | ⊎ | ⊎i ∩ C | ⊎i | ⊎i ∩i Ci| ⊎i ∩i Ci|⊆i ⊎i ∩i Ci| ⊎i ∩i Ci|⊆i ⊎i ∩i Ci| ⊎i ∩i Ci| ⊎i |⊆i ⊎i ∩i Ci| ⊎i | ⊎i | ⊎i | ⊎i ∩ | ⊎i ∩i Ci| ⊎i ∩ | ⊎i ∩ Ci| ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci| ⊎i | ⊎i ∩i Ci|⊆i ⊎i ∩i Ci| ⊎i ∩i Ci| ⊎i ∩ Ci|⊆i ⊎i ∩i Ci| ⊎i ∩i Ci| ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i Ci| | `HPolytope` |⊆i ⊎ |⊆i ⊎i ∩ C |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i C |⊆i ⊎i ∩i C |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩ |⊆i ⊎i ∩i C |⊆i ⊎i ∩ |⊆i ⊎i ∩ Ci|⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩ C |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i Ci| -| `Hyperplane` | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `Hyperplane` | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | | `Hyperrectangle` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i C |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | | `Interval` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |- |⊆i ⊎i ∩i |- |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |- |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |- |- |⊆i ⊎i ∩i |- |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | -| `Line` | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |- | ⊎i ∩ | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `Line` | ⊎ | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |- | ⊎i ∩ | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | | `LineSegment` |⊆ ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆ ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |- |⊆i ⊎i |⊆i ⊎ ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | -| `Singleton` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | +| `Singleton` |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i | | `VPolygon` |⊆i ⊎i |⊆i ⊎i ∩i C |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i C |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i |⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i ∩i Ci|- |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i Ci| | `VPolytope` |⊆i ⊎i |⊆i ⊎i ∩i C |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩ |⊆i ⊎i ∩ C |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩ Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i Ci| -| `ZeroSet` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | +| `ZeroSet` |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i | | `Zonotope` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i C |⊆i ⊎i ∩i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎ |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i Ci|⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i Ci|⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i Ci| | | | | | | | | | | | | | | | | ⊎ | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Lazy set operation types** | | | | | | | | | | | | | | | ⊎ | | | | | | | | | | | | | | | | | | | | | | | | | | | -| `CartesianProduct` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `CartesianProductArray` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `ConvexHull` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `ConvexHullArray` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `ExponentialMap` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `ExponentialProjectionMap` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `Intersection` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `IntersectionArray` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `LinearMap` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `MinkowskiSum` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `MinkowskiSumArray` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | -| `CacheMinkowskiSum` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `CartesianProduct` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `CartesianProductArray` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `ConvexHull` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `ConvexHullArray` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `ExponentialMap` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `ExponentialProjectionMap` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `Intersection` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `IntersectionArray` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `LinearMap` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `MinkowskiSum` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `MinkowskiSumArray` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | +| `CacheMinkowskiSum` | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i |⊆i ⊎i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i |⊆i ⊎i ∩i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i | ⊎i |⊆i ⊎i | | `SymmetricIntervalHull` |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i ∩i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i |⊆i ⊎i ∩i | ### `⊆` diff --git a/src/concrete_intersection.jl b/src/concrete_intersection.jl index cd8aaa65b3..4ec6d86ce3 100644 --- a/src/concrete_intersection.jl +++ b/src/concrete_intersection.jl @@ -2,6 +2,43 @@ export intersection +""" + intersection(S::AbstractSingleton{N}, + X::Union{LazySet{N}, UnionSet{N}, UnionSetArray{N}} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + +Return the intersection of a singleton with another set. + +### Input + +- `S` -- singleton +- `X` -- another set + +### Output + +If the sets intersect, the result is `S`. +Otherwise, the result is the empty set. +""" +function intersection(S::AbstractSingleton{N}, + X::Union{LazySet{N}, UnionSet{N}, UnionSetArray{N}} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + return element(S) ∈ X ? S : EmptySet{N}() +end + +# symmetric method +function intersection(X::Union{LazySet{N}, UnionSet{N}, UnionSetArray{N}}, + S::AbstractSingleton{N} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + return intersection(S, X) +end + +# disambiguation +function intersection(S1::AbstractSingleton{N}, + S2::AbstractSingleton{N} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + return element(S1) == element(S2) ? S1 : EmptySet{N}() +end + """ intersection(L1::Line{N}, L2::Line{N} )::Union{Singleton{N}, Line{N}, EmptySet{N}} where {N<:Real} @@ -100,6 +137,18 @@ function intersection(H1::AbstractHyperrectangle{N}, return Hyperrectangle(high=high, low=low) end +# disambiguation +function intersection(S::AbstractSingleton{N}, + H::AbstractHyperrectangle{N} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + return invoke(intersection, Tuple{typeof(S), LazySet{N}}, S, H) +end +function intersection(H::AbstractHyperrectangle{N}, + S::AbstractSingleton{N} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + return invoke(intersection, Tuple{typeof(S), LazySet{N}}, S, H) +end + """ intersection(x::Interval{N}, y::Interval{N} @@ -433,6 +482,19 @@ function intersection(P1::AbstractPolytope{N}, return intersection(P2, P1) end +# disambiguation +function intersection(S::AbstractSingleton{N}, + P::HPoly{N} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + return invoke(intersection, Tuple{typeof(S), LazySet{N}}, S, P) +end +function intersection(P::HPoly{N}, + S::AbstractSingleton{N} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + return invoke(intersection, Tuple{typeof(S), LazySet{N}}, S, P) +end + + """ intersection(P1::S1, P2::S2) where {S1<:AbstractPolytope{N}, S2<:AbstractPolytope{N}} where {N<:Real} @@ -467,3 +529,15 @@ function intersection(P1::S1, P2::S2) where {S1<:AbstractPolytope{N}, end return intersection(get_polytope(P1), get_polytope(P2)) end + +# disambiguation +function intersection(S::AbstractSingleton{N}, + P::AbstractPolytope{N} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + return invoke(intersection, Tuple{typeof(S), LazySet{N}}, S, P) +end +function intersection(P::AbstractPolytope{N}, + S::AbstractSingleton{N} + )::Union{Singleton{N}, EmptySet{N}} where {N<:Real} + return invoke(intersection, Tuple{typeof(S), LazySet{N}}, S, P) +end diff --git a/test/unit_Singleton.jl b/test/unit_Singleton.jl index fb6f306fc9..d80c833bd6 100644 --- a/test/unit_Singleton.jl +++ b/test/unit_Singleton.jl @@ -77,12 +77,15 @@ for N in [Float64, Rational{Int}, Float32] subset, point = ⊆(s2, b, true) @test !⊆(s2, b) && !subset && point ∈ s2 && !(point ∈ b) - # intersection emptiness + # intersection S1 = Singleton(N[1, 1]) S2 = Singleton(N[0, 0]) S3 = ZeroSet{N}(2) H = BallInf(N[1, 1], N(0.5)) M = LinearMap(N[1 0; 0 1], H) + @test intersection(S1, H) == intersection(H, S1) == S1 + @test intersection(S2, H) == intersection(H, S2) == EmptySet{N}() + @test intersection(S3, H) == intersection(H, S3) == EmptySet{N}() @test is_intersection_empty(S1, S2) && is_intersection_empty(S1, S2, true)[1] intersection_empty, point = is_intersection_empty(S2, S3, true) @test !is_intersection_empty(S2, S3) && !intersection_empty &&