Safe Haskell | None |
---|---|
Language | Haskell98 |
The module implements directed acyclic word graphs (DAWGs) internaly represented as /minimal acyclic deterministic finite-state automata/. The implementation provides a fast insert operation which can be used to build the DAWG structure incrementaly.
Alphabet symbols must have an Enum
instance; see Ord
if you look for a more generic solution.
- data DAWG a
- type ID = Int
- root :: DAWG a -> ID
- member :: Enum a => [a] -> DAWG a -> Bool
- numStates :: DAWG a -> Int
- numEdges :: DAWG a -> Int
- accept :: ID -> DAWG a -> Bool
- edges :: Enum a => ID -> DAWG a -> [(a, ID)]
- follow :: Enum a => ID -> a -> DAWG a -> Maybe ID
- empty :: DAWG a
- fromList :: Enum a => [[a]] -> DAWG a
- insert :: Enum a => [a] -> DAWG a -> DAWG a
- keys :: Enum a => DAWG a -> [[a]]