Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::TMatRowsIterator< T > Class Template Reference

Model of the Random Access Iterator concept for iterating through the ROWS of a TMat. More...

#include <TMatRowsIterator_decl.h>

Collaboration diagram for PLearn::TMatRowsIterator< T >:

Collaboration graph
[legend]
List of all members.

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 * ()
TMatRowsIteratoroperator++ ()
TMatRowsIterator operator++ (int)
TMatRowsIteratoroperator-- ()
TMatRowsIterator operator-- (int)
TMatRowsIteratoroperator+= (difference_type n)
TMatRowsIterator operator+ (difference_type n)
TMatRowsIteratoroperator-= (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


Detailed Description

template<class T>
class PLearn::TMatRowsIterator< T >

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.


Member Typedef Documentation

template<class T>
typedef ptrdiff_t PLearn::TMatRowsIterator< T >::difference_type
 

Definition at line 64 of file TMatRowsIterator_decl.h.

Referenced by PLearn::TMatRowsIterator< T >::operator-().

template<class T>
typedef random_access_iterator_tag PLearn::TMatRowsIterator< T >::iterator_category
 

Some useful typedefs.

Definition at line 62 of file TMatRowsIterator_decl.h.

template<class T>
typedef TVec<T>* PLearn::TMatRowsIterator< T >::pointer
 

Definition at line 65 of file TMatRowsIterator_decl.h.

template<class T>
typedef TVec<T>& PLearn::TMatRowsIterator< T >::reference
 

Definition at line 66 of file TMatRowsIterator_decl.h.

template<class T>
typedef TVec<T> PLearn::TMatRowsIterator< T >::value_type
 

Definition at line 63 of file TMatRowsIterator_decl.h.


Constructor & Destructor Documentation

template<class T>
PLearn::TMatRowsIterator< T >::TMatRowsIterator  )  [inline]
 

Definition at line 74 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::mod, PLearn::TMatRowsIterator< T >::ptr, and PLearn::TMatRowsIterator< T >::width.

template<class T>
PLearn::TMatRowsIterator< T >::TMatRowsIterator T *  p,
int  w,
int  m
[inline]
 

Definition at line 77 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::mod, PLearn::TMatRowsIterator< T >::ptr, and PLearn::TMatRowsIterator< T >::width.


Member Function Documentation

template<class T>
value_type PLearn::TMatRowsIterator< T >::operator *  )  [inline]
 

Definition at line 88 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::ptr, and PLearn::TMatRowsIterator< T >::width.

template<class T>
bool PLearn::TMatRowsIterator< T >::operator!= const TMatRowsIterator< T > &  y  )  [inline]
 

Definition at line 85 of file TMatRowsIterator_decl.h.

References PLearn::operator==().

template<class T>
TMatRowsIterator PLearn::TMatRowsIterator< T >::operator+ difference_type  n  )  [inline]
 

Definition at line 125 of file TMatRowsIterator_decl.h.

template<class T>
TMatRowsIterator PLearn::TMatRowsIterator< T >::operator++ int   )  [inline]
 

Definition at line 101 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::mod, and PLearn::TMatRowsIterator< T >::ptr.

template<class T>
TMatRowsIterator& PLearn::TMatRowsIterator< T >::operator++  )  [inline]
 

Definition at line 96 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::mod, and PLearn::TMatRowsIterator< T >::ptr.

template<class T>
TMatRowsIterator& PLearn::TMatRowsIterator< T >::operator+= difference_type  n  )  [inline]
 

Definition at line 120 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::mod, and PLearn::TMatRowsIterator< T >::ptr.

template<class T>
difference_type PLearn::TMatRowsIterator< T >::operator- const TMatRowsIterator< T > &  y  )  [inline]
 

Definition at line 142 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::difference_type, PLearn::TMatRowsIterator< T >::mod, and PLearn::TMatRowsIterator< T >::ptr.

template<class T>
TMatRowsIterator PLearn::TMatRowsIterator< T >::operator- difference_type  n  )  [inline]
 

Definition at line 136 of file TMatRowsIterator_decl.h.

template<class T>
TMatRowsIterator PLearn::TMatRowsIterator< T >::operator-- int   )  [inline]
 

Definition at line 113 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::mod, and PLearn::TMatRowsIterator< T >::ptr.

template<class T>
TMatRowsIterator& PLearn::TMatRowsIterator< T >::operator--  )  [inline]
 

Definition at line 108 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::mod, and PLearn::TMatRowsIterator< T >::ptr.

template<class T>
TMatRowsIterator& PLearn::TMatRowsIterator< T >::operator-= difference_type  n  )  [inline]
 

Definition at line 131 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::mod, and PLearn::TMatRowsIterator< T >::ptr.

template<class T>
bool PLearn::TMatRowsIterator< T >::operator< const TMatRowsIterator< T > &  y  )  [inline]
 

Definition at line 150 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::ptr.

template<class T>
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.

template<class T>
value_type PLearn::TMatRowsIterator< T >::operator[] difference_type  n  )  [inline]
 

Definition at line 146 of file TMatRowsIterator_decl.h.

References PLearn::TMatRowsIterator< T >::mod, PLearn::TMatRowsIterator< T >::operator[](), PLearn::TMatRowsIterator< T >::ptr, and PLearn::TMatRowsIterator< T >::width.

Referenced by PLearn::TMatRowsIterator< T >::operator[]().


Member Data Documentation

template<class T>
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++(), PLearn::TMatRowsIterator< T >::operator+=(), PLearn::TMatRowsIterator< T >::operator-(), PLearn::TMatRowsIterator< T >::operator--(), PLearn::TMatRowsIterator< T >::operator-=(), PLearn::TMatRowsIterator< T >::operator==(), PLearn::TMatRowsIterator< T >::operator[](), and PLearn::TMatRowsIterator< T >::TMatRowsIterator().

template<class T>
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++(), PLearn::TMatRowsIterator< T >::operator+=(), PLearn::TMatRowsIterator< T >::operator-(), PLearn::TMatRowsIterator< T >::operator--(), PLearn::TMatRowsIterator< T >::operator-=(), PLearn::TMatRowsIterator< T >::operator<(), PLearn::TMatRowsIterator< T >::operator==(), PLearn::TMatRowsIterator< T >::operator[](), and PLearn::TMatRowsIterator< T >::TMatRowsIterator().

template<class T>
int PLearn::TMatRowsIterator< T >::width [private]
 

vector width

Definition at line 70 of file TMatRowsIterator_decl.h.

Referenced by PLearn::TMatRowsIterator< T >::operator *(), PLearn::TMatRowsIterator< T >::operator==(), PLearn::TMatRowsIterator< T >::operator[](), and PLearn::TMatRowsIterator< T >::TMatRowsIterator().


The documentation for this class was generated from the following file:
Generated on Tue Aug 17 16:24:05 2004 for PLearn by doxygen 1.3.7