Documentation ¶
Overview ¶
doubly linked list
Index ¶
- type Dllist
- func (l *Dllist[T]) Back() *Element[T]
- func (l *Dllist[T]) Clear() *Dllist[T]
- func (l *Dllist[T]) Front() *Element[T]
- func (l *Dllist[T]) Get(i int) *Element[T]
- func (l *Dllist[T]) InsertAfter(v T, mark *Element[T]) *Element[T]
- func (l *Dllist[T]) InsertBefore(v T, mark *Element[T]) *Element[T]
- func (l *Dllist[T]) Len() int
- func (l *Dllist[T]) MoveAfter(e, mark *Element[T])
- func (l *Dllist[T]) MoveBefore(e, mark *Element[T])
- func (l *Dllist[T]) MoveToBack(e *Element[T])
- func (l *Dllist[T]) MoveToFront(e *Element[T])
- func (l *Dllist[T]) PushBack(v T) *Element[T]
- func (l *Dllist[T]) PushBackList(other *Dllist[T])
- func (l *Dllist[T]) PushBackListTo(other *Dllist[T], mark *Element[T])
- func (l *Dllist[T]) PushFront(v T) *Element[T]
- func (l *Dllist[T]) PushFrontList(other *Dllist[T])
- func (l *Dllist[T]) PushFrontListTo(other *Dllist[T], mark *Element[T])
- func (l *Dllist[T]) Range(f func(e *Element[T]) (Continue bool)) (RangeAll bool)
- func (l *Dllist[T]) Remove(e *Element[T]) T
- func (l *Dllist[T]) Slice() []T
- func (l *Dllist[T]) Sort(cmpLess func(T, T) bool)
- func (l *Dllist[T]) Swap(a, b *Element[T])
- type DllistConf
- type Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dllist ¶
type Dllist[Item any] struct { // contains filtered or unexported fields }
Dllist represents a doubly linked list.
func (*Dllist[T]) InsertAfter ¶
func (*Dllist[T]) InsertBefore ¶
func (*Dllist[T]) MoveBefore ¶
func (*Dllist[T]) MoveToBack ¶
func (*Dllist[T]) MoveToFront ¶
func (*Dllist[T]) PushBackList ¶
func (*Dllist[T]) PushBackListTo ¶
func (*Dllist[T]) PushFrontList ¶
func (*Dllist[T]) PushFrontListTo ¶
type DllistConf ¶
type Element ¶
type Element[Item any] struct { Value Item // contains filtered or unexported fields }
func (*Element[T]) InsertAfter ¶
func (*Element[T]) InsertBefore ¶
Click to show internal directories.
Click to hide internal directories.