Documentation
¶
Index ¶
- type RPHeap
- func (r *RPHeap) Adjust(old, new heap.Item) heap.Item
- func (r *RPHeap) Clear()
- func (r *RPHeap) Delete(val heap.Item) heap.Item
- func (r *RPHeap) DeleteMin() heap.Item
- func (r *RPHeap) FindMin() heap.Item
- func (p *RPHeap) Init() *RPHeap
- func (r *RPHeap) Insert(val heap.Item) heap.Item
- func (r *RPHeap) Meld(a heap.Interface) heap.Interface
- func (r *RPHeap) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RPHeap ¶
type RPHeap struct {
// contains filtered or unexported fields
}
RPHeap is an implementation of a rank Pairing Heap. The zero value for RPHeap Root is an empty Heap.
func (*RPHeap) Adjust ¶
Adjust the value of an item, since we have to find the item Complexity is O(n)
func (*RPHeap) DeleteMin ¶
DeleteMin removes the top most value from the rankPairingHeap and returns it Complexity: O(log n)
Click to show internal directories.
Click to hide internal directories.