Documentation
¶
Overview ¶
Package trie implements the trie data structure See https://en.wikipedia.org/wiki/Trie
Index ¶
- type Trie
- func (trie *Trie) Add(key string, value interface{}) (result *node.Node)
- func (trie Trie) Contains(key string) bool
- func (trie Trie) Find(key string) *node.Node
- func (trie *Trie) Remove(key string) bool
- func (trie Trie) Search(prefix string) (result []*node.Node)
- func (trie Trie) Traverse(fn Walker)
- func (trie Trie) Visit(current *node.Node, fn Walker)
- func (trie Trie) VisitAll(current *node.Node, fn Walker)
- func (trie *Trie) Yank(key string) bool
- type Walker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trie ¶
type Trie struct { // Root node Root *node.Node // Size of the trie (counting only the leafs) Size int }
Trie essential structure
Click to show internal directories.
Click to hide internal directories.