similar to std::priority_queue, but with ability to access underlying vector to custom modify its elements More...
#include <MRPriorityQueue.h>
Public Types | |
| using | value_type = T |
| using | Container = std::vector<T> |
| using | size_type = typename Container::size_type |
Public Member Functions | |
| PriorityQueue () | |
| constructs empty queue | |
| PriorityQueue (const P &pred) | |
| PriorityQueue (const P &pred, Container &&v) | |
| initializes queue elements from given vector | |
| bool | empty () const |
| checks if the queue has no elements | |
| size_type | size () const |
| returns the number of elements | |
| const T & | top () const |
| accesses the top element | |
| void | push (const value_type &value) |
| inserts element in the queue | |
| void | push (value_type &&value) |
| template<class... Args> | |
| void | emplace (Args &&... args) |
| void | pop () |
| removes the top element from the priority queue | |
Public Attributes | |
| Container | c |
similar to std::priority_queue, but with ability to access underlying vector to custom modify its elements
| using MR::PriorityQueue< T, P >::Container = std::vector<T> |
| using MR::PriorityQueue< T, P >::size_type = typename Container::size_type |
| using MR::PriorityQueue< T, P >::value_type = T |
|
inline |
constructs empty queue
|
inlineexplicit |
|
explicit |
initializes queue elements from given vector
|
inline |
|
inline |
checks if the queue has no elements
|
inline |
removes the top element from the priority queue
|
inline |
inserts element in the queue
|
inline |
|
inline |
returns the number of elements
|
inline |
accesses the top element
| Container MR::PriorityQueue< T, P >::c |
intentionally left public to allow user access to it, but the user is responsible for restore heap-property of this vector before calling of any method