Haskell Hierarchical Libraries (fgl package)Source codeContentsIndex
Data.Graph.Inductive.Internal.FiniteMap
Contents
Type
Operations
Description
Simple Finite Maps. This implementation provides several useful methods that Data.FiniteMap does not.
Synopsis
data FiniteMap a b
= Empty
| Node Int (FiniteMap a b) (a, b) (FiniteMap a b)
emptyFM :: Ord a => FiniteMap a b
addToFM :: Ord a => FiniteMap a b -> a -> b -> FiniteMap a b
delFromFM :: Ord a => FiniteMap a b -> a -> FiniteMap a b
updFM :: Ord a => FiniteMap a b -> a -> (b -> b) -> FiniteMap a b
accumFM :: Ord a => FiniteMap a b -> a -> (b -> b -> b) -> b -> FiniteMap a b
splitFM :: Ord a => FiniteMap a b -> a -> Maybe (FiniteMap a b, (a, b))
isEmptyFM :: FiniteMap a b -> Bool
sizeFM :: Ord a => FiniteMap a b -> Int
lookupFM :: Ord a => FiniteMap a b -> a -> Maybe b
elemFM :: Ord a => FiniteMap a b -> a -> Bool
rangeFM :: Ord a => FiniteMap a b -> a -> a -> [b]
minFM :: Ord a => FiniteMap a b -> Maybe (a, b)
maxFM :: Ord a => FiniteMap a b -> Maybe (a, b)
predFM :: Ord a => FiniteMap a b -> a -> Maybe (a, b)
succFM :: Ord a => FiniteMap a b -> a -> Maybe (a, b)
splitMinFM :: Ord a => FiniteMap a b -> Maybe (FiniteMap a b, (a, b))
fmToList :: Ord a => FiniteMap a b -> [(a, b)]
Type
data FiniteMap a b
Constructors
Empty
Node Int (FiniteMap a b) (a, b) (FiniteMap a b)
show/hide Instances
(Ord a, ??? a b) => Eq (FiniteMap a b)
(Show a, Show b, Ord a) => Show (FiniteMap a b)
Operations
emptyFM :: Ord a => FiniteMap a b
addToFM :: Ord a => FiniteMap a b -> a -> b -> FiniteMap a b
delFromFM :: Ord a => FiniteMap a b -> a -> FiniteMap a b
updFM :: Ord a => FiniteMap a b -> a -> (b -> b) -> FiniteMap a b
applies function to stored entry
accumFM :: Ord a => FiniteMap a b -> a -> (b -> b -> b) -> b -> FiniteMap a b
defines or aggregates entries
splitFM :: Ord a => FiniteMap a b -> a -> Maybe (FiniteMap a b, (a, b))
combines delFrom and lookup
isEmptyFM :: FiniteMap a b -> Bool
sizeFM :: Ord a => FiniteMap a b -> Int
lookupFM :: Ord a => FiniteMap a b -> a -> Maybe b
elemFM :: Ord a => FiniteMap a b -> a -> Bool
rangeFM :: Ord a => FiniteMap a b -> a -> a -> [b]
applies lookup to an interval
minFM :: Ord a => FiniteMap a b -> Maybe (a, b)
maxFM :: Ord a => FiniteMap a b -> Maybe (a, b)
predFM :: Ord a => FiniteMap a b -> a -> Maybe (a, b)
succFM :: Ord a => FiniteMap a b -> a -> Maybe (a, b)
splitMinFM :: Ord a => FiniteMap a b -> Maybe (FiniteMap a b, (a, b))
combines splitFM and minFM
fmToList :: Ord a => FiniteMap a b -> [(a, b)]
Produced by Haddock version 0.8