16template <
typename T,
typename P = std::less<T>>
32 bool empty()
const {
return c.empty(); }
43 template<
class... Args >
44 void emplace( Args&&... args ) {
c.emplace_back( std::forward<Args>(args)... ); onPush_(); }
47 void pop() { std::pop_heap(
c.begin(),
c.end(), pred_ );
c.pop_back(); }
54 void onPush_() { std::push_heap(
c.begin(),
c.end(), pred_ ); };
60template <
typename T,
typename P>
64 std::make_heap(
c.begin(),
c.end(), pred_ );
#define MR_LIFETIMEBOUND
Definition MRMacros.h:86
#define MR_LIFETIME_CAPTURE_BY_NESTED(x)
Definition MRMacros.h:91
#define MR_LIFETIMEBOUND_NESTED
Definition MRMacros.h:89
#define MR_NO_UNIQUE_ADDRESS
Definition MRMacros.h:40
#define MR_TIMER
Definition MRTimer.h:60
Vector<T> is indexed by size_t.
Definition MRVector.h:24
bool empty() const
checks if the queue has no elements
Definition MRPriorityQueue.h:32
void emplace(Args &&... args)
Definition MRPriorityQueue.h:44
void push(const value_type &value MR_LIFETIME_CAPTURE_BY_NESTED(this))
inserts element in the queue
Definition MRPriorityQueue.h:41
T value_type
Definition MRPriorityQueue.h:20
Container c
Definition MRPriorityQueue.h:51
typename Container::size_type size_type
Definition MRPriorityQueue.h:22
typename StdVector::size_type size_type
Definition MRVector.h:30
PriorityQueue()
constructs empty queue
Definition MRPriorityQueue.h:25
size_type size() const
returns the number of elements
Definition MRPriorityQueue.h:35
Vector< T > Container
Definition MRPriorityQueue.h:21
void pop()
removes the top element from the priority queue
Definition MRPriorityQueue.h:47
PriorityQueue(const P &pred)
Definition MRPriorityQueue.h:26
void push(value_type &&value MR_LIFETIME_CAPTURE_BY_NESTED(this))
Definition MRPriorityQueue.h:42
const T & top() const
accesses the top element
Definition MRPriorityQueue.h:38
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8