Copyright | (c) Uni Bremen 2006 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Injective maps
- data InjMap a b
- unsafeConstructInjMap :: Map a b -> Map b a -> InjMap a b
- getAToB :: InjMap a b -> Map a b
- getBToA :: InjMap a b -> Map b a
- empty :: InjMap a b
- member :: (Ord a, Ord b) => a -> b -> InjMap a b -> Bool
- insert :: (Ord a, Ord b) => a -> b -> InjMap a b -> InjMap a b
- delete :: (Ord a, Ord b) => a -> b -> InjMap a b -> InjMap a b
- deleteA :: (Ord a, Ord b) => a -> InjMap a b -> InjMap a b
- deleteB :: (Ord a, Ord b) => b -> InjMap a b -> InjMap a b
- lookupWithA :: (Ord a, Ord b) => a -> InjMap a b -> Maybe b
- lookupWithB :: (Ord a, Ord b) => b -> InjMap a b -> Maybe a
- updateBWithA :: (Ord a, Ord b) => a -> b -> InjMap a b -> InjMap a b
- updateAWithB :: (Ord a, Ord b) => b -> a -> InjMap a b -> InjMap a b
Documentation
data InjMap a b
the data type of injective maps
unsafeConstructInjMap :: Map a b -> Map b a -> InjMap a b
for serialization only
insert :: (Ord a, Ord b) => a -> b -> InjMap a b -> InjMap a b
insert a pair into the given injective map. An existing key and the corresponding content will be overridden.
delete :: (Ord a, Ord b) => a -> b -> InjMap a b -> InjMap a b
delete the pair with the given key in the injective map. Possibly two pairs may be deleted if the pair is not a member.
lookupWithA :: (Ord a, Ord b) => a -> InjMap a b -> Maybe b
look up the content at domain
lookupWithB :: (Ord a, Ord b) => b -> InjMap a b -> Maybe a
look up the content at codomain
updateBWithA :: (Ord a, Ord b) => a -> b -> InjMap a b -> InjMap a b
update codomain at domain value that must be defined
updateAWithB :: (Ord a, Ord b) => b -> a -> InjMap a b -> InjMap a b
update domain at codomain value that must be defined