interval-algebra v0.4.0 Release Notes
-
- โ Adds utilities
emptyIfNone
,emptyIfAny
, andemptyIfAll
that apply predicates to a list of inputs. If none, any, or all of the inputs meet the predicate, then the empty list is returned. Otherwise, the input is returned unmodified. These functions are generalized toMonoid
s, so they work on structures other than lists. - โ Adds
gapsWithin
function toIntervalUtilities
module that appliesgaps
to all intervals in the input list that are non-disjoint from the interval in the first argument. - ๐ Fixed bug in
combineIntervals
where intervals could fail to be combined properly becausefoldr
was being used instead offoldl'
. - โ Adds
intersect
function toIntervalCombinable
class that returns the (maybe) intersection of two intervals. - โ Adds
relations
utility function which returns a list of theIntervalRelations
between each consecutive pair of intervals in the input list. - ๐ Renames
in'
predicate towithin
. Also, renamesfilterIn'
tofilterWithin
. - โ Adds
predicate
function toIntervalAlgebraic
class to map anIntervalRelation
to its corresponding predicate function. Also addspredicates
to map a set ofIntervalRelation
s to a list of predicate functions. - โ Adds
intersection
,union
,converse
, andcomplement
methods toIntervalAlgebraic
for taking the respective operation onSet IntervalRelation
. - Instantiates
Bounded
,Enum
, andOrd
forIntervalRelation
, so that, for one, interval relations can be ordered and used inData.Set
. Uses the total ordering defined here, though in general, interval relations only have a partial order. - ๐ Renames
composeRelations
to the more accurateunionPredicates
. - โ Adds
<|>
as operator for "union"ingComparativePredicateOf (Interval a)
, as instarts <|> overlaps === unionPredicates [starts, overlaps]
. - โ Adds a
clip x y
function which clips the intervaly
to the extent ofx
, providedx
andy
are not disjoint.
- โ Adds utilities