AlgoPlus v0.1.0
Loading...
Searching...
No Matches
Mat2d< T, ROWS, COLS >::Iterator Class Reference

Iterator for Mat2d class. More...

#include <mat_2d.h>

Public Member Functions

 Iterator (T *_arr, size_t rows, size_t cols, size_t index) noexcept
 constructor for Iterator class
Iteratoroperator= (T *curr)
 operator = for Iterator class
Iteratoroperator++ ()
 operator ++ for Iterator class
Iteratoroperator++ (int)
Iteratoroperator-- ()
 operator – for Iterator class
Iteratoroperator-- (int)
 operator – for Iterator class
bool operator!= (const Iterator &it)
 operator != for Iterator class
template<typename A, size_t CCOLS>
Mat1d< A, CCOLS > & operator* ()
 operator * for Iterator class

Detailed Description

template<typename T, size_t ROWS, size_t COLS>
class Mat2d< T, ROWS, COLS >::Iterator

Iterator for Mat2d class.

Constructor & Destructor Documentation

◆ Iterator()

template<typename T, size_t ROWS, size_t COLS>
Mat2d< T, ROWS, COLS >::Iterator::Iterator ( T * _arr,
size_t rows,
size_t cols,
size_t index )
inlineexplicitnoexcept

constructor for Iterator class

Parameters
__arrthe input array
rowsthe number of rows of the matrix
colsthe number of columns of the matrix
indexthe current index, if it's begin() then 0, if it's end() then __size

Member Function Documentation

◆ operator!=()

template<typename T, size_t ROWS, size_t COLS>
bool Mat2d< T, ROWS, COLS >::Iterator::operator!= ( const Iterator & it)
inline

operator != for Iterator class

Returns
true if the elements of the array in the current index is not equal
false otherwise

◆ operator*()

template<typename T, size_t ROWS, size_t COLS>
template<typename A, size_t CCOLS>
Mat1d< A, CCOLS > & Mat2d< T, ROWS, COLS >::Iterator::operator* ( )
inline

operator * for Iterator class

Returns
Mat1d<T, COLS> the 1-Dimensional Matrix in the current row

◆ operator++() [1/2]

template<typename T, size_t ROWS, size_t COLS>
Iterator & Mat2d< T, ROWS, COLS >::Iterator::operator++ ( )
inline

operator ++ for Iterator class

Returns
Iterator&

◆ operator++() [2/2]

template<typename T, size_t ROWS, size_t COLS>
Iterator & Mat2d< T, ROWS, COLS >::Iterator::operator++ ( int )
inline
Parameters
operator++ for Iterator class
Returns
Iterator&

◆ operator--() [1/2]

template<typename T, size_t ROWS, size_t COLS>
Iterator & Mat2d< T, ROWS, COLS >::Iterator::operator-- ( )
inline

operator – for Iterator class

Returns
Iterator&

◆ operator--() [2/2]

template<typename T, size_t ROWS, size_t COLS>
Iterator & Mat2d< T, ROWS, COLS >::Iterator::operator-- ( int )
inline

operator – for Iterator class

Returns
Iterator&

◆ operator=()

template<typename T, size_t ROWS, size_t COLS>
Iterator & Mat2d< T, ROWS, COLS >::Iterator::operator= ( T * curr)
inline

operator = for Iterator class

Parameters
currthe current array
Returns
Iterator&

The documentation for this class was generated from the following file: