trie

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 0 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 datastructure.

func NewTrie

func NewTrie() *Trie

NewTrie returns Trie.

func (*Trie) Add

func (t *Trie) Add(prefix []byte, id uint64)

Add adds the id in the trie for the given prefix path.

func (*Trie) Delete

func (t *Trie) Delete(index []byte, id uint64)

Delete will delete the id if the id exist in the given index path.

func (*Trie) Get

func (t *Trie) Get(key []byte) map[uint64]struct{}

Get returns prefix matched ids for the given key.

Jump to

Keyboard shortcuts

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