Skip to content

Commit f63d7e8

Browse files
authored
Merge pull request #2887 from JuliaReach/schillic/isdisjoint2
Swap isdisjoint and is_intersection_empty
2 parents 960998f + 738d2fd commit f63d7e8

File tree

6 files changed

+158
-186
lines changed

6 files changed

+158
-186
lines changed

docs/src/lib/binary_functions.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,31 @@ cartesian_product(::LazySet, ::LazySet)
2121
## Check for emptiness of intersection
2222

2323
!!! note
24-
`isdisjoint` can be used as an alternative name to `is_intersection_empty`.
24+
`is_intersection_empty` can be used as an alternative name to `isdisjoint`.
2525

2626
```@docs
27-
is_intersection_empty(::LazySet, ::LazySet, ::Bool=false)
28-
is_intersection_empty(::AbstractHyperrectangle, ::AbstractHyperrectangle, ::Bool=false)
29-
is_intersection_empty(::LazySet, ::AbstractSingleton, ::Bool=false)
30-
is_intersection_empty(::AbstractHyperrectangle, ::AbstractSingleton, ::Bool=false)
31-
is_intersection_empty(::AbstractSingleton, ::AbstractSingleton, ::Bool=false)
32-
is_intersection_empty(::AbstractZonotope, ::Union{Hyperplane, Line2D}, ::Bool=false)
33-
is_intersection_empty(::Ball2, ::Ball2, ::Bool=false)
34-
is_intersection_empty(::LineSegment, ::LineSegment, ::Bool=false)
35-
is_intersection_empty(::LazySet, ::Union{Hyperplane, Line2D}, ::Bool=false)
36-
is_intersection_empty(::LazySet, ::HalfSpace, ::Bool=false)
37-
is_intersection_empty(::HalfSpace, ::HalfSpace, ::Bool=false)
38-
is_intersection_empty(::AbstractPolyhedron, ::LazySet, ::Bool=false)
39-
is_intersection_empty(::UnionSet, ::LazySet, ::Bool=false)
40-
is_intersection_empty(::UnionSetArray, ::LazySet, ::Bool=false)
41-
is_intersection_empty(::Universe, ::LazySet, ::Bool=false)
42-
is_intersection_empty(::Complement, ::LazySet, ::Bool=false)
43-
is_intersection_empty(::AbstractZonotope, ::AbstractZonotope, ::Bool=false)
44-
is_intersection_empty(::Interval, ::Interval, ::Bool=false)
45-
is_intersection_empty(::CartesianProductArray, ::AbstractPolyhedron)
46-
is_intersection_empty(::CartesianProductArray, ::CartesianProductArray)
47-
is_intersection_empty(::CartesianProductArray, ::AbstractHyperrectangle, ::Bool=false)
48-
is_intersection_empty(::Line2D, ::Line2D, ::Bool=false)
27+
isdisjoint(::LazySet, ::LazySet, ::Bool=false)
28+
isdisjoint(::AbstractHyperrectangle, ::AbstractHyperrectangle, ::Bool=false)
29+
isdisjoint(::LazySet, ::AbstractSingleton, ::Bool=false)
30+
isdisjoint(::AbstractHyperrectangle, ::AbstractSingleton, ::Bool=false)
31+
isdisjoint(::AbstractSingleton, ::AbstractSingleton, ::Bool=false)
32+
isdisjoint(::AbstractZonotope, ::Union{Hyperplane, Line2D}, ::Bool=false)
33+
isdisjoint(::Ball2, ::Ball2, ::Bool=false)
34+
isdisjoint(::LineSegment, ::LineSegment, ::Bool=false)
35+
isdisjoint(::LazySet, ::Union{Hyperplane, Line2D}, ::Bool=false)
36+
isdisjoint(::LazySet, ::HalfSpace, ::Bool=false)
37+
isdisjoint(::HalfSpace, ::HalfSpace, ::Bool=false)
38+
isdisjoint(::AbstractPolyhedron, ::LazySet, ::Bool=false)
39+
isdisjoint(::UnionSet, ::LazySet, ::Bool=false)
40+
isdisjoint(::UnionSetArray, ::LazySet, ::Bool=false)
41+
isdisjoint(::Universe, ::LazySet, ::Bool=false)
42+
isdisjoint(::Complement, ::LazySet, ::Bool=false)
43+
isdisjoint(::AbstractZonotope, ::AbstractZonotope, ::Bool=false)
44+
isdisjoint(::Interval, ::Interval, ::Bool=false)
45+
isdisjoint(::CartesianProductArray, ::AbstractPolyhedron)
46+
isdisjoint(::CartesianProductArray, ::CartesianProductArray)
47+
isdisjoint(::CartesianProductArray, ::AbstractHyperrectangle, ::Bool=false)
48+
isdisjoint(::Line2D, ::Line2D, ::Bool=false)
4949
```
5050

5151
## Convex hull

docs/src/man/reach_zonotopes_hybrid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function reach_hybrid(As, Ts, init, δ, μ, T, max_order, instant_transitions)
5353
S = R[i]
5454
push!(res, (S, loc))
5555
for (guard, tgt_loc) in Ts[loc]
56-
if !is_intersection_empty(S, guard)
56+
if !isdisjoint(S, guard)
5757
new_t = t + δ * i
5858
push!(queue, (S, tgt_loc, new_t))
5959
found_transition = true

docs/src/man/set_operations.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,18 +327,18 @@ plot_points(witnesses, "w")
327327
plot1
328328
```
329329

330-
### `is_intersection_empty`
330+
### `isdisjoint`
331331

332332
This function checks whether the intersection of two sets is empty.
333333
It can optionally produce a witness if the intersection is nonempty.
334334
Disjointness checks with `Ball2` are not supported yet.
335335

336336
```@example set_operations
337-
println(is_intersection_empty(BI, H))
338-
w1 = is_intersection_empty(BI, H, true)[2]
339-
println(is_intersection_empty(B1, BI))
340-
w2 = is_intersection_empty(B1, BI, true)[2]
341-
println(is_intersection_empty(B1, H))
337+
println(isdisjoint(BI, H))
338+
w1 = isdisjoint(BI, H, true)[2]
339+
println(isdisjoint(B1, BI))
340+
w2 = isdisjoint(B1, BI, true)[2]
341+
println(isdisjoint(B1, H))
342342
```
343343

344344
```@example set_operations

0 commit comments

Comments
 (0)