Stxxl
1.4.0
|
Similar to std::priority_queue, with the following differences: More...
#include <pq_helpers.h>
Public Types | |
typedef _Sequence::value_type | value_type |
typedef _Sequence::reference | reference |
typedef _Sequence::const_reference | const_reference |
typedef _Sequence::size_type | size_type |
typedef _Sequence | container_type |
Public Member Functions | |
internal_priority_queue (size_type capacity) | |
Default constructor creates no elements. | |
bool | empty () const |
size_type | size () const |
const_reference | top () const |
void | push (const value_type &__x) |
Add data to the queue. | |
void | pop () |
Removes first element. | |
void | sort_to (value_type *target) |
Sort all contained elements, write result to target . | |
void | clear () |
Remove all contained elements. | |
Protected Attributes | |
_Sequence | heap |
_Compare | comp |
size_type | current_size |
Private Types | |
typedef _Sequence::value_type | _Sequence_value_type |
Similar to std::priority_queue, with the following differences:
Definition at line 39 of file pq_helpers.h.
typedef _Sequence::value_type stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::_Sequence_value_type [private] |
Definition at line 42 of file pq_helpers.h.
typedef _Sequence::const_reference stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::const_reference |
Definition at line 47 of file pq_helpers.h.
typedef _Sequence stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::container_type |
Definition at line 49 of file pq_helpers.h.
typedef _Sequence::reference stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::reference |
Definition at line 46 of file pq_helpers.h.
typedef _Sequence::size_type stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::size_type |
Definition at line 48 of file pq_helpers.h.
typedef _Sequence::value_type stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::value_type |
Definition at line 45 of file pq_helpers.h.
stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::internal_priority_queue | ( | size_type | capacity | ) | [inline, explicit] |
Default constructor creates no elements.
Definition at line 62 of file pq_helpers.h.
void stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::clear | ( | ) | [inline] |
Remove all contained elements.
Definition at line 136 of file pq_helpers.h.
bool stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::empty | ( | ) | const [inline] |
Returns true if the queue is empty.
Definition at line 70 of file pq_helpers.h.
void stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::pop | ( | ) | [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 116 of file pq_helpers.h.
void stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::push | ( | const value_type & | __x | ) | [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 97 of file pq_helpers.h.
size_type stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::size | ( | ) | const [inline] |
Returns the number of elements in the queue.
Definition at line 75 of file pq_helpers.h.
void stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::sort_to | ( | value_type * | target | ) | [inline] |
Sort all contained elements, write result to target
.
Definition at line 125 of file pq_helpers.h.
const_reference stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::top | ( | ) | const [inline] |
Returns a read-only (constant) reference to the data at the first element of the queue.
Definition at line 83 of file pq_helpers.h.
_Compare stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::comp [protected] |
Definition at line 54 of file pq_helpers.h.
size_type stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::current_size [protected] |
Definition at line 55 of file pq_helpers.h.
_Sequence stxxl::priority_queue_local::internal_priority_queue< _Tp, _Sequence, _Compare >::heap [protected] |
Definition at line 53 of file pq_helpers.h.