Phase out intersect(::AbstractInterval, ::AbstractInterval) -> AbstractInterval
#189
Milestone
intersect(::AbstractInterval, ::AbstractInterval) -> AbstractInterval
#189
A single interval can be treated as a representation of a set. For the function
intersect
we added a method such that the intersection of any two intervals can return an instance of an interval. This is possible as the result of such an intersection will either be an interval or an empty interval.However, the other set functions cannot work this way as there exist cases where multiple intervals would have to be returned:
union(::Interval, ::Interval) -> Interval
: returns multiple intervals for disjoint intervalssetdiff(::Interval, ::Interval) -> Interval
: return multiple intervals when the first argument is a superset of the secondsymdiff(::Interval, ::Interval) -> Interval
: returns multiple intervals in all cases except for when the intervals are contiguousI would suggest that we use a different name for the existing
intersect
method and have all of the set methods return a vector so they have consistent return arguments. This is more inline with theBase
behaviour.The text was updated successfully, but these errors were encountered: