Documentation ¶
Index ¶
- func AdjustDown[T cmp.CompareLess[T]](heap []T, i int)
- func AdjustUp[T cmp.Comparable[T]](heap []T, i int)
- func Down[T cmp.CompareLess[T]](heap []T, i0, n int) bool
- func Fix[T cmp.CompareLess[T]](heap []T, i int)
- func Init[T cmp.CompareLess[T]](heap []T)
- func Up[T cmp.CompareLess[T]](heap []T, j int)
- type Heap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fix ¶
func Fix[T cmp.CompareLess[T]](heap []T, i int)
func Init ¶
func Init[T cmp.CompareLess[T]](heap []T)
func Up ¶
func Up[T cmp.CompareLess[T]](heap []T, j int)
Types ¶
type Heap ¶
type Heap[T cmp.CompareLess[T]] []T
func NewFromArr ¶
func NewFromArr[T cmp.CompareLess[T]](arr []T) Heap[T]
Click to show internal directories.
Click to hide internal directories.