link

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DLink struct {

	// 自动扩容
	AutoLen bool
	// 返回被循环链表覆盖的值
	OnCover func(value interface{})
	// contains filtered or unexported fields
}
func NewDLink() *DLink

双向循环链表

func (*DLink) AddNode

func (l *DLink) AddNode(n int64)

AddNode 扩容

func (*DLink) Cap

func (l *DLink) Cap() int64

func (*DLink) DelNode

func (l *DLink) DelNode(n int64) error

DelNode 缩容

func (*DLink) Len

func (l *DLink) Len() int64

func (*DLink) Peek

func (l *DLink) Peek() interface{}

func (*DLink) Pull

func (l *DLink) Pull() (v interface{})

func (*DLink) Push

func (l *DLink) Push(value interface{})

func (*DLink) Range

func (l *DLink) Range() (out []interface{})

func (*DLink) Size

func (l *DLink) Size(size int64) error

type Node

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

Jump to

Keyboard shortcuts

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