STXXL
1.4-dev
|
A random-access iterator class for block oriented data.
The iterator is intended to be provided by the internal_array and external_array classes and to be used by the multiway_merge algorithm as input iterators.
ValueType | the value type |
Definition at line 70 of file parallel_priority_queue.h.
Public Types | |
typedef std::vector< std::pair < pointer, pointer > > | block_pointers_type |
typedef ptrdiff_t | difference_type |
typedef std::random_access_iterator_tag | iterator_category |
typedef value_type * | pointer |
typedef value_type & | reference |
typedef ValueType | value_type |
Public Member Functions | |
ppq_iterator () | |
default constructor (should not be used directly) More... | |
ppq_iterator (const block_pointers_type *block_pointers, size_t block_items, size_t index) | |
constructor More... | |
size_t | get_index () const |
returns the value's index in the internal or external array More... | |
bool | operator!= (const self_type &o) const |
reference | operator* () const |
self_type | operator+ (difference_type addend) const |
self_type & | operator++ () |
prefix-increment operator More... | |
self_type & | operator+= (difference_type addend) |
self_type | operator- (difference_type subtrahend) const |
difference_type | operator- (const self_type &o) const |
self_type & | operator-- () |
prefix-decrement operator More... | |
self_type & | operator-= (difference_type subtrahend) |
pointer | operator-> () const |
bool | operator< (const self_type &o) const |
bool | operator<= (const self_type &o) const |
bool | operator== (const self_type &o) const |
bool | operator> (const self_type &o) const |
bool | operator>= (const self_type &o) const |
reference | operator[] (difference_type relative_index) const |
Protected Types | |
typedef ppq_iterator | self_type |
Protected Attributes | |
size_t | m_block_index |
index of the current element's block More... | |
size_t | m_block_items |
size of each data block More... | |
const block_pointers_type * | m_block_pointers |
pointer to a vector of begin/end pointer pairs They allow access to the data blocks. More... | |
pointer | m_current |
pointer to the current element More... | |
size_t | m_index |
index of the current element More... | |
Private Member Functions | |
void | update () |
updates m_block_index and m_current based on m_index More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ppq_iterator &i) |
typedef std::vector<std::pair<pointer, pointer> > stxxl::ppq_local::ppq_iterator< ValueType >::block_pointers_type |
Definition at line 78 of file parallel_priority_queue.h.
typedef ptrdiff_t stxxl::ppq_local::ppq_iterator< ValueType >::difference_type |
Definition at line 76 of file parallel_priority_queue.h.
typedef std::random_access_iterator_tag stxxl::ppq_local::ppq_iterator< ValueType >::iterator_category |
Definition at line 77 of file parallel_priority_queue.h.
typedef value_type* stxxl::ppq_local::ppq_iterator< ValueType >::pointer |
Definition at line 75 of file parallel_priority_queue.h.
typedef value_type& stxxl::ppq_local::ppq_iterator< ValueType >::reference |
Definition at line 74 of file parallel_priority_queue.h.
|
protected |
Definition at line 81 of file parallel_priority_queue.h.
typedef ValueType stxxl::ppq_local::ppq_iterator< ValueType >::value_type |
Definition at line 73 of file parallel_priority_queue.h.
|
inline |
default constructor (should not be used directly)
Definition at line 101 of file parallel_priority_queue.h.
|
inline |
constructor
block_pointers | A reference to the properly initialized vector of begin and end pointers. One pair for each block. The pointers should be valid for all blocks that are expected to be accessed with this iterator. |
block_items | The size of a single block. If there is only one block (e.g. if the iterator belongs to an internal_array), use the total size here. |
index | The index of the current element (global - index 0 belongs to the first element in the first block, no matter if the values are still valid) |
Definition at line 114 of file parallel_priority_queue.h.
|
inline |
returns the value's index in the internal or external array
Definition at line 124 of file parallel_priority_queue.h.
|
inline |
Definition at line 221 of file parallel_priority_queue.h.
References stxxl::ppq_local::ppq_iterator< ValueType >::m_index.
|
inline |
Definition at line 129 of file parallel_priority_queue.h.
|
inline |
Definition at line 193 of file parallel_priority_queue.h.
|
inline |
prefix-increment operator
Definition at line 155 of file parallel_priority_queue.h.
References UNLIKELY.
|
inline |
Definition at line 197 of file parallel_priority_queue.h.
|
inline |
Definition at line 203 of file parallel_priority_queue.h.
|
inline |
Definition at line 207 of file parallel_priority_queue.h.
References stxxl::ppq_local::ppq_iterator< ValueType >::m_index.
|
inline |
prefix-decrement operator
Definition at line 174 of file parallel_priority_queue.h.
|
inline |
Definition at line 211 of file parallel_priority_queue.h.
|
inline |
Definition at line 135 of file parallel_priority_queue.h.
|
inline |
Definition at line 225 of file parallel_priority_queue.h.
References stxxl::ppq_local::ppq_iterator< ValueType >::m_index.
|
inline |
Definition at line 229 of file parallel_priority_queue.h.
References stxxl::ppq_local::ppq_iterator< ValueType >::m_index.
|
inline |
Definition at line 217 of file parallel_priority_queue.h.
References stxxl::ppq_local::ppq_iterator< ValueType >::m_index.
|
inline |
Definition at line 233 of file parallel_priority_queue.h.
References stxxl::ppq_local::ppq_iterator< ValueType >::m_index.
|
inline |
Definition at line 237 of file parallel_priority_queue.h.
References stxxl::ppq_local::ppq_iterator< ValueType >::m_index.
|
inline |
Definition at line 140 of file parallel_priority_queue.h.
|
inlineprivate |
updates m_block_index and m_current based on m_index
Definition at line 249 of file parallel_priority_queue.h.
|
friend |
Definition at line 242 of file parallel_priority_queue.h.
|
protected |
index of the current element's block
Definition at line 94 of file parallel_priority_queue.h.
|
protected |
size of each data block
Definition at line 97 of file parallel_priority_queue.h.
|
protected |
pointer to a vector of begin/end pointer pairs They allow access to the data blocks.
Definition at line 85 of file parallel_priority_queue.h.
|
protected |
pointer to the current element
Definition at line 88 of file parallel_priority_queue.h.
|
protected |
index of the current element
Definition at line 91 of file parallel_priority_queue.h.
Referenced by stxxl::ppq_local::ppq_iterator< ValueType >::operator!=(), stxxl::ppq_local::ppq_iterator< ValueType >::operator-(), stxxl::ppq_local::ppq_iterator< ValueType >::operator<(), stxxl::ppq_local::ppq_iterator< ValueType >::operator<=(), stxxl::ppq_local::ppq_iterator< ValueType >::operator==(), stxxl::ppq_local::ppq_iterator< ValueType >::operator>(), and stxxl::ppq_local::ppq_iterator< ValueType >::operator>=().