strategy

package
Version: v0.0.0-...-cdad6b6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTrieNode

func NewTrieNode(char string) *trideNode

Types

type Element

type Element struct {
	Score float64
	Value interface{}
	// contains filtered or unexported fields
}

func (*Element) Next

func (e *Element) Next() *Element

type ListObj

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

func ListInstance

func ListInstance() *ListObj

func (*ListObj) Append

func (this *ListObj) Append(data interface{}) bool

尾部压入数据

func (*ListObj) Delete

func (this *ListObj) Delete(index uint) bool

func (*ListObj) Find

func (this *ListObj) Find(data interface{}) *Node

* * 查找链表中的元素

func (*ListObj) Get

func (this *ListObj) Get(index uint) *Node

func (*ListObj) Insert

func (this *ListObj) Insert(index uint, node *Node) bool

type Node

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

type NodeStruct

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

func NodeInstance

func NodeInstance(key []byte, value []byte) *NodeStruct

func (*NodeStruct) GetData

func (this *NodeStruct) GetData() []byte

func (*NodeStruct) GetName

func (this *NodeStruct) GetName() []byte

type SkipList

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

func New

func New() *SkipList

func (*SkipList) Delete

func (sl *SkipList) Delete(score float64) *Element

func (*SkipList) Front

func (sl *SkipList) Front() *Element

func (*SkipList) Insert

func (sl *SkipList) Insert(score float64, value interface{}) *Element

func (*SkipList) Search

func (sl *SkipList) Search(score float64) (element *Element, ok bool)

type TreeStruct

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

func TreeInstance

func TreeInstance() *TreeStruct

func (*TreeStruct) GetChildren

func (this *TreeStruct) GetChildren() []*TreeStruct

func (*TreeStruct) GetHight

func (this *TreeStruct) GetHight() int

func (*TreeStruct) GetNode

func (this *TreeStruct) GetNode() []*NodeStruct

func (*TreeStruct) GetParent

func (this *TreeStruct) GetParent() *TreeStruct

* *上一个节点

func (*TreeStruct) GetRoot

func (this *TreeStruct) GetRoot() *TreeStruct

func (*TreeStruct) IsLeaf

func (this *TreeStruct) IsLeaf() bool

func (*TreeStruct) IsRoot

func (this *TreeStruct) IsRoot() bool

func (*TreeStruct) SetChildren

func (this *TreeStruct) SetChildren(children *TreeStruct) *TreeStruct

func (*TreeStruct) SetHight

func (this *TreeStruct) SetHight(hight int) *TreeStruct

func (*TreeStruct) SetNode

func (this *TreeStruct) SetNode(node *NodeStruct) *TreeStruct

func (*TreeStruct) SetParent

func (this *TreeStruct) SetParent(tree *TreeStruct) *TreeStruct

type Trie

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

func NewTrie

func NewTrie() *Trie

func (*Trie) Find

func (t *Trie) Find(word string) bool

func (*Trie) Insert

func (t *Trie) Insert(word string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL