Copyright | (c) DFKI GmbH 2011 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
supply total mappings from keys to sets of values based on Data.Map. Undefined keys are mapped to the empty set. An abstract data type is needed to avoid differences due to empty set values versus undefined map keys.
- rmNullSets :: Ord a => Map a (Set b) -> Map a (Set b)
- setLookup :: Ord a => a -> Map a (Set b) -> Set b
- setElems :: Ord b => Map a (Set b) -> Set b
- setMember :: (Ord a, Ord b) => a -> b -> Map a (Set b) -> Bool
- setInsert :: (Ord k, Ord a) => k -> a -> Map k (Set a) -> Map k (Set a)
- setAll :: (a -> Bool) -> Set a -> Bool
- setDifference :: Ord a => Set a -> Set a -> Maybe (Set a)
- setToMap :: Ord a => Set a -> Map a a
- restrict :: Ord k => Map k a -> Set k -> Map k a
- imageList :: Ord k => Map k a -> Set k -> [a]
- imageSet :: (Ord k, Ord a) => Map k a -> Set k -> Set a
- data MapSet a b
- toMap :: MapSet a b -> Map a (Set b)
- fromDistinctMap :: Map a (Set b) -> MapSet a b
- fromMap :: Ord a => Map a (Set b) -> MapSet a b
- empty :: MapSet a b
- null :: MapSet a b -> Bool
- fromList :: (Ord a, Ord b) => [(a, [b])] -> MapSet a b
- toList :: MapSet a b -> [(a, [b])]
- toPairList :: MapSet a b -> [(a, b)]
- keysSet :: MapSet a b -> Set a
- elems :: Ord b => MapSet a b -> Set b
- insert :: (Ord a, Ord b) => a -> b -> MapSet a b -> MapSet a b
- update :: (Ord a, Ord b) => (Set b -> Set b) -> a -> MapSet a b -> MapSet a b
- lookup :: Ord a => a -> MapSet a b -> Set b
- member :: (Ord a, Ord b) => a -> b -> MapSet a b -> Bool
- delete :: (Ord a, Ord b) => a -> b -> MapSet a b -> MapSet a b
- union :: (Ord a, Ord b) => MapSet a b -> MapSet a b -> MapSet a b
- difference :: (Ord a, Ord b) => MapSet a b -> MapSet a b -> MapSet a b
- intersection :: (Ord a, Ord b) => MapSet a b -> MapSet a b -> MapSet a b
- map :: (Ord b, Ord c) => (b -> c) -> MapSet a b -> MapSet a c
- mapMonotonic :: (b -> c) -> MapSet a b -> MapSet a c
- mapSet :: Ord a => (Set b -> Set c) -> MapSet a b -> MapSet a c
- foldWithKey :: (a -> b -> c -> c) -> c -> MapSet a b -> c
- filter :: (Ord a, Ord b) => (b -> Bool) -> MapSet a b -> MapSet a b
- partition :: (Ord a, Ord b) => (b -> Bool) -> MapSet a b -> (MapSet a b, MapSet a b)
- filterWithKey :: Ord a => (a -> Set b -> Bool) -> MapSet a b -> MapSet a b
- all :: Ord b => (b -> Bool) -> MapSet a b -> Bool
- isSubmapOf :: (Ord a, Ord b) => MapSet a b -> MapSet a b -> Bool
- preImage :: (Ord a, Ord b) => Map a b -> MapSet b a
- transpose :: (Ord a, Ord b) => MapSet a b -> MapSet b a
Documentation
setDifference :: Ord a => Set a -> Set a -> Maybe (Set a)
difference function for differenceWith, returns Nothing for empty sets
data MapSet a b
a map to non-empty sets
(Eq a, Eq b) => Eq (MapSet a b) | |
(Data a, Data b, Ord a, Ord b) => Data (MapSet a b) | |
(Ord a, Ord b) => Ord (MapSet a b) | |
(Ord a, Read a, Ord b, Read b) => Read (MapSet a b) | |
(Show a, Show b) => Show (MapSet a b) | |
(Ord a, ShATermConvertible a, Ord b, ShATermConvertible b) => ShATermConvertible (MapSet a b) | |
Typeable (* -> * -> *) MapSet |
fromDistinctMap :: Map a (Set b) -> MapSet a b
unsafe variant of fromMap (without removal of empty sets)
fromMap :: Ord a => Map a (Set b) -> MapSet a b
remove empty values from the map before applying wrapping constructor
toPairList :: MapSet a b -> [(a, b)]
update :: (Ord a, Ord b) => (Set b -> Set b) -> a -> MapSet a b -> MapSet a b
update an element set under the given key
mapMonotonic :: (b -> c) -> MapSet a b -> MapSet a c
unsafe map a function to all elements
foldWithKey :: (a -> b -> c -> c) -> c -> MapSet a b -> c
fold over all elements