STXXL
1.4.1
|
Similar to std::priority_queue, with the following differences:
Definition at line 92 of file pq_helpers.h.
Public Types | |
typedef CompareType | compare_type |
typedef container_type::const_reference | const_reference |
typedef ContainerType | container_type |
typedef container_type::reference | reference |
typedef container_type::size_type | size_type |
typedef ValueType | value_type |
Public Member Functions | |
internal_priority_queue (size_type capacity) | |
Default constructor creates no elements. More... | |
void | clear () |
Remove all contained elements. More... | |
bool | empty () const |
Returns true if the queue is empty. More... | |
void | pop () |
Removes first element. More... | |
void | push (const value_type &x) |
Add data to the queue. More... | |
size_type | size () const |
Returns the number of elements in the queue. More... | |
void | sort_to (value_type *target) |
Sort all contained elements, write result to target . More... | |
const_reference | top () const |
Returns a read-only (constant) reference to the data at the first element of the queue. More... | |
Protected Attributes | |
CompareType | comp |
size_type | current_size |
container_type | heap |
typedef CompareType stxxl::priority_queue_local::internal_priority_queue< ValueType, ContainerType, CompareType >::compare_type |
Definition at line 97 of file pq_helpers.h.
typedef container_type::const_reference stxxl::priority_queue_local::internal_priority_queue< ValueType, ContainerType, CompareType >::const_reference |
Definition at line 99 of file pq_helpers.h.
typedef ContainerType stxxl::priority_queue_local::internal_priority_queue< ValueType, ContainerType, CompareType >::container_type |
Definition at line 96 of file pq_helpers.h.
typedef container_type::reference stxxl::priority_queue_local::internal_priority_queue< ValueType, ContainerType, CompareType >::reference |
Definition at line 98 of file pq_helpers.h.
typedef container_type::size_type stxxl::priority_queue_local::internal_priority_queue< ValueType, ContainerType, CompareType >::size_type |
Definition at line 100 of file pq_helpers.h.
typedef ValueType stxxl::priority_queue_local::internal_priority_queue< ValueType, ContainerType, CompareType >::value_type |
Definition at line 95 of file pq_helpers.h.
|
inlineexplicit |
Default constructor creates no elements.
Definition at line 111 of file pq_helpers.h.
|
inline |
Remove all contained elements.
Definition at line 179 of file pq_helpers.h.
|
inline |
Returns true if the queue is empty.
Definition at line 117 of file pq_helpers.h.
|
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 container.
Note that no data is returned, and if the first element's data is needed, it should be retrieved before pop() is called.
Definition at line 163 of file pq_helpers.h.
|
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 container.
Definition at line 144 of file pq_helpers.h.
|
inline |
Returns the number of elements in the queue.
Definition at line 122 of file pq_helpers.h.
|
inline |
Sort all contained elements, write result to target
.
Definition at line 170 of file pq_helpers.h.
|
inline |
Returns a read-only (constant) reference to the data at the first element of the queue.
Definition at line 130 of file pq_helpers.h.
|
protected |
Definition at line 105 of file pq_helpers.h.
|
protected |
Definition at line 106 of file pq_helpers.h.
|
protected |
Definition at line 104 of file pq_helpers.h.