interval-algebra v0.6.0 Release Notes
-
- Generalizes the
IntervalAlgebraic
class to work on any data structure that contains an interval (not just intervals themselves). This is possible by modification to theIntervallic
class, which now works in part as lens withgetInterval
andsetInterval
functions. This change allows users to define their own type which contains an interval get all the interval algebraic operation on that new type. The utility of this generalization can be seen in thePairedInterval
module, which defines a parameterized type for interval paired with some other data. - Eliminates the
Moment
class and combined it with theIntervalSizeable
class. Like theIntervalAlgebraic
class, theIntervalSizeable
class no longer depends on theInterval
type, but its functions likeduration
now work on anyIntervallic i a
type. - Removes the
expand
,expandl
, andexpandr
functions from theIntervalSizeable
class are now just general functions. These function now work to modify the interval within anyIntervallic i a
type. Similarlybeginerval
,enderval
, andextenterval
were removed from the class; however, these functions only return theInterval
type. - Generalizes the
filter*
functions in the utilities module to operate on potentially different interval algebraic types. For example, infilterOverlaps x [ys]
,x
could be anInterval a
and theys
could be a list ofPairedInterval b a
, so you can filter a container of one interval algebraic type with another interval algebraic type.
- Generalizes the