|
Holumbus.Data.MultiMap | Portability | portable | Stability | experimental | Maintainer | Stefan Schmidt (stefanschmidt@web.de) |
|
|
|
Description |
Version : 0.1
This module provides a MultiMap, that means a Map, which can hold
multiple values for one key, but every distinct value is only stores once.
So adding the same key-value-pair twice will only create one new entry in
the map.
This Map is helpfull to examine how many different key-values-pairs you
have in your application.
Most of the functions are borrowed from Data.Map
|
|
Synopsis |
|
data MultiMap k a | | empty :: (Ord k, Ord a) => MultiMap k a | | null :: (Ord k, Ord a) => MultiMap k a -> Bool | | insert :: (Ord k, Ord a) => k -> a -> MultiMap k a -> MultiMap k a | | insertSet :: (Ord k, Ord a) => k -> Set a -> MultiMap k a -> MultiMap k a | | insertKeys :: (Ord k, Ord a) => [k] -> Set a -> MultiMap k a -> MultiMap k a | | lookup :: (Ord k, Ord a) => k -> MultiMap k a -> Set a | | keys :: (Ord k, Ord a) => MultiMap k a -> Set k | | elems :: (Ord k, Ord a) => MultiMap k a -> Set a | | filterElements :: (Ord k, Ord a) => [k] -> MultiMap k a -> Set a | | member :: (Ord k, Ord a) => k -> MultiMap k a -> Bool | | delete :: (Ord k, Ord a) => k -> Maybe a -> MultiMap k a -> MultiMap k a | | deleteKey :: (Ord k, Ord a) => k -> MultiMap k a -> MultiMap k a | | deleteElem :: (Ord k, Ord a) => k -> a -> MultiMap k a -> MultiMap k a | | deleteAllElems :: (Ord k, Ord a) => a -> MultiMap k a -> MultiMap k a | | fromList :: (Ord k, Ord a) => [(k, Set a)] -> MultiMap k a | | fromTupleList :: (Ord k, Ord a) => [(k, a)] -> MultiMap k a | | toList :: (Ord k, Ord a) => MultiMap k a -> [(k, Set a)] | | toAscList :: (Ord k, Ord a) => MultiMap k a -> [(k, Set a)] |
|
|
Documentation |
|
|
A MultiMap, it can hold more (different!!!) Elements for one key.
| Instances | |
|
|
|
The empty MultiMap.
|
|
|
Test, if the MultiMap is empty.
|
|
|
Inserts an element in the MultiMap.
|
|
|
Inserts multiple elements in a set to the MultiMap.
|
|
|
Inserts multiple keys with the same values.
|
|
|
Gets all different elements for one key or an empty set.
|
|
|
Get all different keys from the map.
|
|
|
Get all different values in the map without regarding their keys.
|
|
|
Like lookup keys, but an empty input list will give all elements back,
not the empty set.
|
|
|
Test, if a key is in the Map.
|
|
|
Deletes an Element from the Map, if the data in Nothing, the whole key is
deleted.
|
|
|
Deletes a whole key from the map.
|
|
|
Deletes a single Element from the map.
|
|
|
Deletes all Elements (*,a) (slow!!!).
|
|
|
Creates a MultiMap from a list of pairs (key,set value).
|
|
|
Creates a MultiMap from a list of tuples.
|
|
|
Transforms a MultiMap to a list of pairs (key,set value).
|
|
|
The same as toList, but the keys are in ascending order.
|
|
Produced by Haddock version 2.4.2 |