IntervalMap-0.6.1.1: Containers for intervals, with efficient search.

Copyright(c) Christoph Breitkopf 2011
LicenseBSD-style
Maintainerchbreitkopf@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.IntervalMap

Description

An implementation of maps from intervals to values. The key intervals may overlap, and the implementation contains efficient search functions for all keys containing a point or overlapping an interval. Closed, open, and half-open intervals can be contained in the same map.

This module re-exports the value lazy Data.IntervalMap.Lazy API, plus several value strict functions from Data.IntervalMap.Strict.

Synopsis

Documentation

insertWith' :: Ord k => (a -> a -> a) -> Interval k -> a -> IntervalMap k a -> IntervalMap k a Source #

Deprecated. As of version 0.3, replaced by insertWith.

O(log n). Same as insertWith, but the combining function is applied strictly. This is often the most desirable behavior.

For example, to update a counter:

insertWith' (+) k 1 m

insertWithKey' :: Ord k => (Interval k -> a -> a -> a) -> Interval k -> a -> IntervalMap k a -> IntervalMap k a Source #

Deprecated. As of version 0.3, replaced by insertWithKey.

O(log n). Same as insertWithKey, but the combining function is applied strictly.

insertLookupWithKey' :: Ord k => (Interval k -> a -> a -> a) -> Interval k -> a -> IntervalMap k a -> (Maybe a, IntervalMap k a) Source #

Deprecated. As of version 0.3, replaced by insertLookupWithKey.

O(log n). A strict version of insertLookupWithKey.

fold :: (a -> b -> b) -> b -> IntervalMap k a -> b Source #

Deprecated. As of version 0.5, replaced by foldr.

O(n). Fold the values in the map using the given right-associative binary operator. This function is an equivalent of foldr and is present for compatibility only.

foldWithKey :: (Interval k -> a -> b -> b) -> b -> IntervalMap k a -> b Source #

Deprecated. As of version 0.3, replaced by foldrWithKey.

O(n). Fold the keys and values in the map using the given right-associative binary operator. This function is an equivalent of foldrWithKey and is present for compatibility only.