Portability | not portable |
---|---|
Stability | experimental |
Maintainer | Uwe Schmidt (uwe@fh-wedel.de) |
Safe Haskell | None |
A simplified version of PrefixTree for implementing sets.
There is one important difference to the PrefixTree implementation: The fields are not marked to be strict. This enables building the set on the fly.
This feature is used in fuzzy search, when an index tree is restricted to a set of keys, e.g. the set of all none case significant keys
- data PrefixSet
- emptyPS :: PrefixSet
- elemPS :: PrefixSet -> PrefixSet
- elem0PS :: PrefixSet
- nextPS :: Sym -> PrefixSet -> PrefixSet -> PrefixSet
- lastPS :: Sym -> PrefixSet -> PrefixSet
- nullPS :: PrefixSet -> Bool
- singlePS :: Key -> PrefixSet
- prefixPS :: Key -> PrefixSet
- unionPS :: PrefixSet -> PrefixSet -> PrefixSet
- foldPS :: (Key -> b -> b) -> b -> (Key -> Key) -> PrefixSet -> b
- foldWithKeyPS :: (Key -> b -> b) -> b -> PrefixSet -> b
- elemsPS :: PrefixSet -> [Key]
- fuzzyCharPS :: (Sym -> [Sym]) -> PrefixSet -> PrefixSet
- fuzzyCharsPS :: (Sym -> [Key]) -> PrefixSet -> PrefixSet
Documentation
Set of strings implemented as lazy prefix tree.
type PrefixSet = PrefixTree ()
is not feasable because of the strict fields in the PrefixTree definition
foldWithKeyPS :: (Key -> b -> b) -> b -> PrefixSet -> bSource