README ¶ Binary Priority Queue Implementation Notes Nodes contain the following: A key k, where k ∈ ℝ A pointer to a value Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Heap func Merge[K cmp.Ordered, V any](a, b *Heap[K, V]) *Heap[K, V] func NewHeap[K cmp.Ordered, V any]() *Heap[K, V] func (h *Heap[K, V]) Clear() func (h *Heap[K, V]) FindMin() *Node[K, V] func (h *Heap[K, V]) Insert(newNode *Node[K, V]) func (h *Heap[K, V]) RemoveMin() func (h *Heap[K, V]) Size() int type Node func NewNode[K cmp.Ordered, V any](key K, value V) *Node[K, V] func (n *Node[K, V]) Key() K func (n *Node[K, V]) Value() V Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Heap ¶ type Heap[K cmp.Ordered, V any] struct { // contains filtered or unexported fields } func Merge ¶ func Merge[K cmp.Ordered, V any](a, b *Heap[K, V]) *Heap[K, V] func NewHeap ¶ func NewHeap[K cmp.Ordered, V any]() *Heap[K, V] func (*Heap[K, V]) Clear ¶ func (h *Heap[K, V]) Clear() func (*Heap[K, V]) FindMin ¶ func (h *Heap[K, V]) FindMin() *Node[K, V] func (*Heap[K, V]) Insert ¶ func (h *Heap[K, V]) Insert(newNode *Node[K, V]) func (*Heap[K, V]) RemoveMin ¶ func (h *Heap[K, V]) RemoveMin() func (*Heap[K, V]) Size ¶ func (h *Heap[K, V]) Size() int type Node ¶ type Node[K cmp.Ordered, V any] struct { // contains filtered or unexported fields } func NewNode ¶ func NewNode[K cmp.Ordered, V any](key K, value V) *Node[K, V] func (*Node[K, V]) Key ¶ func (n *Node[K, V]) Key() K func (*Node[K, V]) Value ¶ func (n *Node[K, V]) Value() V Source Files ¶ View all Source files heap.go Click to show internal directories. Click to hide internal directories.