Theoretica
A C++ numerical and automatic mathematical library
|
A sequential iterator for matrices. More...
#include <mat.h>
Public Types | |
using | iterator_category = std::forward_iterator_tag |
using | value_type = matrix_element_t< Matrix > |
using | pointer = value_type * |
using | reference = value_type & |
Public Member Functions | |
mat_iterator (Matrix &matrix, size_t row=0, size_t col=0) | |
Construct iterator from a matrix. | |
ReturnType | operator* () |
Dereference the iterator to get the current element by reference. | |
mat_iterator & | operator++ () |
Move to the next element in the matrix. | |
size_t | row_index () |
Get the index of the current row. | |
size_t | col_index () |
Get the index of the current column. | |
bool | operator== (const mat_iterator &other) const |
Move to the previous element in the matrix. | |
bool | operator!= (const mat_iterator &other) const |
A sequential iterator for matrices.
A const iterator may be constructed by specifying both typenames Matrix and ReturnType as const.