References
summary | ||
public |
Avoids if-then-else logic when manipulating child nodes |
|
public |
C Node |
|
public |
|
|
public |
Decrease-key: remove the subtree rooted at the key to be decreased, replace the key with a smaller key, then merge the result back into the heap. |
|
public |
Merge: compare the two root elements, the smaller remains the root of the result, the larger element and its subtree is appended as a child of this root. |
|
public |
F mergepairs(compare: Function, prev: Node): Node Recursively builds a heap from an iterator of nodes by merging them pair by pair. |
|
public |
Set B as the first child of A. |