Documentation
¶
Overview ¶
Package slicehap provides a minimal generic heap implementation backed by a slice and compatible with container/heap.
It intentionally continas no additional policy. Ordering is fully defined by the provided Less function.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Heap ¶
type Heap[T any] struct { // contains filtered or unexported fields }
Heap is a slice backed implementation of container/heap.Interface
func New ¶
New constructs a new Heap with the given capacity, ordering function, and optional initial values.
The heap invariant is established during construction.
Click to show internal directories.
Click to hide internal directories.