Documentation
¶
Index ¶
Constants ¶
View Source
const Version = "0.0.1"
Version The main version number that is being run at the moment.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extended ¶
type Extended interface {
Interface
// Return the heap formed by taking the union of the item disjoint
// current heap and a
Meld(a Interface) Interface
// Adjusts the key of item old in heap h to new
Adjust(old, new Item) Item
// Delete arbitrary item from heap h.
Delete(item Item) Item
}
Extended adds operations on heaps are often useful.
type Interface ¶
type Interface interface {
// Inserts an element to the heap and returns it
Insert(v Item) Item
// DeleteMin deletes and returns the smallest element
DeleteMin() Item
// FindMin returns the minimum element
FindMin() Item
// Removes all items
Clear()
}
Interface is basic interface that all Heaps implement.
type Item ¶
type Item interface {
// Should return a number:
// negative , if a < b
// zero , if a == b
// positive , if a > b
Compare(than Item) int
}
Item is the basic element that is inserted in a heap
type ItemIterator ¶
ItemIterator allows callers of Do to iterate in-order over portions of the tree. When this function returns false, iteration will stop and the function will immediately return.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package binomial implements a Binomial heap Data structure Structure is not thread safe.
|
Package binomial implements a Binomial heap Data structure Structure is not thread safe. |
|
example
|
|
|
leftist
command
|
|
|
pairing
command
|
|
|
rank_pairing
command
|
|
|
skew
command
|
|
|
treap
command
|
|
|
Package fibonacci implements a Fibonacci FibonacciHeap Data structure Reference: https://en.wikipedia.org/wiki/Fibonacci_heap Implementation from Introduction to Algorithms by T. Cormen
|
Package fibonacci implements a Fibonacci FibonacciHeap Data structure Reference: https://en.wikipedia.org/wiki/Fibonacci_heap Implementation from Introduction to Algorithms by T. Cormen |
|
Package pairing implements a Pairing heap Data structure Structure is not thread safe.
|
Package pairing implements a Pairing heap Data structure Structure is not thread safe. |
|
Package skew implements a Skew heap Data structure Structure is not thread safe.
|
Package skew implements a Skew heap Data structure Structure is not thread safe. |
Click to show internal directories.
Click to hide internal directories.