TernaryTrees-0.1.3.4: Efficient pure ternary tree Sets and Maps

Data.Set.StringSet.Internal

Synopsis

Documentation

data StringSet Source

StringSet is ternary tree. It is commonly used for storing word lists like dictionaries for spell checking etc.

Constructors

Node !Char !StringSet !StringSet !StringSet

Tree node

Null !StringSet

null nodes can only have a greater than branch by definition

End

a branch that doesnt contain anything

Instances

Eq StringSet 
Show StringSet 
Binary StringSet

A rather long Binary instance, that uses binary numbers to indicate where Ends are efficiently.

treeSize :: StringSet -> IntSource

Returns the number of non-Null Elems