tlx
|
Iterator wrapper supporting an implicit supremum at the end of the sequence, dominating all comparisons. More...
#include <multiway_merge.hpp>
Public Types | |
using | self_type = guarded_iterator< RandomAccessIterator, Comparator > |
Our own type. More... | |
using | value_type = typename std::iterator_traits< RandomAccessIterator >::value_type |
Value type of the iterator. More... | |
Public Member Functions | |
guarded_iterator (RandomAccessIterator begin, RandomAccessIterator end, Comparator &comp) | |
Constructor. More... | |
self_type & | operator++ () |
Pre-increment operator. More... | |
value_type & | operator* () |
Dereference operator. More... | |
RandomAccessIterator & | iterator () |
Convert to wrapped iterator. More... | |
Protected Attributes | |
RandomAccessIterator | current |
Current iterator position. More... | |
RandomAccessIterator | end_ |
End iterator of the sequence. More... | |
Comparator & | comp_ |
Comparator. More... | |
Friends | |
bool | operator< (self_type &bi1, self_type &bi2) |
Compare two elements referenced by guarded iterators. More... | |
bool | operator<= (self_type &bi1, self_type &bi2) |
Compare two elements referenced by guarded iterators. More... | |
Iterator wrapper supporting an implicit supremum at the end of the sequence, dominating all comparisons.
Deriving from RandomAccessIterator is not possible since RandomAccessIterator need not be a class.
Definition at line 54 of file multiway_merge.hpp.
using self_type = guarded_iterator<RandomAccessIterator, Comparator> |
Our own type.
Definition at line 58 of file multiway_merge.hpp.
using value_type = typename std::iterator_traits<RandomAccessIterator>::value_type |
Value type of the iterator.
Definition at line 62 of file multiway_merge.hpp.
|
inline |
Constructor.
Sets iterator to beginning of sequence.
begin | Begin iterator of sequence. |
end | End iterator of sequence. |
comp | Comparator provided for associated overloaded compare operators. |
Definition at line 80 of file multiway_merge.hpp.
|
inline |
Convert to wrapped iterator.
Definition at line 106 of file multiway_merge.hpp.
|
inline |
|
inline |
Compare two elements referenced by guarded iterators.
bi1 | First iterator. |
bi2 | Second iterator. |
True
if less. Definition at line 116 of file multiway_merge.hpp.
Compare two elements referenced by guarded iterators.
bi1 | First iterator. |
bi2 | Second iterator. |
True
if less equal. Definition at line 130 of file multiway_merge.hpp.
|
protected |
Comparator.
Definition at line 70 of file multiway_merge.hpp.
|
protected |
Current iterator position.
Definition at line 66 of file multiway_merge.hpp.
|
protected |
End iterator of the sequence.
Definition at line 68 of file multiway_merge.hpp.