Documentation
¶
Overview ¶
The trie package implements a trie (prefix tree) data structure over byte slices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
The Node abstraction is provided to allow for simple walking and inspection of the trie. It represents a single vertex of the logical trie structure.
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
The core trie data structure.
func (*Trie) Add ¶
Add a []byte to a trie. The return value indicates whether s was added to the trie -- it is true if s was not already present; false otherwise.
func (*Trie) ChildrenWithPrefix ¶
Return all keys in the trie beginning with a certain prefix.
Click to show internal directories.
Click to hide internal directories.