<interval-map> ( specification -- map )
Factor handbook » The language » Collections » Interval maps

Prev:interval-values ( map -- values )
Next:coalesce ( alist -- specification )


Vocabulary
interval-maps

Inputs
specificationan assoc


Outputs
mapan interval-map


Word description
From a specification, produce an interval tree. The specification is an assoc where the keys are intervals, or pairs of numbers to represent intervals, or individual numbers to represent singleton intervals. The values are the values int he interval map. Construction time is O(n log n).

Definition