constructor Method
Constructor
PriorityQueue(compare: OrderedComparator<T>, clone: CloneFunction<T> = shallowClone): PriorityQueue
note If the criterion which control the result of the compare
function changes, then PriorityQueue.sort should be used to reorder the queue according to the new criterion.
Parameter | Type | Description |
---|---|---|
compare | OrderedComparator<T> | The function used to compare values in the queue. If compare(x, y) returns a negative value, then x is placed before y in the queue. |
clone | CloneFunction<T> | The function used to clone a value for insertion onto the queue. The default implementation simply returns its input. |
Defined in
Last Updated: 08 January, 2020