Hets - the Heterogeneous Tool Set

Copyright(c) Uni Bremen 2006
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred

Common.InjMap

Description

Injective maps

Synopsis

Documentation

data InjMap a b

the data type of injective maps

Instances

(Eq a, Eq b) => Eq (InjMap a b) 
(Data a, Data b, Ord a, Ord b) => Data (InjMap a b) 
(Ord a, Ord b) => Ord (InjMap a b) 
(Show a, Show b) => Show (InjMap a b) 
(Ord a, ShATermConvertible a, Ord b, ShATermConvertible b) => ShATermConvertible (InjMap a b) 
Typeable (* -> * -> *) InjMap 

unsafeConstructInjMap :: Map a b -> Map b a -> InjMap a b

for serialization only

getAToB :: InjMap a b -> Map a b

the actual injective map

getBToA :: InjMap a b -> Map b a

the inverse map

empty :: InjMap a b

get an empty injective map

member :: (Ord a, Ord b) => a -> b -> InjMap a b -> Bool

check membership of an injective pair

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.

deleteA :: (Ord a, Ord b) => a -> InjMap a b -> InjMap a b

delete domain entry

deleteB :: (Ord a, Ord b) => b -> InjMap a b -> InjMap a b

delete codomain entry

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