Home Manual Reference Source

References

summary
public

F heapify(compare: function, x: array): *

Builds a heap in O(n) operations.

public

F heappop(heap: *): *

public

F heappush(heap: *, item: *)

public

F heappushpop(heap: *, item: *): *

public

F heapreplace(heap: *, item: *): *

public

F * merge(compare: *, iterables: ...*)

public

F nlargest(compare: *, n: *, iterable: *): *

public

F nsmallest(compare: *, n: *, iterable: *): *

core

summary
public

F Heap(compare: *, data: *)

public

F keeporder(compare: *)

public

F nextchild(compare: function, a: array, i: number, j: number): number

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

public

F siftdown(compare: function, a: array, i: number, j: number, k: number): *

Sifts down a node.

public

F siftup(compare: function, a: array, i: number, j: number, k: number): *

Sifts up a node.

Directories