Skip to content

Commit

Permalink
Remove isapprox for intervals which has been moved to IntervalSets (#123
Browse files Browse the repository at this point in the history
)

* Remove isapprox for intervals which has been moved to IntervalSets

* Update test_domain_interval.jl

* v0.6 (breaking since isapprox has changed)
  • Loading branch information
dlfivefifty authored Dec 5, 2022
1 parent 8bce5e6 commit e3185fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DomainSets"
uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
version = "0.5.14"
version = "0.6"

[deps]
CompositeTypes = "b152e2b5-7a66-4b01-a709-34e65c35f657"
Expand All @@ -12,7 +12,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
CompositeTypes = "0.1.2"
IntervalSets = "0.5, 0.6, 0.7"
IntervalSets = "0.7.4"
StaticArrays = "0.12.2, 1"
StableRNGs = "1"
julia = "1.6"
Expand Down
5 changes: 0 additions & 5 deletions src/domains/interval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ function point_in_domain(d::AbstractInterval{T}) where {T<:Integer}
end


isapprox(d1::AbstractInterval, d2::AbstractInterval) =
isapprox(leftendpoint(d1), leftendpoint(d2); atol=default_tolerance(d1)) &&
isapprox(rightendpoint(d1), rightendpoint(d2); atol=default_tolerance(d1))


boundary(d::AbstractInterval) = Point(leftendpoint(d)) Point(rightendpoint(d))
corners(d::AbstractInterval) = [leftendpoint(d), rightendpoint(d)]

Expand Down
4 changes: 2 additions & 2 deletions test/test_domain_interval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function test_intervals()

@test (0..1) (1e-16..1)
@test (-1..0) (-1..1e-16)
@test isapprox(HalfLine(), 0..Inf)
@test_skip isapprox(HalfLine(), 0..Inf)
end

@testset "mapping between intervals" begin
Expand Down Expand Up @@ -343,7 +343,7 @@ function test_intervals()
# Equality
@test ChebyshevInterval() == ClosedInterval(-1.0,1.0) == ClosedInterval(-1,1)
@test ChebyshevInterval() Interval{:closed,:open}(-1.0,1.0)
@test ChebyshevInterval() ClosedInterval(-1.0,1.0) Interval{:closed,:open}(-1.0,1.0)
@test ChebyshevInterval() ClosedInterval(-1.0,1.0)

# Union and intersection of intervals
i1 = zero(T)..one(T)
Expand Down

2 comments on commit e3185fe

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/73517

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.0 -m "<description of version>" e3185fe73c7b67fcede158389499cf521a9d5522
git push origin v0.6.0

Please sign in to comment.