Safe Haskell | None |
---|
- type DAWGD a b = DAWG a (Maybe b)
- data DAWG a b = DAWG {}
- fromTrie :: (Ord a, Ord b) => Trie a b -> DAWG a b
- fromDAWG :: Ord a => DAWG a b -> Trie a b
- size :: DAWG a b -> Int
- row :: DAWG a b -> Int -> Row a b
- data Row a b = Row {}
- entry :: DAWG a (Maybe b) -> [Int] -> Maybe ([a], b)
- charOn :: DAWG a b -> (Int, Int) -> Maybe a
- valueIn :: DAWG a b -> Int -> b
- edges :: DAWG a b -> Int -> [(a, Int)]
- edgeOn :: Eq a => DAWG a b -> Int -> a -> Maybe Int
- serialize :: Ord a => DAWG a b -> [Node a b]
- deserialize :: Ord a => [Node a b] -> DAWG a b
Documentation
A directed acyclic word graph with character type a
and dictionary
entry type b
.
fromTrie :: (Ord a, Ord b) => Trie a b -> DAWG a bSource
Find and eliminate all common subtries in the input trie and return the trie represented as a DAWG.
fromDAWG :: Ord a => DAWG a b -> Trie a bSource
Transform the DAWG to implicit DAWG in a form of a trie.
A Row represents one node of the DAWG.
deserialize :: Ord a => [Node a b] -> DAWG a bSource
Assumptiom: root node is last in the serialization list.