Constructors
constructor
- new BinaryHeap(scoreFunction: function): BinaryHeap
-
Parameters
-
scoreFunction: function
-
-
Parameters
Returns number
Properties
content
content: T[] = []
scoreFunction
scoreFunction: function
Type declaration
-
-
Parameters
Returns number
Methods
bubbleUp
- bubbleUp(n: number): void
sinkDown
- sinkDown(n: number): void
Binary heap implementation
http://eloquentjavascript.net/appendix2.htm
the heap scoring function