Hets - the Heterogeneous Tool Set

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

Common.InjMap

Description

Injective maps

Synopsis

Documentation

data InjMap a b Source #

the data type of injective maps

Instances

(Eq b, Eq a) => Eq (InjMap a b) Source # 

Methods

(==) :: InjMap a b -> InjMap a b -> Bool

(/=) :: InjMap a b -> InjMap a b -> Bool

(Ord b, Ord a, Data b, Data a) => Data (InjMap a b) Source # 

Methods

gfoldl :: (forall d c. Data d => c (d -> c) -> d -> c c) -> (forall g. g -> c g) -> InjMap a b -> c (InjMap a b)

gunfold :: (forall c r. Data c => c (c -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (InjMap a b)

toConstr :: InjMap a b -> Constr

dataTypeOf :: InjMap a b -> DataType

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (InjMap a b))

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (InjMap a b))

gmapT :: (forall c. Data c => c -> c) -> InjMap a b -> InjMap a b

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InjMap a b -> r

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InjMap a b -> r

gmapQ :: (forall d. Data d => d -> u) -> InjMap a b -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> InjMap a b -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InjMap a b -> m (InjMap a b)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InjMap a b -> m (InjMap a b)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InjMap a b -> m (InjMap a b)

(Ord b, Ord a) => Ord (InjMap a b) Source # 

Methods

compare :: InjMap a b -> InjMap a b -> Ordering

(<) :: InjMap a b -> InjMap a b -> Bool

(<=) :: InjMap a b -> InjMap a b -> Bool

(>) :: InjMap a b -> InjMap a b -> Bool

(>=) :: InjMap a b -> InjMap a b -> Bool

max :: InjMap a b -> InjMap a b -> InjMap a b

min :: InjMap a b -> InjMap a b -> InjMap a b

(Show b, Show a) => Show (InjMap a b) Source # 

Methods

showsPrec :: Int -> InjMap a b -> ShowS

show :: InjMap a b -> String

showList :: [InjMap a b] -> ShowS

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

for serialization only

getAToB :: InjMap a b -> Map a b Source #

the actual injective map

getBToA :: InjMap a b -> Map b a Source #

the inverse map

empty :: InjMap a b Source #

get an empty injective map

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.

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

delete domain entry

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

delete codomain entry

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