trie

package
v0.0.0-...-03d6fc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trie

type Trie struct {
	// contains filtered or unexported fields
}

Trie is a struct used for efficient searching on sets of strings.

func New

func New() *Trie

New returns a Trie instance.

func (*Trie) Delete

func (t *Trie) Delete(strs []string, data interface{})

Delete removes the data from the trie.

func (*Trie) Insert

func (t *Trie) Insert(strs []string, data interface{})

Insert inserts the data into the trie with the given string keys.

func (*Trie) Search

func (t *Trie) Search(strs []string) []interface{}

Search returns all inserted data which exactly matches the given string keys.

func (*Trie) SearchSubset

func (t *Trie) SearchSubset(strs []string) []interface{}

SearchSubset returns all inserted data which matches a subset of the given string keys.

func (*Trie) String

func (t *Trie) String() string

String returns a string representation of the Trie.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL