Skip to content

Commit 1a208ef

Browse files
authored
updated compat for IntervalArithmetic (#188)
* updated compat for IntervalArithmetic * trigger workflow
1 parent e42e265 commit 1a208ef

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
matrix:
1313
version:
1414
- '1.5'
15-
- '^1.6.0-0'
15+
- '1.6'
1616
- 'nightly'
1717
os:
1818
- ubuntu-latest

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name = "IntervalConstraintProgramming"
22
uuid = "138f1668-1576-5ad7-91b9-7425abbf3153"
3-
version = "0.12.2"
3+
version = "0.12.3"
44

55
[compat]
6-
IntervalArithmetic = "0.16, 0.17"
6+
IntervalArithmetic = "0.16, 0.17, 0.18"
77
IntervalContractors = "0.4"
88
IntervalRootFinding = "0.5"
99
MacroTools = "0.4, 0.5"

test/runtests.jl

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -132,32 +132,37 @@ end
132132
S1 = S1a S1b
133133
paving = pave(S1, IntervalBox(-3..3, -3..3), 2.0, 0.5)
134134

135-
@test paving.inner == [IntervalBox(1.5..3, 0..3), IntervalBox(0..1.5, 1.5..3)]
135+
@test Set(paving.inner) == Set([IntervalBox(1.5..3, 0..3), IntervalBox(0..1.5, 1.5..3)])
136+
@test length(paving.inner) == 2
136137
@test isempty(paving.boundary) == false
137138

138139
S2 = S1a S1b
139140
paving = pave(S2, IntervalBox(-3..3, -3..3), 0.1)
140-
@test paving.inner == [IntervalBox(-3..0, 0..3), IntervalBox(0..3, -3..3)]
141+
@test Set(paving.inner) == Set([IntervalBox(-3..0, 0..3), IntervalBox(0..3, -3..3)])
142+
@test length(paving.inner) == 2
141143
@test isempty(paving.boundary) == false
142144

143145

144146
S3 = @constraint x^2 + y^2 <= 1
145147
X = IntervalBox(-..∞, -..∞)
146148
paving = pave(S3, X, 1.0, 0.5)
147149

148-
@test paving.inner == [IntervalBox(Interval(0.0, 0.5), Interval(0.0, 0.8660254037844386)),
149-
IntervalBox(Interval(0.0, 0.5), Interval(-0.8660254037844386, 0.0)),
150-
IntervalBox(Interval(-0.5, 0.0), Interval(0.0, 0.8660254037844386)),
151-
IntervalBox(Interval(-0.5, 0.0), Interval(-0.8660254037844386, 0.0))]
152-
153-
@test paving.boundary == [ IntervalBox(Interval(0.5, 1.0), Interval(0.0, 0.8660254037844387)),
154-
IntervalBox(Interval(0.0, 0.5), Interval(0.8660254037844386, 1.0)),
155-
IntervalBox(Interval(0.5, 1.0), Interval(-0.8660254037844387, 0.0)),
156-
IntervalBox(Interval(0.0, 0.5), Interval(-1.0, -0.8660254037844386)),
157-
IntervalBox(Interval(-0.5, 0.0), Interval(0.8660254037844386, 1.0)),
158-
IntervalBox(Interval(-1.0, -0.5), Interval(0.0, 0.8660254037844387)),
159-
IntervalBox(Interval(-0.5, 0.0), Interval(-1.0, -0.8660254037844386)),
160-
IntervalBox(Interval(-1.0, -0.5), Interval(-0.8660254037844387, 0.0))]
150+
@test Set(paving.inner) == Set([IntervalBox(Interval(0.0, 0.5), Interval(0.0, 0.8660254037844386)),
151+
IntervalBox(Interval(0.0, 0.5), Interval(-0.8660254037844386, 0.0)),
152+
IntervalBox(Interval(-0.5, 0.0), Interval(0.0, 0.8660254037844386)),
153+
IntervalBox(Interval(-0.5, 0.0), Interval(-0.8660254037844386, 0.0))])
154+
155+
@test Set(paving.boundary) == Set([ IntervalBox(Interval(0.5, 1.0), Interval(0.0, 0.8660254037844387)),
156+
IntervalBox(Interval(0.0, 0.5), Interval(0.8660254037844386, 1.0)),
157+
IntervalBox(Interval(0.5, 1.0), Interval(-0.8660254037844387, 0.0)),
158+
IntervalBox(Interval(0.0, 0.5), Interval(-1.0, -0.8660254037844386)),
159+
IntervalBox(Interval(-0.5, 0.0), Interval(0.8660254037844386, 1.0)),
160+
IntervalBox(Interval(-1.0, -0.5), Interval(0.0, 0.8660254037844387)),
161+
IntervalBox(Interval(-0.5, 0.0), Interval(-1.0, -0.8660254037844386)),
162+
IntervalBox(Interval(-1.0, -0.5), Interval(-0.8660254037844387, 0.0))])
163+
164+
@test length(paving.inner) == 4
165+
@test length(paving.boundary) == 8
161166
end
162167

163168

0 commit comments

Comments
 (0)