JuliaApproximation / DomainSets.jl

A Julia package for describing domains as continuous sets of elements
MIT License
72 stars 12 forks source link

Interval{L,R,T} <: TypedEndpointInterval{L,R,T} <: AbstractInterval{T} #22

Closed dlfivefifty closed 5 years ago

dlfivefifty commented 6 years ago

:open, :closed should apply to any interval, so I don't see why this wouldn't be part of AbstractInterval.

daanhb commented 6 years ago

In general I'd say the fewer type parameters the better. T is essential but the others aren't really. One could conceivably make a generic interval where open/closed is stored as a boolean. An advantage would be that collections of intervals that can be open or closed are type stable. For example, a subdivision of a closed interval into smaller intervals could have open intervals in the interior, and two halfopen intervals at either end. Alternatively, there could be an additional abstract type `TypeStableEndpointsInterval{L,R,T} <: AbstractInterval{T}' (with a better name)?

dlfivefifty commented 6 years ago

Happy with TypedEndpointInterval?

daanhb commented 6 years ago

Very :-)

dlfivefifty commented 5 years ago

This was added to IntervalSets.jl