Abstract
Abstract
[iterator]Returns an iterator for traversing the heap.
If true
, the iterator will traverse the heap in reverse order.
A generator that yields N
type elements.
Abstract
addAbstract
clearClears the heap by removing all elements.
Abstract
decreaseAbstract
entriesReturns an iterator for traversing the heap elements.
If true
, the iterator will traverse the heap in reverse order.
Abstract
forExecutes a provided function (callbackFn
) once per element in the heap.
Element of each iteration.
The index of the current element being processed in the heap.
The heap instance being iterated.
Optional
thisArg: anyAbstract
increaseAbstract
keysReturns an iterator for traversing the heap element keys.
If true
, the iterator will traverse the heap in reverse order.
Abstract
peekReturns the top element of the heap, or undefined
if the heap is empty.
Abstract
popRemoves and returns the top element of the heap, or returns undefined
if the heap is empty.
Abstract
removeRemoves a node from the heap.
The node to remove.
true
or false
depending on the outcome of the removal process.
An abstract class representing a heap.