Documentation ¶
Index ¶
- func Greater[T cmp.Ordered](d []T, i, j int) bool
- func Less[T cmp.Ordered](d []T, i, j int) bool
- type Heap
- type LessFunc
- type Stateless
- func (h Stateless[T]) Del(d []T, i int, less LessFunc[T]) []T
- func (h Stateless[T]) Down(d []T, i int, less LessFunc[T]) bool
- func (h Stateless[T]) Fix(d []T, i int, less LessFunc[T]) bool
- func (h Stateless[T]) Init(d []T, less LessFunc[T]) bool
- func (h Stateless[T]) Pop(d []T, less LessFunc[T]) (T, []T)
- func (h Stateless[T]) PopFrom(d *[]T, less LessFunc[T]) T
- func (h Stateless[T]) Push(d []T, e T, less LessFunc[T]) []T
- func (h Stateless[T]) PushTo(d *[]T, e T, less LessFunc[T])
- func (h Stateless[T]) Up(d []T, i int, less LessFunc[T]) bool
- type StatelessSwap
- func (h StatelessSwap[T]) Del(d []T, i int, less LessFunc[T], swap SwapFunc[T]) []T
- func (h StatelessSwap[T]) Down(d []T, i int, less LessFunc[T], swap SwapFunc[T]) bool
- func (h StatelessSwap[T]) Fix(d []T, i int, less LessFunc[T], swap SwapFunc[T]) bool
- func (h StatelessSwap[T]) Init(d []T, less LessFunc[T], swap SwapFunc[T]) bool
- func (h StatelessSwap[T]) Pop(d []T, less LessFunc[T], swap SwapFunc[T]) (T, []T)
- func (h StatelessSwap[T]) PopFrom(d *[]T, less LessFunc[T], swap SwapFunc[T]) T
- func (h StatelessSwap[T]) Push(d []T, e T, less LessFunc[T], swap SwapFunc[T]) []T
- func (h StatelessSwap[T]) PushTo(d *[]T, e T, less LessFunc[T], swap SwapFunc[T])
- func (h StatelessSwap[T]) Up(d []T, i int, less LessFunc[T], swap SwapFunc[T]) bool
- type SwapFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Heap ¶
type StatelessSwap ¶
type StatelessSwap[T any] struct{}
func (StatelessSwap[T]) Pop ¶
func (h StatelessSwap[T]) Pop(d []T, less LessFunc[T], swap SwapFunc[T]) (T, []T)
func (StatelessSwap[T]) PopFrom ¶
func (h StatelessSwap[T]) PopFrom(d *[]T, less LessFunc[T], swap SwapFunc[T]) T
func (StatelessSwap[T]) Push ¶
func (h StatelessSwap[T]) Push(d []T, e T, less LessFunc[T], swap SwapFunc[T]) []T
Click to show internal directories.
Click to hide internal directories.