Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
4.5.0
-
None
Description
It would be very nice to have a priority queue class. Operations could include: adding and removing elements; changing the priority of an existing element; querying and removing the highest-priority element; querying the highest and lowest priorities; merging queues; and getting a list of all elements in priority order or arbitrary order. For efficiency, the priority queue should probably be implemented in terms of a heap. To keep things simple, it's alright to require that the priority be an unsigned integer, with zero as the highest priority; a more flexible implementation could allow for customizable comparison and determining the priority from the elements themselves.