Skip to content

Commit 10cf2a3

Browse files
authored
Merge pull request #3945 from JuliaReach/schillic/ia_methods
Remove methods for `IntervalArithmetic` types
2 parents 6aaa693 + 11d617f commit 10cf2a3

File tree

7 files changed

+0
-77
lines changed

7 files changed

+0
-77
lines changed

src/ConcreteOperations/isdisjoint.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,6 @@ function _isdisjoint_convex_sufficient(X::LazySet, Y::LazySet)
3535
return ρ(d, Y) < -ρ(-d, X)
3636
end
3737

38-
# conversion for IA types
39-
isdisjoint(X::LazySet, Y::IA.Interval, witness::Bool=false) = isdisjoint(X, Interval(Y), witness)
40-
isdisjoint(X::IA.Interval, Y::LazySet, witness::Bool=false) = isdisjoint(Interval(X), Y, witness)
41-
42-
function isdisjoint(X::LazySet, Y::IA.IntervalBox, witness::Bool=false)
43-
return isdisjoint(X, convert(Hyperrectangle, Y), witness)
44-
end
45-
function isdisjoint(X::IA.IntervalBox, Y::LazySet, witness::Bool=false)
46-
return isdisjoint(convert(Hyperrectangle, X), Y, witness)
47-
end
48-
4938
"""
5039
# Extended help
5140

src/ConcreteOperations/issubset.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ function ⊆(::AbstractVector, ::LazySet)
77
"(they behave equivalently although the implementations may differ)"))
88
end
99

10-
# conversion for IA types
11-
(X::LazySet, Y::IA.Interval) = (X, Interval(Y))
12-
(X::IA.Interval, Y::LazySet) = (Interval(X), Y)
13-
14-
(X::LazySet, Y::IA.IntervalBox) = (X, convert(Hyperrectangle, Y))
15-
(X::IA.IntervalBox, Y::LazySet) = (convert(Hyperrectangle, X), Y)
16-
1710
"""
1811
# Extended help
1912

src/Initialization/init_IntervalArithmetic.jl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
# convenience method for IntervalArithmetic.Interval
2-
function vertices_list(x::IA.Interval{N}) where {N}
3-
a = IA.inf(x)
4-
b = IA.sup(x)
5-
ST = IA.SVector{1,N}
6-
return _isapprox(a, b) ? [ST(a)] : [ST(a), ST(b)]
7-
end
8-
9-
# convenience method for IntervalArithmetic.IntervalBox
10-
function vertices_list(H::IA.IntervalBox)
11-
return vertices_list(convert(Hyperrectangle, H))
12-
end
13-
141
const zero_itv_store = Dict{Type,IA.Interval}()
152
function zero_itv(N)
163
res = get(zero_itv_store, N, nothing)

test/ConcreteOperations/isdisjoint.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,6 @@ if !isdefined(@__MODULE__, Symbol("@tN"))
88
end
99

1010
for N in @tN([Float64, Float32, Rational{Int}])
11-
# using IA types
12-
X = IA.interval(N(0), N(1)) # IA
13-
Y = Interval(N(-1), N(2))
14-
Z = Interval(N(2), N(3))
15-
res, w = isdisjoint(X, Y, true)
16-
@test !isdisjoint(X, Y) && !isdisjoint(Y, X) && !res && w Interval(X) && w Y
17-
res, w = isdisjoint(X, Z, true)
18-
@test isdisjoint(X, Z) && isdisjoint(Z, X) && res && w == N[]
19-
20-
X = IntervalBox(IA.interval(N(0), N(1)), IA.interval(N(0), N(1)))
21-
Y = Hyperrectangle(; low=[N(-1), N(-1)], high=[N(2), N(2)])
22-
@test !isdisjoint(X, Y)
23-
@test !isdisjoint(Y, X)
24-
2511
@static if isdefined(@__MODULE__, :Polyhedra)
2612
if N == Rational{Int}
2713
for n in [2, 3]

test/ConcreteOperations/issubset.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,6 @@ for N in @tN([Float64, Float32, Rational{Int}])
2929
@test !(X Y) && !res && w X && w Y
3030
end
3131

32-
# using IA types
33-
X = IA.interval(N(0), N(1)) # IA
34-
Y = Interval(N(-1), N(2))
35-
@test X Y
36-
@test !(Y X)
37-
38-
X = IntervalBox(IA.interval(N(0), N(1)), IA.interval(N(0), N(1)))
39-
Y = Hyperrectangle(; low=[N(-1), N(-1)], high=[N(2), N(2)])
40-
@test X Y
41-
@test !(Y X)
42-
4332
# interval with union of unbounded sets
4433
X = Interval(N(1), N(3))
4534
for H in (HalfSpace(N[1], N(2)), HalfSpace(N[-1], N(-2)))

test/Interfaces/IntervalArithmetic.jl

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/runtests.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ end
6565
@testset "LazySets.CDDLib" begin
6666
include("Interfaces/CDDLib.jl")
6767
end
68-
@testset "LazySets.IntervalArithmetic" begin
69-
include("Interfaces/IntervalArithmetic.jl")
70-
end
7168
@testset "LazySets.SymEngine" begin
7269
include("Interfaces/SymEngine.jl")
7370
end

0 commit comments

Comments
 (0)