Documentation
¶
Index ¶
- func AdjustDown[T any](heap []T, i int, cmp cmp.CompareFunc[T])
- func AdjustUp[T any](heap []T, i int, cmp cmp.CompareFunc[T])
- func Down[T any](heap []T, i0, n int, cmp cmp.CompareFunc[T]) bool
- func Fix[T any](heap []T, i int, cmp cmp.CompareFunc[T])
- func Init[T any](heap []T, cmp cmp.CompareFunc[T])
- func Up[T any](heap []T, j int, cmp cmp.CompareFunc[T])
- type Heap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init[T any](heap []T, cmp cmp.CompareFunc[T])
Types ¶
type Heap ¶
type Heap[T any] struct { // contains filtered or unexported fields }
func NewFromArray ¶
func NewFromArray[T any](arr []T, cmp cmp.CompareFunc[T]) *Heap[T]
Click to show internal directories.
Click to hide internal directories.