#include <tpie/pq_merge_heap.h>
Public Types | |
typedef memory_size_type | run_type |
Public Member Functions | |
pq_merge_heap (memory_size_type elements) | |
Constructor. More... | |
~pq_merge_heap () | |
Destructor. More... | |
void | push (const T &x, run_type run) |
Insert an element into the priority queue. More... | |
void | pop () |
Remove the top element from the priority queue. More... | |
void | pop_and_push (const T &x, run_type run) |
Remove the top element from the priority queue and insert another. More... | |
const T & | top () const |
See what's on the top of the priority queue. More... | |
run_type | top_run () const |
Return top element run number. More... | |
memory_size_type | size () const |
Returns the size of the queue. More... | |
bool | empty () const |
Return true if queue is empty, otherwise false. More... | |
Definition at line 41 of file pq_merge_heap.h.
tpie::pq_merge_heap< T, Comparator >::pq_merge_heap | ( | memory_size_type | elements | ) |
Constructor.
elements | Maximum allowed size of the heap. |
Definition at line 23 of file pq_merge_heap.h.
tpie::pq_merge_heap< T, Comparator >::~pq_merge_heap | ( | ) |
bool tpie::pq_merge_heap< T, Comparator >::empty | ( | ) | const |
Return true if queue is empty, otherwise false.
Definition at line 103 of file pq_merge_heap.h.
void tpie::pq_merge_heap< T, Comparator >::pop | ( | ) |
Remove the top element from the priority queue.
Definition at line 60 of file pq_merge_heap.h.
void tpie::pq_merge_heap< T, Comparator >::pop_and_push | ( | const T & | x, |
run_type | run | ||
) |
Remove the top element from the priority queue and insert another.
x | The item. |
run | Where it comes from. |
Definition at line 74 of file pq_merge_heap.h.
void tpie::pq_merge_heap< T, Comparator >::push | ( | const T & | x, |
run_type | run | ||
) |
Insert an element into the priority queue.
x | The item. |
run | Where it comes from. |
Definition at line 37 of file pq_merge_heap.h.
memory_size_type tpie::pq_merge_heap< T, Comparator >::size | ( | ) | const |
const T & tpie::pq_merge_heap< T, Comparator >::top | ( | ) | const |
See what's on the top of the priority queue.
Definition at line 85 of file pq_merge_heap.h.
pq_merge_heap< T, Comparator >::run_type tpie::pq_merge_heap< T, Comparator >::top_run | ( | ) | const |
Return top element run number.
Definition at line 92 of file pq_merge_heap.h.