package
Version:
v0.2.1
Opens a new window with list of versions in this module.
Published: May 8, 2026
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package heap provides a typed min-heap with addressable items.
type Heap[T any] struct {
}
Heap is a min-heap keyed by int64. The zero value is usable.
type Item[T any] struct {
Key int64
Value T
}
Item is a heap entry returned by Push and accepted by Fix/Remove.
Index reports the item's heap position, or -1 after removal.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.