Documentation ¶
Overview ¶
Package binomial implements a Binomial heap Data structure
Structure is not thread safe.
Reference: https://en.wikipedia.org/wiki/Binomial_heap
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinomialHeap ¶
type BinomialHeap struct {
// contains filtered or unexported fields
}
BinomialHeap is an implementation of a Binomial Heap.
func (*BinomialHeap) Delete ¶
func (p *BinomialHeap) Delete(item heap.Item)
Deletes passed item from the heap. The complexity is O(log n).
func (*BinomialHeap) DeleteMin ¶
func (b *BinomialHeap) DeleteMin() heap.Item
DeleteMin removes the smallest item from the BinomialHeap and returns it The complexity is O(log n).
func (*BinomialHeap) FindMin ¶
func (b *BinomialHeap) FindMin() heap.Item
FindMin returns the smallest item in the heap. The complexity is O(log n).
Click to show internal directories.
Click to hide internal directories.