mysort

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 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 Fifo

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

Fifo 先进先出排序(去重)

func (*Fifo) Add

func (b *Fifo) Add(item interface{})

func (*Fifo) EqualAt

func (b *Fifo) EqualAt(item interface{}) int

EqualAt 获取相等位置下标,不重复返回-1

func (*Fifo) GetItems

func (b *Fifo) GetItems() interface{}

GetItems 获取

func (*Fifo) Gets

func (f *Fifo) Gets() []interface{}

Gets 获取

func (*Fifo) Insert

func (b *Fifo) Insert(item interface{}, i int)

Insert 插入元素

func (*Fifo) Push

func (f *Fifo) Push(item interface{})

Push 推送

func (*Fifo) PushBack

func (b *Fifo) PushBack(item interface{})

PushBack 尾部添加数据

func (*Fifo) PushFront

func (b *Fifo) PushFront(item interface{})

PushFront 头部添加数据

func (*Fifo) PushGrab

func (f *Fifo) PushGrab(item interface{})

PushGrab 推送(重复插位到尾部)

func (*Fifo) Replace

func (b *Fifo) Replace(item interface{}, i int)

Replace 替换

func (*Fifo) ReplaceBack

func (b *Fifo) ReplaceBack(item interface{}, i int)

ReplaceBack 替换i位置且将item插入到头尾部

func (*Fifo) ReplaceFront

func (b *Fifo) ReplaceFront(item interface{}, i int)

ReplaceFront 替换i位置且将item插入到头部

type Lifo

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

Lifo 先进后出排序(去重)

func (*Lifo) Add

func (b *Lifo) Add(item interface{})

func (*Lifo) EqualAt

func (b *Lifo) EqualAt(item interface{}) int

EqualAt 获取相等位置下标,不重复返回-1

func (*Lifo) GetItems

func (b *Lifo) GetItems() interface{}

GetItems 获取

func (*Lifo) Gets

func (f *Lifo) Gets() []interface{}

Gets 获取

func (*Lifo) Insert

func (b *Lifo) Insert(item interface{}, i int)

Insert 插入元素

func (*Lifo) Push

func (f *Lifo) Push(item interface{})

Push 推送(重复抛弃)

func (*Lifo) PushBack

func (b *Lifo) PushBack(item interface{})

PushBack 尾部添加数据

func (*Lifo) PushFront

func (b *Lifo) PushFront(item interface{})

PushFront 头部添加数据

func (*Lifo) PushGrab

func (f *Lifo) PushGrab(item interface{})

PushGrab 推送(去重插位到头部)

func (*Lifo) Replace

func (b *Lifo) Replace(item interface{}, i int)

Replace 替换

func (*Lifo) ReplaceBack

func (b *Lifo) ReplaceBack(item interface{}, i int)

ReplaceBack 替换i位置且将item插入到头尾部

func (*Lifo) ReplaceFront

func (b *Lifo) ReplaceFront(item interface{}, i int)

ReplaceFront 替换i位置且将item插入到头部

Jump to

Keyboard shortcuts

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