STXXL
1.4.0
|
Similar to std::priority_queue, with the following differences:
Definition at line 92 of file pq_helpers.h.
Public Types | |
typedef _Sequence::const_reference | const_reference |
typedef _Sequence | container_type |
typedef _Sequence::reference | reference |
typedef _Sequence::size_type | size_type |
typedef _Sequence::value_type | 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 | |
_Compare | comp |
size_type | current_size |
_Sequence | heap |
Private Types | |
typedef _Sequence::value_type | _Sequence_value_type |
|
private |
Definition at line 95 of file pq_helpers.h.
typedef _Sequence::const_reference stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::const_reference |
Definition at line 100 of file pq_helpers.h.
typedef _Sequence stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::container_type |
Definition at line 102 of file pq_helpers.h.
typedef _Sequence::reference stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::reference |
Definition at line 99 of file pq_helpers.h.
typedef _Sequence::size_type stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::size_type |
Definition at line 101 of file pq_helpers.h.
typedef _Sequence::value_type stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::value_type |
Definition at line 98 of file pq_helpers.h.
|
inlineexplicit |
Default constructor creates no elements.
Definition at line 113 of file pq_helpers.h.
|
inline |
Remove all contained elements.
Definition at line 181 of file pq_helpers.h.
|
inline |
Returns true if the queue is empty.
Definition at line 119 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 sequence.
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 165 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 sequence.
Definition at line 146 of file pq_helpers.h.
|
inline |
Returns the number of elements in the queue.
Definition at line 124 of file pq_helpers.h.
|
inline |
Sort all contained elements, write result to target
.
Definition at line 172 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 132 of file pq_helpers.h.
|
protected |
Definition at line 107 of file pq_helpers.h.
|
protected |
Definition at line 108 of file pq_helpers.h.
|
protected |
Definition at line 106 of file pq_helpers.h.