mf
Media Framework
|
Random access iterator which traverses an ndarray_view
.
More...
#include <ndarray_iterator.h>
Public Types | |
using | index_type = typename Array::index_type |
using | coordinates_type = typename Array::coordinates_type |
Public Member Functions | |
ndarray_iterator ()=default | |
ndarray_iterator (const Array &array, index_type index, pointer ptr) | |
ndarray_iterator (const ndarray_iterator &)=default | |
ndarray_iterator & | operator= (const ndarray_iterator &) |
ndarray_iterator & | operator++ () |
ndarray_iterator | operator++ (int) |
ndarray_iterator & | operator-- () |
ndarray_iterator | operator-- (int) |
ndarray_iterator & | operator+= (std::ptrdiff_t) |
ndarray_iterator & | operator-= (std::ptrdiff_t) |
reference | operator* () const noexcept |
pointer | operator-> () const noexcept |
reference | operator[] (std::ptrdiff_t n) const |
index_type | index () const noexcept |
coordinates_type | coordinates () const noexcept |
Static Public Attributes | |
static constexpr std::size_t | dimension = Array::dimension |
Friends | |
bool | operator== (const ndarray_iterator &a, const ndarray_iterator &b) noexcept |
bool | operator!= (const ndarray_iterator &a, const ndarray_iterator &b) noexcept |
bool | operator< (const ndarray_iterator &a, const ndarray_iterator &b) noexcept |
bool | operator<= (const ndarray_iterator &a, const ndarray_iterator &b) noexcept |
bool | operator> (const ndarray_iterator &a, const ndarray_iterator &b) noexcept |
bool | operator>= (const ndarray_iterator &a, const ndarray_iterator &b) noexcept |
ndarray_iterator | operator+ (const ndarray_iterator &it, std::ptrdiff_t n) |
ndarray_iterator | operator+ (std::ptrdiff_t n, const ndarray_iterator &it) |
ndarray_iterator | operator- (const ndarray_iterator &it, std::ptrdiff_t n) |
std::ptrdiff_t | operator- (const ndarray_iterator &a, const ndarray_iterator &b) |
Random access iterator which traverses an ndarray_view
.
Always traverses the elements in order of increasing index, regardless of strides. Random-access iterator operations (addition, comparation, etc.) act on index values. Index and coordinates of current item can be accessed using index() and coordinates(). Incrementation and decrementation are optimized when the strides of the ndarray_view
are (partially) default, i.e. items with sequential indices have sequential memory addresses, possibly with padding inbetween. This can be for the entire ndarray_view
, or just for smaller segments at a time.
using mf::ndarray_iterator< Array >::coordinates_type = typename Array::coordinates_type |
using mf::ndarray_iterator< Array >::index_type = typename Array::index_type |
|
default |
mf::ndarray_iterator< Array >::ndarray_iterator | ( | const Array & | array, |
index_type | index, | ||
pointer | ptr | ||
) |
|
default |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
auto mf::ndarray_iterator< Array >::operator++ | ( | ) |
auto mf::ndarray_iterator< Array >::operator++ | ( | int | ) |
auto mf::ndarray_iterator< Array >::operator+= | ( | std::ptrdiff_t | n | ) |
auto mf::ndarray_iterator< Array >::operator-- | ( | ) |
auto mf::ndarray_iterator< Array >::operator-- | ( | int | ) |
auto mf::ndarray_iterator< Array >::operator-= | ( | std::ptrdiff_t | n | ) |
|
inlinenoexcept |
auto mf::ndarray_iterator< Array >::operator= | ( | const ndarray_iterator< Array > & | it | ) |
|
inline |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |