MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::PriorityQueue< T, P > Class Template Reference

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 MR_LIFETIMEBOUND_NESTED)
 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 MR_LIFETIMEBOUND
 accesses the top element
 
void push (const value_type &value MR_LIFETIME_CAPTURE_BY_NESTED(this))
 inserts element in the queue
 
void push (value_type &&value MR_LIFETIME_CAPTURE_BY_NESTED(this))
 
template<class... Args>
void emplace (Args &&... args)
 
void pop ()
 removes the top element from the priority queue
 

Public Attributes

Container c
 

Detailed Description

template<typename T, typename P = std::less<T>>
class MR::PriorityQueue< T, P >

similar to std::priority_queue, but with ability to access underlying vector to custom modify its elements


The documentation for this class was generated from the following file: