Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change LazySet to ConvexSet #2992

Merged
merged 7 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ New functions and types should be documented according to the

You can view the source code documentation from inside the REPL by typing `?`
followed by the name of the type or function.
For example, the following command will print the documentation of the `LazySet`
For example, the following command will print the documentation of the `ConvexSet`
type:

```julia
julia> ?LazySet
julia> ?ConvexSet
```

The documentation you are currently reading is written in [Markdown](https://en.wikipedia.org/wiki/Markdown), and it
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/interfaces.graphml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<y:Geometry height="28.0" width="70.0" x="455.5705748012681" y="9.0"/>
<y:Fill color="#FFCC00" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="61.49072265625" x="4.254638671875" xml:space="preserve" y="3.0">LazySet<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.0511997767857143" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="61.49072265625" x="4.254638671875" xml:space="preserve" y="3.0">ConvexSet<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.0511997767857143" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
<y:UML clipContent="true" constraint="" hasDetailsColor="false" omitDetails="false" stereotype="" use3DEffect="true">
<y:AttributeLabel xml:space="preserve"/>
<y:MethodLabel xml:space="preserve"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ common convex set class or operation between sets.
Concrete information is obtained through evaluating the set in specific
directions.
More precisely, each concrete subtype $\mathcal{X}$ of the abstract type
`LazySet` exports a method to calculate its support vector
`ConvexSet` exports a method to calculate its support vector
$σ(d, \mathcal{X})$ in a given (arbitrary) direction $d \in \mathbb{R}^n$.
Representing sets exactly but lazily has the advantage of being able to perform
only the required operations on-demand.
Expand Down
10 changes: 5 additions & 5 deletions docs/src/lib/approximations.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ box_approximation_helper
```@docs
LocalApproximation
PolygonalOverapproximation
new_approx(S::LazySet, p1::VN, d1::VN,
new_approx(S::ConvexSet, p1::VN, d1::VN,
p2::VN, d2::VN) where {N<:AbstractFloat, VN<:AbstractVector{N}}
addapproximation!(Ω::PolygonalOverapproximation, p1::VN, d1::VN, p2::VN, d2::VN) where {N<:Real, VN<:AbstractVector{N}}
refine(::LocalApproximation, ::LazySet)
refine(::LocalApproximation, ::ConvexSet)
tohrep(::PolygonalOverapproximation)
_approximate(S::LazySet{N}, ε::Real) where {N<:AbstractFloat}
_approximate(S::ConvexSet{N}, ε::Real) where {N<:AbstractFloat}
constraint(::LocalApproximation)
```

Expand All @@ -79,7 +79,7 @@ constraint(::LocalApproximation)
AbstractDirections
isbounding
isnormalized
project(::LazySet, ::AbstractVector{Int}, ::Type{<:AbstractDirections})
project(::ConvexSet, ::AbstractVector{Int}, ::Type{<:AbstractDirections})
BoxDirections
DiagDirections
OctDirections
Expand All @@ -89,7 +89,7 @@ SphericalDirections
CustomDirections
```

See also `overapproximate(X::LazySet, dir::AbstractDirections)::HPolytope`.
See also `overapproximate(X::ConvexSet, dir::AbstractDirections)::HPolytope`.

## Hausdorff distance

Expand Down
68 changes: 34 additions & 34 deletions docs/src/lib/binary_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CurrentModule = LazySets

```@docs
cartesian_product(::VPolytope, ::VPolytope)
cartesian_product(::LazySet, ::LazySet)
cartesian_product(::ConvexSet, ::ConvexSet)
```

## Check for emptiness of intersection
Expand All @@ -24,22 +24,22 @@ cartesian_product(::LazySet, ::LazySet)
`is_intersection_empty` can be used as an alternative name to `isdisjoint`.

```@docs
isdisjoint(::LazySet, ::LazySet, ::Bool=false)
isdisjoint(::ConvexSet, ::ConvexSet, ::Bool=false)
isdisjoint(::AbstractHyperrectangle, ::AbstractHyperrectangle, ::Bool=false)
isdisjoint(::LazySet, ::AbstractSingleton, ::Bool=false)
isdisjoint(::ConvexSet, ::AbstractSingleton, ::Bool=false)
isdisjoint(::AbstractHyperrectangle, ::AbstractSingleton, ::Bool=false)
isdisjoint(::AbstractSingleton, ::AbstractSingleton, ::Bool=false)
isdisjoint(::AbstractZonotope, ::Union{Hyperplane, Line2D}, ::Bool=false)
isdisjoint(::Ball2, ::Ball2, ::Bool=false)
isdisjoint(::LineSegment, ::LineSegment, ::Bool=false)
isdisjoint(::LazySet, ::Union{Hyperplane, Line2D}, ::Bool=false)
isdisjoint(::LazySet, ::HalfSpace, ::Bool=false)
isdisjoint(::ConvexSet, ::Union{Hyperplane, Line2D}, ::Bool=false)
isdisjoint(::ConvexSet, ::HalfSpace, ::Bool=false)
isdisjoint(::HalfSpace, ::HalfSpace, ::Bool=false)
isdisjoint(::AbstractPolyhedron, ::LazySet, ::Bool=false)
isdisjoint(::UnionSet, ::LazySet, ::Bool=false)
isdisjoint(::UnionSetArray, ::LazySet, ::Bool=false)
isdisjoint(::Universe, ::LazySet, ::Bool=false)
isdisjoint(::Complement, ::LazySet, ::Bool=false)
isdisjoint(::AbstractPolyhedron, ::ConvexSet, ::Bool=false)
isdisjoint(::UnionSet, ::ConvexSet, ::Bool=false)
isdisjoint(::UnionSetArray, ::ConvexSet, ::Bool=false)
isdisjoint(::Universe, ::ConvexSet, ::Bool=false)
isdisjoint(::Complement, ::ConvexSet, ::Bool=false)
isdisjoint(::AbstractZonotope, ::AbstractZonotope, ::Bool=false)
isdisjoint(::Interval, ::Interval, ::Bool=false)
isdisjoint(::CartesianProductArray, ::AbstractPolyhedron)
Expand All @@ -51,7 +51,7 @@ isdisjoint(::Line2D, ::Line2D, ::Bool=false)
## Convex hull

```@docs
convex_hull(::LazySet{N}, ::LazySet{N}) where {N}
convex_hull(::ConvexSet{N}, ::ConvexSet{N}) where {N}
convex_hull(::HPoly, ::HPoly)
convex_hull(::VPolytope, ::VPolytope)
convex_hull(::VPolygon, ::VPolygon)
Expand All @@ -63,23 +63,23 @@ monotone_chain!
## Intersection of two sets

```@docs
intersection(::AbstractSingleton, ::LazySet)
intersection(::AbstractSingleton, ::ConvexSet)
intersection(::Line2D, ::Line2D)
intersection(::AbstractHyperrectangle, ::AbstractHyperrectangle)
intersection(::Interval, ::Interval)
intersection(::Interval, ::HalfSpace)
intersection(::Interval, ::Hyperplane)
intersection(::Interval, ::LazySet)
intersection(::Interval, ::ConvexSet)
intersection(::AbstractHPolygon, ::AbstractHPolygon)
intersection(::AbstractPolyhedron{N}, ::AbstractPolyhedron{N}) where {N}
intersection(::Union{VPolytope, VPolygon}, ::Union{VPolytope, VPolygon})
intersection(::VPolygon, ::VPolygon; ::Bool=true)
intersection(::UnionSet, ::LazySet)
intersection(::UnionSetArray, ::LazySet)
intersection(::Universe, ::LazySet)
intersection(::UnionSet, ::ConvexSet)
intersection(::UnionSetArray, ::ConvexSet)
intersection(::Universe, ::ConvexSet)
intersection(::AbstractPolyhedron, ::ResetMap)
intersection(::CartesianProductArray, ::CartesianProductArray)
intersection(::LinearMap, ::LazySet)
intersection(::LinearMap, ::ConvexSet)
intersection(::CartesianProductArray, ::AbstractPolyhedron)
intersection(::LineSegment, ::Line2D)
intersection(::LineSegment, ::LineSegment)
Expand All @@ -89,7 +89,7 @@ intersection(::AbstractZonotope{N}, ::HalfSpace{N}) where {N}
## Minkowski sum

```@docs
minkowski_sum(::LazySet, ::LazySet)
minkowski_sum(::ConvexSet, ::ConvexSet)
minkowski_sum(::AbstractPolyhedron, ::AbstractPolyhedron)
minkowski_sum(::VPolytope, ::VPolytope)
minkowski_sum(::AbstractHyperrectangle, ::AbstractHyperrectangle)
Expand All @@ -102,37 +102,37 @@ minkowski_sum(::AbstractSingleton, ::AbstractSingleton)

## Minkowski difference
```@docs
minkowski_difference(::LazySet, ::LazySet)
minkowski_difference(::ConvexSet, ::ConvexSet)
pontryagin_difference
```

## Subset check

```@docs
issubset
⊆(::LazySet, ::LazySet, ::Bool=false)
⊆(::LazySet, ::AbstractHyperrectangle, ::Bool=false)
⊆(::AbstractPolytope, ::LazySet, ::Bool=false)
⊆(::ConvexSet, ::ConvexSet, ::Bool=false)
⊆(::ConvexSet, ::AbstractHyperrectangle, ::Bool=false)
⊆(::AbstractPolytope, ::ConvexSet, ::Bool=false)
⊆(::AbstractPolytope, ::AbstractHyperrectangle, ::Bool=false)
⊆(::AbstractZonotope, ::AbstractHyperrectangle)
⊆(::AbstractHyperrectangle, ::AbstractHyperrectangle, ::Bool=false)
⊆(::LazySet, ::AbstractPolyhedron, ::Bool=false)
⊆(::AbstractSingleton, ::LazySet, ::Bool=false)
⊆(::ConvexSet, ::AbstractPolyhedron, ::Bool=false)
⊆(::AbstractSingleton, ::ConvexSet, ::Bool=false)
⊆(::AbstractSingleton, ::AbstractHyperrectangle, ::Bool=false)
⊆(::AbstractSingleton, ::AbstractSingleton, ::Bool=false)
⊆(::Ball2, ::Ball2, ::Bool=false)
⊆(::Union{Ball2, Ballp}, ::AbstractSingleton, ::Bool=false)
⊆(::LineSegment, ::LazySet, ::Bool=false)
⊆(::LineSegment, ::ConvexSet, ::Bool=false)
⊆(::LineSegment, ::AbstractHyperrectangle, ::Bool=false)
⊆(::Interval{N}, ::Interval, ::Bool=false) where {N}
⊆(::Interval, ::UnionSet, ::Bool=false)
⊆(::EmptySet, ::LazySet, ::Bool=false)
⊆(::LazySet, ::EmptySet, ::Bool=false)
⊆(::UnionSet, ::LazySet, ::Bool=false)
⊆(::UnionSetArray, ::LazySet, ::Bool=false)
⊆(::LazySet, ::Universe, ::Bool=false)
⊆(::Universe, ::LazySet, ::Bool=false)
⊆(::LazySet, ::Complement, ::Bool=false)
⊆(::EmptySet, ::ConvexSet, ::Bool=false)
⊆(::ConvexSet, ::EmptySet, ::Bool=false)
⊆(::UnionSet, ::ConvexSet, ::Bool=false)
⊆(::UnionSetArray, ::ConvexSet, ::Bool=false)
⊆(::ConvexSet, ::Universe, ::Bool=false)
⊆(::Universe, ::ConvexSet, ::Bool=false)
⊆(::ConvexSet, ::Complement, ::Bool=false)
⊆(::CartesianProduct, ::CartesianProduct, ::Bool=false)
⊆(::CartesianProductArray, ::CartesianProductArray, ::Bool=false)
⊆(::AbstractZonotope, ::AbstractHyperrectangle, ::Bool=false)
Expand All @@ -142,14 +142,14 @@ issubset
## Set difference

```@docs
\(::LazySet, ::LazySet)
\(::ConvexSet, ::ConvexSet)
difference(::IN, ::IN) where {N, IN<:Interval{N}}
difference(::AbstractHyperrectangle{N}, ::AbstractHyperrectangle{N}) where {N}
```

## Distance

```@docs
distance(::AbstractSingleton, ::LazySet; ::Real=2.0)
distance(::AbstractSingleton, ::ConvexSet; ::Real=2.0)
distance(::AbstractHyperrectangle, ::AbstractHyperrectangle; ::Real=2.0)
```
8 changes: 4 additions & 4 deletions docs/src/lib/conversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ CurrentModule = LazySets
convert(::Type{HPOLYGON}, ::VPolygon) where {HPOLYGON<:AbstractHPolygon}
convert(::Type{Hyperrectangle}, ::AbstractHyperrectangle)
convert(::Type{Interval}, ::AbstractHyperrectangle)
convert(::Type{Interval}, ::LazySet{N}) where {N<:Real}
convert(::Type{Interval}, ::ConvexSet{N}) where {N<:Real}
convert(::Type{Hyperrectangle}, cpa::CartesianProductArray{N, HN}) where {N<:Real, HN<:AbstractHyperrectangle{N}}
convert(::Type{Hyperrectangle}, cpa::CartesianProductArray{N, Interval{N}}) where {N<:Real}
convert(::Type{HPOLYGON}, ::AbstractHyperrectangle) where {HPOLYGON<:AbstractHPolygon}
convert(::Type{HPOLYGON}, ::HPolytope{N, VN}) where {N<:Real, VN<:AbstractVector{N}, HPOLYGON<:AbstractHPolygon}
convert(::Type{HPOLYGON}, ::AbstractSingleton{N}) where {N<:Real, HPOLYGON<:AbstractHPolygon}
convert(::Type{HPOLYGON}, ::LineSegment{N}) where {N<:Real, HPOLYGON<:AbstractHPolygon}
convert(::Type{HPOLYGON}, ::LazySet) where {HPOLYGON<:AbstractHPolygon}
convert(::Type{HPOLYGON}, ::ConvexSet) where {HPOLYGON<:AbstractHPolygon}
convert(::Type{HPolyhedron}, ::AbstractPolytope)
convert(::Type{HPolytope}, ::AbstractHPolygon)
convert(::Type{HPolytope}, ::AbstractHyperrectangle)
convert(::Type{HPolytope}, ::AbstractPolytope)
convert(::Type{HPolytope}, ::VPolytope)
convert(::Type{VPolygon}, ::AbstractHPolygon)
convert(::Type{VPolytope}, ::LazySet)
convert(::Type{VPolytope}, ::ConvexSet)
convert(::Type{VPolytope}, ::AbstractPolytope)
convert(::Type{VPolytope}, ::HPolytope)
convert(::Type{Zonotope}, ::AbstractZonotope)
Expand All @@ -50,7 +50,7 @@ convert(::Type{Interval}, ::Rectification{N, IN}) where {N<:Real, IN<:Interval{N
convert(::Type{IntervalArithmetic.Interval}, ::Interval)
convert(::Type{Interval}, ::IntervalArithmetic.Interval)
convert(::Type{VPolytope}, ::ConvexHullArray{N, Singleton{N, VT}}) where {N, VT}
convert(::Type{VPolygon}, ::LazySet)
convert(::Type{VPolygon}, ::ConvexSet)
convert(::Type{MinkowskiSumArray}, ::MinkowskiSum{N, ST, MinkowskiSumArray{N, ST}}) where {N, ST}
convert(::Type{Interval}, ::MinkowskiSum{N, IT, IT}) where {N, IT<:Interval{N}}
convert(::Type{HParallelotope}, Z::AbstractZonotope{N}) where {N}
Expand Down
Loading