Skip to main content

Module trie

Module trie 

Source
Expand description

A flat, breadth-first trie stored as parallel arrays.

Children of a node are contiguous and always have larger indices than the node, so the structure has no cycles by construction.

Edges are labelled with symbols: the Unicode scalar values of the terms, one per char (see docs/design/unicode.md). For ASCII a symbol is the byte.

Structs§

Trie
A trie over strings, split into Unicode scalar values, with a weight per term.

Enums§

BuildError
Why a trie could not be built.

Constants§

NO_TERM
Value of Trie::term_id for nodes where no term ends.