PriorityQueue class
Class for representing a binary heap priority queue that enables more efficient sorting of arrays. The implementation is based on { @link https://github.com/mourner/tinyqueue tinyqueue}.
@author {@link https://github.com/Mugen87|Mugen87}
Constructors
- PriorityQueue([Function? compare])
- Constructs a new priority queue.
Properties
Methods
-
defaultCompare(
dynamic a, dynamic b) → dynamic -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
peek(
) → dynamic - Returns the item with the highest priority without removal.
-
pop(
) → dynamic - Returns the item with the highest priority and removes it from the priority queue.
-
push(
dynamic item) → void - Pushes an item to the priority queue.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited