Documentation ¶
Overview ¶
Package heap implements a heap value type
Index ¶
- type Entry
- type Heap
- func (h Heap) Apply(ctx changes.Context, c changes.Change) changes.Value
- func (h Heap) Delete(key interface{}) Heap
- func (h Heap) DeleteChange(key interface{}) changes.Change
- func (h Heap) Iterate(fn func(key interface{}, rank int) bool)
- func (h Heap) Update(key interface{}, rank int) Heap
- func (h Heap) UpdateChange(key interface{}, rank int) changes.Change
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Heap ¶
type Heap struct {
Items map[interface{}]Entry
}
Heap implements a heap of keys
func (Heap) DeleteChange ¶
DeleteChange returns the change to apply for deleting an item from the heap
func (Heap) Iterate ¶
Iterate calls the provided function for each Entry in the heap in descending order of Rank value.
Click to show internal directories.
Click to hide internal directories.