Stxxl
1.3.1
|
Similar to std::priority_queue, with the following differences: More...
#include <pq_helpers.h>
Public Member Functions | |
internal_priority_queue (size_type capacity) | |
Default constructor creates no elements. More... | |
bool | empty () const |
size_type | size () const |
const_reference | top () const |
void | push (const value_type &__x) |
Add data to the queue. More... | |
void | pop () |
Removes first element. More... | |
void | sort_to (value_type *target) |
Sort all contained elements, write result to target . More... | |
void | clear () |
Remove all contained elements. More... | |
Protected Attributes | |
_Sequence | heap |
_Compare | comp |
size_type | current_size |
Similar to std::priority_queue, with the following differences:
|
inlineexplicit |
Default constructor creates no elements.
|
inline |
Remove all contained elements.
Referenced by priority_queue< Config_ >::priority_queue().
|
inline |
Returns true if the queue is empty.
Referenced by priority_queue< Config_ >::pop(), priority_queue< Config_ >::push(), and priority_queue< Config_ >::top().
|
inline |
Removes first element.
This is a typical queue operation. It shrinks the queue by one. The time complexity of the operation depends on the underlying sequence.
Note that no data is returned, and if the first element's data is needed, it should be retrieved before pop() is called.
Referenced by priority_queue< Config_ >::pop().
|
inline |
Add data to the queue.
__x | Data to be added. |
This is a typical queue operation. The time complexity of the operation depends on the underlying sequence.
Referenced by priority_queue< Config_ >::priority_queue(), and priority_queue< Config_ >::push().
|
inline |
Returns the number of elements in the queue.
Referenced by priority_queue< Config_ >::priority_queue(), priority_queue< Config_ >::push(), and priority_queue< Config_ >::size().
|
inline |
Sort all contained elements, write result to target
.
Referenced by priority_queue< Config_ >::priority_queue().
|
inline |
Returns a read-only (constant) reference to the data at the first element of the queue.
Referenced by priority_queue< Config_ >::pop(), and priority_queue< Config_ >::top().