Home Manual Reference Source

References

summary
public

Avoids if-then-else logic when manipulating child nodes

public

C Node

public
public

F decreasekey(compare: Function, min: Node, node: Node, value: Object): Node

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

F merge(compare: Function, A: Node, B: Node): Node

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

F prepend(A: Node, B: Node): Node

Set B as the first child of A.