Properties
Protected
_nodes
_nodes: Node<T, K>[]
Accessors
count
- get count(): number
-
Returns number
keys
- get keys(): readonly K[]
-
Returns readonly K[]
values
- get values(): readonly T[]
-
Returns readonly T[]
Methods
Private
_insertAll
- _insertAll(heap: MinHeap<T, K>): void
-
Returns void
Private
_insertAllFromHeap
- _insertAllFromHeap(heap: MinHeap<T, K>): void
-
Returns void
Protected
_leftChildIndex
- _leftChildIndex(index: number): number
-
Returns number
Protected
_moveDown
- _moveDown(originalIndex: number): void
-
Returns void
Protected
_moveUp
- _moveUp(originalIndex: number): void
-
Returns void
Protected
_parentIndex
- _parentIndex(index: number): number
-
Returns number
Protected
_rightChildIndex
- _rightChildIndex(index: number): number
-
Returns number
clear
- clear(): void
-
Returns void
peek
- peek(): undefined | {
key: K;
value: T;
}
-
Returns undefined | {
key: K;
value: T;
}
pop
- pop(): undefined | {
key: K;
value: T;
}
-
Returns undefined | {
key: K;
value: T;
}
push
- push(key: K, value: T): void
-
Returns void