|
tatami
C++ API for different matrix representations
|
Random-access iterator class. More...
#include <SomeNumericArray.hpp>
Public Types | |
| using | iterator_category = std::random_access_iterator_tag |
| using | difference_type = std::ptrdiff_t |
| using | value_type = Value_ |
| using | pointer = const Value_* |
| using | reference = const Value_& |
Public Member Functions | |
| Iterator () | |
| Iterator (const SomeNumericArray *const parent, const std::size_t index) | |
| value_type | operator* () const |
| value_type | operator[] (const std::size_t i) const |
| bool | operator== (const Iterator &right) const |
| bool | operator!= (const Iterator &right) const |
| bool | operator< (const Iterator &right) const |
| bool | operator>= (const Iterator &right) const |
| bool | operator> (const Iterator &right) const |
| bool | operator<= (const Iterator &right) const |
| Iterator & | operator+= (const std::size_t n) |
| Iterator & | operator++ () |
| Iterator | operator++ (const int) |
| Iterator & | operator-= (const std::size_t n) |
| Iterator & | operator-- () |
| Iterator | operator-- (const int) |
| Iterator | operator+ (const std::size_t n) const |
| Iterator | operator- (const std::size_t n) const |
| std::ptrdiff_t | operator- (const Iterator &right) const |
Friends | |
| Iterator | operator+ (const std::size_t n, const Iterator &it) |
Random-access iterator class.
This mimics the const iterators for std::vector types.
| using tatami::SomeNumericArray< Value_ >::Iterator::iterator_category = std::random_access_iterator_tag |
Random access iterator tag.
| using tatami::SomeNumericArray< Value_ >::Iterator::difference_type = std::ptrdiff_t |
Difference type.
| using tatami::SomeNumericArray< Value_ >::Iterator::value_type = Value_ |
Value type.
| using tatami::SomeNumericArray< Value_ >::Iterator::pointer = const Value_* |
Pointer type, note the const.
| using tatami::SomeNumericArray< Value_ >::Iterator::reference = const Value_& |
Reference type, note the const.
|
inline |
Default constructor.
|
inline |
| parent | Pointer to the parental SomeNumericArray object. |
| index | Index along the parental array, representing the current position of the iterator. |
Needless to say, we assume that the parental array outlives the iterator.
|
inline |
SomeNumericArray object.
|
inline |
| i | The number of elements to add to the current position of the iterator to obtain a new position. |
SomeNumericArray object.
|
inline |
| right | Another Iterator object referencing the same parental array. |
right are pointing to the same position.
|
inline |
| right | Another Iterator object referencing the same parental array. |
right are pointing to different positions.
|
inline |
| right | Another Iterator object referencing the same parental array. |
right.
|
inline |
| right | Another Iterator object referencing the same parental array. |
right.
|
inline |
| right | Another Iterator object referencing the same parental array. |
right.
|
inline |
| right | Another Iterator object referencing the same parental array. |
right.
|
inline |
| n | Number of elements to advance the current iterator. |
n, and a reference to the iterator is returned.
|
inline |
|
inline |
|
inline |
| n | Number of elements to move back the current iterator. |
n, and a reference to the iterator is returned.
|
inline |
|
inline |
|
inline |
| n | Number of elements to advance the iterator. |
n.
|
inline |
| n | Number of elements to move back the iterator. |
n.
|
inline |
| right | Another Iterator object referencing the same parental array. |
| n | Number of elements to advance the iterator. |
| it | An existing Iterator. |
it plus n.