Module gamejs/utils/binaryheap
BinaryHeap (scoreFunction)
Binary Heap
Parameters
scoreFunction |
See
http://eloquentjavascript.net/appendix2.html
BinaryHeap.prototype.pop (element)
Return first element from heap.
Parameters
Object | element |
Returns
Object | element |
BinaryHeap.prototype.remove (element)
Remove the given element from the heap.
Parameters
Object | element |
Throws
{Error} if node not found
BinaryHeap.prototype.size ()
Number of elements in heap.