IntervalMap-0.4.0.0: Maps from Intervals to values, with efficient search.

Portabilityportable
Stabilityexperimental
Maintainerchbreitkopf@gmail.com
Safe HaskellSafe-Inferred

Data.IntervalMap.Generic.Interval

Contents

Description

 

Synopsis

Interval type

class Ord e => Interval i e | i -> e whereSource

Intervals with endpoints of type e. A minimal instance declaration needs to define con, lowerBound, and upperBound.

Methods

lowerBound, upperBound :: i -> eSource

lower and upper bound

leftClosed :: i -> BoolSource

Does the interval include its lower bound? Default is True for all values, i.e. closed intervals.

rightClosed :: i -> BoolSource

Does the interval include its upper bound bound? Default is True for all values, i.e. closed intervals.

overlaps, after, before, subsumes :: i -> i -> BoolSource

above, inside, below :: e -> i -> BoolSource

isEmpty :: i -> BoolSource

Instances

Ord a => Interval (Interval a) a 

helper functions for declaring Eq and Ord instances

genericEquals :: (Interval i e, Eq e) => i -> i -> BoolSource

genericCompare :: (Interval i e, Ord e) => i -> i -> OrderingSource