double

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator[T any] struct {
	Root *Node[T]
	Node *Node[T]
}

func (*Iterator[T]) Next

func (iterator *Iterator[T]) Next() bool

type List

type List[T any] struct {
	Head, Tail *Node[T]
}

func (*List[T]) Each

func (list *List[T]) Each(action func(data T) T)

func (*List[T]) Find

func (list *List[T]) Find(equal func(data, clue T) bool, clue T) (node *Node[T], found bool)

func (*List[T]) Iterator

func (list *List[T]) Iterator() Iterator[T]

func (*List[T]) PopHead

func (list *List[T]) PopHead() (data T, exists bool)

func (*List[T]) PopTail

func (list *List[T]) PopTail() (data T, exists bool)

func (*List[T]) PushHead

func (list *List[T]) PushHead(data T) *Node[T]

func (*List[T]) PushTail

func (list *List[T]) PushTail(data T) *Node[T]

type Node

type Node[T any] struct {
	Previous, Next *Node[T]
	Data           T
}

func (*Node[T]) Iterator

func (node *Node[T]) Iterator() Iterator[T]

func (*Node[T]) PopHead

func (node *Node[T]) PopHead(list *List[T]) bool

func (*Node[T]) PopTail

func (node *Node[T]) PopTail(list *List[T]) bool

func (*Node[T]) PushHead

func (node *Node[T]) PushHead(list *List[T])

func (*Node[T]) PushTail

func (node *Node[T]) PushTail(list *List[T])

func (*Node[T]) Remove

func (node *Node[T]) Remove(list *List[T])

Jump to

Keyboard shortcuts

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