trie

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element interface{}

type Node

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

func NewNode

func NewNode(e Element, parent *Node) *Node

func (*Node) AddChild

func (this *Node) AddChild(e Element) *Node

func (*Node) AddChildNode

func (this *Node) AddChildNode(child *Node)

func (*Node) Attr

func (this *Node) Attr() NodeAttr

func (*Node) ChildSize

func (this *Node) ChildSize() int

func (*Node) Children

func (this *Node) Children() []*Node

func (*Node) FirstChild

func (this *Node) FirstChild() *Node

func (*Node) Next

func (this *Node) Next() *Node

func (*Node) Parent

func (this *Node) Parent() *Node

func (*Node) RemoveChild

func (this *Node) RemoveChild(index int)

func (*Node) SetAttr

func (this *Node) SetAttr(attr NodeAttr)

func (*Node) Value

func (this *Node) Value() Element

type NodeAttr

type NodeAttr interface{}

type Trie

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

func NewTrie

func NewTrie(words []string) *Trie

func (*Trie) Add

func (this *Trie) Add(word string)

func (*Trie) AddWords

func (this *Trie) AddWords(words []string)

func (*Trie) AutoComplete

func (this *Trie) AutoComplete(word string) (add string, match bool, fullmatch bool)

func (*Trie) AutoCompleteList

func (this *Trie) AutoCompleteList(word string) (addlist []string, match bool)

func (*Trie) Match

func (this *Trie) Match(word string) bool

Jump to

Keyboard shortcuts

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