Copyright | (c) Uni Bremen 2006 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Common.InjMap
Description
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
the data type of injective maps
unsafeConstructInjMap :: Map a b -> Map b a -> InjMap a b Source #
for serialization only
member :: (Ord a, Ord b) => a -> b -> InjMap a b -> Bool Source #
check membership of an injective pair
insert :: (Ord a, Ord b) => a -> b -> InjMap a b -> InjMap a b Source #
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 Source #
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 Source #
look up the content at domain
lookupWithB :: (Ord a, Ord b) => b -> InjMap a b -> Maybe a Source #
look up the content at codomain
updateBWithA :: (Ord a, Ord b) => a -> b -> InjMap a b -> InjMap a b Source #
update codomain at domain value that must be defined
updateAWithB :: (Ord a, Ord b) => b -> a -> InjMap a b -> InjMap a b Source #
update domain at codomain value that must be defined