Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Data.DAWG.Trans
Description
The module provides an abstraction over transition maps from alphabet symbols to node identifiers.
Documentation
Abstraction over transition maps from alphabet symbols to node identifiers.
Methods
Empty transition map.
lookup :: Sym -> t -> Maybe ID Source #
Lookup sybol in the map.
index :: Sym -> t -> Maybe Int Source #
Find index of the symbol.
byIndex :: Int -> t -> Maybe (Sym, ID) Source #
Select a (symbol, ID) pair by index of its position in the map.
insert :: Sym -> ID -> t -> t Source #
Insert element to the transition map.
fromList :: [(Sym, ID)] -> t Source #
Construct transition map from a list.
toList :: t -> [(Sym, ID)] Source #
Translate transition map into a list.
Instances
Trans Trans Source # | |
Defined in Data.DAWG.Trans.Map | |
Trans Trans Source # | |
Defined in Data.DAWG.Trans.Vector | |
Trans t => Trans (Hashed t) Source # | |