clonable

package
v0.0.0-...-5b643b5 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element[T any] struct {
	// contains filtered or unexported fields
}

func (Element[T]) Backward

func (e Element[T]) Backward() iter.Seq[Element[T]]

func (Element[T]) Forward

func (e Element[T]) Forward() iter.Seq[Element[T]]

func (Element[T]) Get

func (e Element[T]) Get() T

func (Element[T]) Next

func (e Element[T]) Next() Element[T]

func (Element[T]) Ok

func (e Element[T]) Ok() bool

func (Element[T]) Prev

func (e Element[T]) Prev() Element[T]

func (Element[T]) Set

func (e Element[T]) Set(t T)

func (Element[T]) Unwrap

func (e Element[T]) Unwrap() *list.Element

func (Element[T]) ValuesBackward

func (e Element[T]) ValuesBackward() iter.Seq[T]

func (Element[T]) ValuesForward

func (e Element[T]) ValuesForward() iter.Seq[T]

type List

type List[T any] struct {
	// contains filtered or unexported fields
}

func NewList

func NewList[T any]() List[T]

func (List[T]) Back

func (l List[T]) Back() Element[T]

func (List[T]) CloneFunc

func (l List[T]) CloneFunc(cloneT func(T) T) List[T]

func (List[T]) Front

func (l List[T]) Front() Element[T]

func (List[T]) Init

func (l List[T]) Init() List[T]

func (List[T]) InsertAfter

func (l List[T]) InsertAfter(v T, mark Element[T]) Element[T]

func (List[T]) InsertBefore

func (l List[T]) InsertBefore(v T, mark Element[T]) Element[T]

func (List[T]) Len

func (l List[T]) Len() int

func (List[T]) MoveAfter

func (l List[T]) MoveAfter(e Element[T], mark Element[T])

func (List[T]) MoveBefore

func (l List[T]) MoveBefore(e Element[T], mark Element[T])

func (List[T]) MoveToBack

func (l List[T]) MoveToBack(e Element[T])

func (List[T]) MoveToFront

func (l List[T]) MoveToFront(e Element[T])

func (List[T]) PushBack

func (l List[T]) PushBack(v T) Element[T]

func (List[T]) PushBackList

func (l List[T]) PushBackList(other List[T])

func (List[T]) PushFront

func (l List[T]) PushFront(v T) Element[T]

func (List[T]) PushFrontList

func (l List[T]) PushFrontList(other List[T])

func (List[T]) Remove

func (l List[T]) Remove(e Element[T]) T

func (List[T]) Unwrap

func (l List[T]) Unwrap() *list.List

type Ring

type Ring[T any] struct {
	// contains filtered or unexported fields
}

func NewRing

func NewRing[T any](n int) Ring[T]

func (Ring[T]) Backward

func (r Ring[T]) Backward() iter.Seq[Ring[T]]

func (Ring[T]) CloneFunc

func (r Ring[T]) CloneFunc(cloneT func(T) T) Ring[T]

func (Ring[T]) Do

func (r Ring[T]) Do(f func(T))

func (Ring[T]) Forward

func (r Ring[T]) Forward() iter.Seq[Ring[T]]

func (Ring[T]) Get

func (l Ring[T]) Get() T

func (Ring[T]) Len

func (r Ring[T]) Len() int
func (r Ring[T]) Link(s Ring[T]) Ring[T]

func (Ring[T]) Move

func (r Ring[T]) Move(n int) Ring[T]

func (Ring[T]) Next

func (r Ring[T]) Next() Ring[T]

func (Ring[T]) Prev

func (r Ring[T]) Prev() Ring[T]

func (Ring[T]) Set

func (l Ring[T]) Set(t T)
func (r Ring[T]) Unlink(n int) Ring[T]

func (Ring[T]) Unwrap

func (l Ring[T]) Unwrap() *ring.Ring

func (Ring[T]) ValuesBackward

func (r Ring[T]) ValuesBackward() iter.Seq[T]

func (Ring[T]) ValuesForward

func (r Ring[T]) ValuesForward() iter.Seq[T]

type SliceHeap

type SliceHeap[T any] struct {
	Interface SliceInterface[T]
}

func (SliceHeap[T]) CloneFunc

func (h SliceHeap[T]) CloneFunc(cloneT func(T) T) SliceHeap[T]

func (*SliceHeap[T]) Fix

func (h *SliceHeap[T]) Fix(i int)

func (*SliceHeap[T]) Init

func (h *SliceHeap[T]) Init()

func (*SliceHeap[T]) Pop

func (h *SliceHeap[T]) Pop() T

func (*SliceHeap[T]) Push

func (h *SliceHeap[T]) Push(t T)

func (*SliceHeap[T]) Remove

func (h *SliceHeap[T]) Remove(i int) T

type SliceInterface

type SliceInterface[T any] struct {
	Cmp   func(i, j T) int
	Hooks SliceInterfaceHooks[T]
	Slice []T
}

func (SliceInterface[T]) CloneFunc

func (s SliceInterface[T]) CloneFunc(cloneT func(T) T) SliceInterface[T]

func (*SliceInterface[T]) Len

func (s *SliceInterface[T]) Len() int

func (*SliceInterface[T]) Less

func (s *SliceInterface[T]) Less(i int, j int) bool

func (*SliceInterface[T]) Pop

func (s *SliceInterface[T]) Pop() any

func (*SliceInterface[T]) Push

func (s *SliceInterface[T]) Push(x any)

func (*SliceInterface[T]) Swap

func (s *SliceInterface[T]) Swap(i int, j int)

type SliceInterfaceHooks

type SliceInterfaceHooks[T any] struct {
	Pop  func(iface *SliceInterface[T], beingPopped *T)
	Push func(iface *SliceInterface[T], beingPushed *T)
	Swap func(iface *SliceInterface[T], i, j int)
}

Jump to

Keyboard shortcuts

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