Heap instance constructor.
Optional comparison function, defaults to Heap.minComparator
Optional comparison function, defaults to Heap.minComparator
Alias of peek
Alias of add
Alias of pop
Length of the heap.
Get length limit of the heap.
Set length limit of the heap.
Returns the comparison function.
Returns true if this queue contains the specified element.
Element to be found
Optional comparison function, receives (element, needle)
Remove an element from the heap.
Optionalo: TElement to be found
Optional function to compare
True if the heap was modified
StaticdefaultStaticgetStaticgetStaticgetStaticheapbottomReturn the n least valuable elements of a heap-like Array
Array, should be an array-heap
Max number of elements
Optionalcompare: AsyncComparator<N>Optional compare function
Elements
StaticheapifyConverts an array into an array-heap, in place
Array to be modified
Optionalcompare: AsyncComparator<N>Optional compare function
For convenience, it returns a Heap instance
StaticheappopExtract the peek of an array-heap
Array to be modified, should be a heap
Optionalcompare: AsyncComparator<N>Optional compare function
Returns the extracted peek
StaticheappushPushes a item into an array-heap
Array to be modified, should be a heap
Item to push
Optionalcompare: AsyncComparator<N>Optional compare function
StaticheappushpopPush followed by pop, faster
Array to be modified, should be a heap
Item to push
Optionalcompare: AsyncComparator<N>Optional compare function
Returns the extracted peek
StaticheapreplaceReplace peek with item
Array to be modified, should be a heap
Item as replacement
Optionalcompare: AsyncComparator<N>Optional compare function
Returns the extracted peek
StaticheaptopReturn the n most valuable elements of a heap-like Array
Array, should be an array-heap
Max number of elements
Optionalcompare: AsyncComparator<N>Optional compare function
Elements
StaticmaxStaticmaxStaticminStaticminStaticnlargestReturn the n most valuable elements of an iterable
Max number of elements
Optionalcompare: AsyncComparator<N>Optional compare function
Elements
StaticnsmallestReturn the n least valuable elements of an iterable
Max number of elements
Optionalcompare: AsyncComparator<N>Optional compare function
Elements
Staticprint
Heap