Home Manual Reference Source Test

References

adt

summary
public

F DAryHeap(arity: *, compare: *)

public

F DAryHeapWithoutReferences(arity: *, compare: *)

core

summary
public

F makeheap(arity: int, compare: function, swap: function, a: array, i: int, j: int)

Builds a heap in O(n) operations.

public

F merge(arity: int, compare: function, swap: function, a: array, i: int, j: int, k: int)

Merges heaps at intervals [i, j[ and [j, k[ in array a into a new heap at interval [i, k[.

public

F nextchild(arity: int, compare: function, swap: function, a: array, i: int, j: int): *

Computes which child is the smallest according to a comparison function.

public

F pop(arity: int, compare: function, swap: function, a: array, i: int, j: int): *

Pops the root from a d-ary heap.

public

F pull(arity: int, compare: function, swap: function, a: array, i: int, j: int, k: int)

Sifts a node up to the root as if its priority was the highest.

public

F push(arity: int, compare: function, swap: function, a: array, i: int, j: int): *

Inserts the jth element of an array in an existing dary heap in interval [i, j[.

public

F remove(arity: int, compare: function, swap: function, a: array, i: int, j: int, k: int): *

Removes a target element from a d-ary heap.

public

F siftdown(arity: int, compare: function, swap: function, a: array, i: int, j: int, k: int): *

Sifts down a node.

public

F siftup(arity: int, compare: function, swap: function, a: array, i: int, j: int, k: int): *

Sifts up a node.

public

F * sorted(arity: *, compare: *, swap: *, a: *, i: *, j: *)

Directories