Constructors
constructor
- new BinaryHeap<T>(scoreFunction: (item: T) => number): BinaryHeap<T>
-
Type parameters
Parameters
-
scoreFunction: (item: T) => number
-
-
Parameters
Returns number
Properties
Private content
content: T[] = []
Methods
bubbleUp
- bubbleUp(n: number): void
rescoreElement
- rescoreElement(node: T): void
sinkDown
- sinkDown(n: number): void