Documentation
¶
Index ¶
- type Circular
- func (node *Circular[T]) AddToAfter(data T, which T, equals func(T, T) bool)
- func (node *Circular[T]) AddToEnd(data T)
- func (node *Circular[T]) AddToSequentially(data T, less func(T, T) bool)
- func (node *Circular[T]) AddToStart(data T)
- func (node *Circular[T]) Delete(data T, equals func(T, T) bool) error
- func (node *Circular[T]) List() []T
- func (node *Circular[T]) Print()
- type Double
- func (node *Double[T]) AddToAfter(data T, which T, equals func(T, T) bool)
- func (node *Double[T]) AddToEnd(data T)
- func (node *Double[T]) AddToSequentially(data T, less func(T, T) bool)
- func (node *Double[T]) AddToStart(data T)
- func (node *Double[T]) Delete(data T, equals func(T, T) bool) error
- func (node *Double[T]) List(reverse bool) []T
- func (node *Double[T]) Print(reverse bool)
- type Linear
- func (node *Linear[T]) AddToAfter(data T, which T, equals func(T, T) bool) error
- func (node *Linear[T]) AddToEnd(data T)
- func (node *Linear[T]) AddToSequentially(data T, less func(T, T) bool)
- func (node *Linear[T]) AddToStart(data T)
- func (node *Linear[T]) Delete(data T, equals func(T, T) bool) error
- func (node *Linear[T]) List() []T
- func (node *Linear[T]) Print()
- func (node *Linear[T]) Search(data T, equals func(T, T) bool) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Circular ¶
Circular represents a generic circular linked list
func NewCircular ¶ added in v1.2.0
NewCircular creates a new generic circular linked list node
func (*Circular[T]) AddToAfter ¶ added in v1.2.0
AddToAfter adds data after the specified value
func (*Circular[T]) AddToEnd ¶ added in v1.2.0
func (node *Circular[T]) AddToEnd(data T)
AddToEnd adds data at the end of the list
func (*Circular[T]) AddToSequentially ¶ added in v1.2.0
AddToSequentially adds data in sorted order
func (*Circular[T]) AddToStart ¶ added in v1.2.0
func (node *Circular[T]) AddToStart(data T)
AddToStart adds data at the beginning of the list
type Double ¶
type Double[T any] struct { X T Next *Double[T] Prev *Double[T] // contains filtered or unexported fields }
Double represents a generic double linked list
func (*Double[T]) AddToAfter ¶ added in v1.2.0
AddToAfter adds data after the specified value
func (*Double[T]) AddToEnd ¶ added in v1.2.0
func (node *Double[T]) AddToEnd(data T)
AddToEnd adds data at the end of the list
func (*Double[T]) AddToSequentially ¶ added in v1.2.0
AddToSequentially adds data in sorted order
func (*Double[T]) AddToStart ¶ added in v1.2.0
func (node *Double[T]) AddToStart(data T)
AddToStart adds data at the beginning of the list
type Linear ¶
Linear represents a generic linear linked list
func (*Linear[T]) AddToAfter ¶ added in v1.2.0
AddToAfter adds data after the specified value
func (*Linear[T]) AddToEnd ¶ added in v1.2.0
func (node *Linear[T]) AddToEnd(data T)
AddToEnd adds data at the end of the list
func (*Linear[T]) AddToSequentially ¶ added in v1.2.0
AddToSequentially adds data in sorted order
func (*Linear[T]) AddToStart ¶ added in v1.2.0
func (node *Linear[T]) AddToStart(data T)
AddToStart adds data at the beginning of the list