Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
*internal.DoubleArrayBuilder
}
Builder represents builder of the dartsclone TRIE.
func NewBuilder ¶
func NewBuilder(progress ProgressFunction) *Builder
NewBuilder creates a builder of the dartsclone TRIE.
type ProgressFunction ¶
type ProgressFunction interface { // SetMaximum sets the maximum of the progress bar. SetMaximum(int) // Increment with increase the current count on the progress bar. Increment() }
ProgressFunction indicates progress bar of building double array.
type Trie ¶
type Trie interface { // ExactMatchSearch searches TRIE by a given keyword and returns the id and it's length if found. ExactMatchSearch(key string) (id, size int, err error) // CommonPrefixSearch finds keywords sharing common prefix in an input and returns the array of pairs (id and it's length) if found. CommonPrefixSearch(key string, offset int) ([][2]int, error) // CommonPrefixSearchCallback finds keywords sharing common prefix in an input and callback with id and it's length. CommonPrefixSearchCallback(key string, offset int, callback func(id, size int)) error }
Trie is the TRIE interface.
Directories ¶
Path | Synopsis |
---|---|
Package progressbar is a sample implementation of ProgressFunction interface.
|
Package progressbar is a sample implementation of ProgressFunction interface. |
Click to show internal directories.
Click to hide internal directories.