PriorityQueue ‐ This class behaves like std::priority_queue and provides a few additional convenience functions.
Synopsis
Declared in <llvm/ADT/PriorityQueue.h>
template<
class T,
class Sequence = std::vector<T>,
class Compare = std::less<Sequence::value_type>>
class PriorityQueue
: public std::priority_queue<T, Sequence, Compare>
Base Classes
Name |
Description |
|
A standard container automatically sorting its contents. |
Type Aliases
Name |
Description |
Const reference to an element. |
|
Underlying container type that holds the heap. |
|
Mutable reference to an element. |
|
Unsigned type used for sizes. |
|
Comparator type that defines heap ordering. |
|
Type of elements stored in the queue. |
Member Functions
Name |
Description |
|
Constructors |
Assign from another priority queue. |
|
clear ‐ Erase all elements from the queue. |
|
Returns true if the %queue is empty. |
|
Erase one element from the queue, regardless of its position. |
|
Removes first element. |
|
|
|
Rebuild the heap after an element's ordering relative to the comparator has changed. |
|
Returns the number of elements in the %queue. |
|
Returns a read‐only (constant) reference to the data at the first element of the %queue. |
Using Declarations
Name |
Description |
Construct an element in‐place and insert it into the queue. |
|
Return true if the queue contains no elements. |
|
Remove the greatest element from the queue. |
|
Insert every element from a range into the queue. |
|
Return the number of elements in the queue. |
|
Exchange contents with another priority queue. |
|
Return a const reference to the greatest element. |