|
PLearn 0.1
|
Model of the Random Access Iterator concept for iterating through the ROWS of a TMat. More...
#include <TMatRowsIterator_decl.h>

Public Types | |
| typedef random_access_iterator_tag | iterator_category |
| Some useful typedefs. | |
| typedef TVec< T > | value_type |
| typedef ptrdiff_t | difference_type |
| typedef TVec< T > * | pointer |
| typedef TVec< T > & | reference |
Public Member Functions | |
| TMatRowsIterator () | |
| TMatRowsIterator (T *p, int w, int m) | |
| bool | operator== (const TMatRowsIterator &other) const |
| bool | operator!= (const TMatRowsIterator &y) |
| value_type | operator* () |
| TMatRowsIterator & | operator++ () |
| TMatRowsIterator | operator++ (int) |
| TMatRowsIterator & | operator-- () |
| TMatRowsIterator | operator-- (int) |
| TMatRowsIterator & | operator+= (difference_type n) |
| TMatRowsIterator | operator+ (difference_type n) |
| TMatRowsIterator & | operator-= (difference_type n) |
| TMatRowsIterator | operator- (difference_type n) |
| difference_type | operator- (const TMatRowsIterator &y) |
| value_type | operator[] (difference_type n) |
| bool | operator< (const TMatRowsIterator &y) |
Private Attributes | |
| T * | ptr |
| current row pointer | |
| int | width |
| vector width | |
| int | mod |
| mod in underlying matrix | |
Model of the Random Access Iterator concept for iterating through the ROWS of a TMat.
The basic idea is that operator* returns the current row as a TVec.
Definition at line 58 of file TMatRowsIterator_decl.h.
| typedef ptrdiff_t PLearn::TMatRowsIterator< T >::difference_type |
Definition at line 64 of file TMatRowsIterator_decl.h.
| typedef random_access_iterator_tag PLearn::TMatRowsIterator< T >::iterator_category |
Some useful typedefs.
Definition at line 62 of file TMatRowsIterator_decl.h.
| typedef TVec<T>* PLearn::TMatRowsIterator< T >::pointer |
Definition at line 65 of file TMatRowsIterator_decl.h.
| typedef TVec<T>& PLearn::TMatRowsIterator< T >::reference |
Definition at line 66 of file TMatRowsIterator_decl.h.
| typedef TVec<T> PLearn::TMatRowsIterator< T >::value_type |
Definition at line 63 of file TMatRowsIterator_decl.h.
| PLearn::TMatRowsIterator< T >::TMatRowsIterator | ( | ) | [inline] |
Definition at line 74 of file TMatRowsIterator_decl.h.
| PLearn::TMatRowsIterator< T >::TMatRowsIterator | ( | T * | p, |
| int | w, | ||
| int | m | ||
| ) | [inline] |
Definition at line 77 of file TMatRowsIterator_decl.h.
| bool PLearn::TMatRowsIterator< T >::operator!= | ( | const TMatRowsIterator< T > & | y | ) | [inline] |
Definition at line 85 of file TMatRowsIterator_decl.h.
References PLearn::operator==().
{ return !operator==(y); }

| value_type PLearn::TMatRowsIterator< T >::operator* | ( | ) | [inline] |
Definition at line 88 of file TMatRowsIterator_decl.h.
| TMatRowsIterator PLearn::TMatRowsIterator< T >::operator+ | ( | difference_type | n | ) | [inline] |
Definition at line 125 of file TMatRowsIterator_decl.h.
References n.
{
TMatRowsIterator r(*this);
r += n;
return r;
}
| TMatRowsIterator& PLearn::TMatRowsIterator< T >::operator++ | ( | ) | [inline] |
Definition at line 96 of file TMatRowsIterator_decl.h.
| TMatRowsIterator PLearn::TMatRowsIterator< T >::operator++ | ( | int | ) | [inline] |
Definition at line 101 of file TMatRowsIterator_decl.h.
{
TMatRowsIterator r(*this);
ptr += mod;
return r;
}
| TMatRowsIterator& PLearn::TMatRowsIterator< T >::operator+= | ( | difference_type | n | ) | [inline] |
Definition at line 120 of file TMatRowsIterator_decl.h.
| TMatRowsIterator PLearn::TMatRowsIterator< T >::operator- | ( | difference_type | n | ) | [inline] |
Definition at line 136 of file TMatRowsIterator_decl.h.
References n.
{
TMatRowsIterator r(*this);
r -= n;
return r;
}
| difference_type PLearn::TMatRowsIterator< T >::operator- | ( | const TMatRowsIterator< T > & | y | ) | [inline] |
Definition at line 142 of file TMatRowsIterator_decl.h.
References PLearn::TMatRowsIterator< T >::ptr.
| TMatRowsIterator PLearn::TMatRowsIterator< T >::operator-- | ( | int | ) | [inline] |
Definition at line 113 of file TMatRowsIterator_decl.h.
{
TMatRowsIterator r(*this);
ptr -= mod;
return r;
}
| TMatRowsIterator& PLearn::TMatRowsIterator< T >::operator-- | ( | ) | [inline] |
Definition at line 108 of file TMatRowsIterator_decl.h.
| TMatRowsIterator& PLearn::TMatRowsIterator< T >::operator-= | ( | difference_type | n | ) | [inline] |
Definition at line 131 of file TMatRowsIterator_decl.h.
| bool PLearn::TMatRowsIterator< T >::operator< | ( | const TMatRowsIterator< T > & | y | ) | [inline] |
Definition at line 150 of file TMatRowsIterator_decl.h.
References PLearn::TMatRowsIterator< T >::ptr.
{
return ptr < y.ptr;
}
| bool PLearn::TMatRowsIterator< T >::operator== | ( | const TMatRowsIterator< T > & | other | ) | const [inline] |
Definition at line 81 of file TMatRowsIterator_decl.h.
References PLearn::TMatRowsIterator< T >::mod, PLearn::TMatRowsIterator< T >::ptr, and PLearn::TMatRowsIterator< T >::width.
| value_type PLearn::TMatRowsIterator< T >::operator[] | ( | difference_type | n | ) | [inline] |
int PLearn::TMatRowsIterator< T >::mod [private] |
mod in underlying matrix
Definition at line 71 of file TMatRowsIterator_decl.h.
Referenced by PLearn::TMatRowsIterator< T >::operator==().
T* PLearn::TMatRowsIterator< T >::ptr [private] |
current row pointer
Definition at line 69 of file TMatRowsIterator_decl.h.
Referenced by PLearn::TMatRowsIterator< T >::operator-(), PLearn::TMatRowsIterator< T >::operator<(), and PLearn::TMatRowsIterator< T >::operator==().
int PLearn::TMatRowsIterator< T >::width [private] |
vector width
Definition at line 70 of file TMatRowsIterator_decl.h.
Referenced by PLearn::TMatRowsIterator< T >::operator==().
1.7.4