list

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DuplexList

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

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/28 17:03
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func NewDuplexList

func NewDuplexList(options ...C.Options) *DuplexList

func (*DuplexList) Clear

func (m *DuplexList) Clear()

func (*DuplexList) Delete

func (m *DuplexList) Delete(node *Node)

func (*DuplexList) DeleteIndex

func (m *DuplexList) DeleteIndex(int)

func (*DuplexList) Equals

func (m *DuplexList) Equals(node *Node)

func (*DuplexList) GetAttribute

func (m *DuplexList) GetAttribute() *C.Attribute

func (*DuplexList) Insert

func (m *DuplexList) Insert(node ...*Node)

func (*DuplexList) InsertIndex

func (m *DuplexList) InsertIndex(index int, nodes ...*Node)

func (*DuplexList) Size

func (m *DuplexList) Size() int

func (*DuplexList) ValueSet

func (m *DuplexList) ValueSet() []interface{}

type LFUCache

type LFUCache struct {
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/28 17:19
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 最近最少使用算法
  • LFU,Least Frequently Used
  • LFU相对于LRU而言,多了一个频率统计 *

func NewLFUCache

func NewLFUCache() *LFUCache

func (*LFUCache) Clear

func (m *LFUCache) Clear()

func (*LFUCache) Delete

func (m *LFUCache) Delete(key interface{})

func (*LFUCache) Get

func (m *LFUCache) Get(key interface{}) interface{}

func (*LFUCache) GetAttribute

func (m *LFUCache) GetAttribute() *C.Attribute

func (*LFUCache) Length

func (m *LFUCache) Length() int

func (*LFUCache) Set

func (m *LFUCache) Set(key, value interface{})

type LRUCache

type LRUCache struct {
	LimitSize int
	// contains filtered or unexported fields
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/28 17:19
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 最近最久未使用算法
  • LRU: The Least Recently Used *

func NewLRUCache

func NewLRUCache(options ...C.Options) *LRUCache

func (*LRUCache) Clear

func (m *LRUCache) Clear()

func (*LRUCache) Delete

func (m *LRUCache) Delete(key interface{})

func (*LRUCache) Get

func (m *LRUCache) Get(key interface{}) interface{}

func (*LRUCache) GetAttribute

func (m *LRUCache) GetAttribute() *C.Attribute

func (*LRUCache) Length

func (m *LRUCache) Length() int

func (*LRUCache) Set

func (m *LRUCache) Set(key, value interface{})

type LastKRecursion

type LastKRecursion struct {
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/7/6 23:31
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*LastKRecursion) Delete

func (m *LastKRecursion) Delete(root *Node, k int) *Node

func (*LastKRecursion) FindMethod

func (m *LastKRecursion) FindMethod(root *Node, k int) *Node

func (*LastKRecursion) GetAttribute

func (m *LastKRecursion) GetAttribute() *C.Attribute

type LastKTwoPoint

type LastKTwoPoint struct {
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/7/6 23:31
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*LastKTwoPoint) Delete

func (m *LastKTwoPoint) Delete(root *Node, k int) *Node

func (*LastKTwoPoint) FindMethod

func (m *LastKTwoPoint) FindMethod(root *Node, k int) *Node

func (*LastKTwoPoint) GetAttribute

func (m *LastKTwoPoint) GetAttribute() *C.Attribute

type Node

type Node struct {
	Key   interface{}
	Value interface{}

	Pre  *Node
	Next *Node

	Left  *Node
	Right *Node

	Parent *Node
	Down   *Node
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/28 16:43
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*Node) Array2Node

func (m *Node) Array2Node(array []int) *Node

func (*Node) Equals

func (m *Node) Equals(a, b *Node) bool

func (*Node) Node2Array

func (m *Node) Node2Array(root *Node) []int

func (*Node) TreeEquals

func (m *Node) TreeEquals(a, b *Node) bool

type SimplexList

type SimplexList struct {
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/28 17:03
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*SimplexList) Clear

func (m *SimplexList) Clear()

func (*SimplexList) Delete

func (m *SimplexList) Delete(*Node)

func (*SimplexList) DeleteIndex

func (m *SimplexList) DeleteIndex(index int)

func (*SimplexList) Equals

func (m *SimplexList) Equals(*Node)

func (*SimplexList) GetAttribute

func (m *SimplexList) GetAttribute() *C.Attribute

func (*SimplexList) Insert

func (m *SimplexList) Insert(...*Node)

func (*SimplexList) InsertIndex

func (m *SimplexList) InsertIndex(index int, node ...*Node)

func (*SimplexList) Size

func (m *SimplexList) Size() int

func (*SimplexList) ValueSet

func (m *SimplexList) ValueSet() []interface{}

type SkipList

type SkipList struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/28 17:03
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 跳表 *

func NewSkipList

func NewSkipList() *SkipList

func (*SkipList) Clear

func (m *SkipList) Clear()

func (*SkipList) Delete

func (m *SkipList) Delete(node *Node)

func (*SkipList) DeleteIndex

func (m *SkipList) DeleteIndex(index int)

func (*SkipList) Equals

func (m *SkipList) Equals(node *Node)

func (*SkipList) GetAttribute

func (m *SkipList) GetAttribute() *C.Attribute

func (*SkipList) Insert

func (m *SkipList) Insert(node ...*Node)

func (*SkipList) InsertIndex

func (m *SkipList) InsertIndex(index int, node ...*Node)

func (*SkipList) Size

func (m *SkipList) Size() int

func (*SkipList) SortMethod

func (m *SkipList) SortMethod(array []int)

func (*SkipList) ValueSet

func (m *SkipList) ValueSet() []interface{}

Jump to

Keyboard shortcuts

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