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

PLearn::TMatColRowsIterator< T > Class Template Reference

Model of the Random Access Iterator concept for iterating through a single column of a TMat, one row at a time. More...

#include <TMatColRowsIterator_decl.h>

Collaboration diagram for PLearn::TMatColRowsIterator< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef random_access_iterator_tag iterator_category
 Some useful typedefs.

typedef T value_type
typedef ptrdiff_t difference_type
typedef T * pointer
typedef T & reference

Public Member Functions

 TMatColRowsIterator ()
 TMatColRowsIterator (T *p, int m)
 This constructor assumes that p points to the proper initial element.

bool operator== (const TMatColRowsIterator &other) const
reference operator * ()
reference operator-> ()
TMatColRowsIterator< T > & operator++ ()
TMatColRowsIterator< T > operator++ (int)
TMatColRowsIterator< T > & operator-- ()
TMatColRowsIterator< T > operator-- (int)
TMatColRowsIterator< T > & operator+= (difference_type n)
TMatColRowsIterator< T > operator+ (difference_type n)
TMatColRowsIterator< T > & operator-= (difference_type n)
TMatColRowsIterator< T > operator- (difference_type n)
difference_type operator- (const TMatColRowsIterator< T > &y)
reference operator[] (difference_type n)
bool operator< (const TMatColRowsIterator< T > &y)

Private Attributes

T * ptr
 current element pointer

int mod
 mod in underlying matrix


Detailed Description

template<class T>
class PLearn::TMatColRowsIterator< T >

Model of the Random Access Iterator concept for iterating through a single column of a TMat, one row at a time.

The basic idea is that operator* returns a T for the given column of the current row. Very useful for passing to STL algorithms.

Definition at line 59 of file TMatColRowsIterator_decl.h.


Member Typedef Documentation

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

Definition at line 65 of file TMatColRowsIterator_decl.h.

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

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

Some useful typedefs.

Definition at line 63 of file TMatColRowsIterator_decl.h.

template<class T>
typedef T* PLearn::TMatColRowsIterator< T >::pointer
 

Definition at line 66 of file TMatColRowsIterator_decl.h.

template<class T>
typedef T& PLearn::TMatColRowsIterator< T >::reference
 

Definition at line 67 of file TMatColRowsIterator_decl.h.

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

template<class T>
typedef T PLearn::TMatColRowsIterator< T >::value_type
 

Definition at line 64 of file TMatColRowsIterator_decl.h.


Constructor & Destructor Documentation

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

Definition at line 74 of file TMatColRowsIterator_decl.h.

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

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

This constructor assumes that p points to the proper initial element.

Definition at line 78 of file TMatColRowsIterator_decl.h.

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


Member Function Documentation

template<class T>
reference PLearn::TMatColRowsIterator< T >::operator *  )  [inline]
 

Definition at line 86 of file TMatColRowsIterator_decl.h.

References PLearn::TMatColRowsIterator< T >::ptr, and PLearn::TMatColRowsIterator< T >::reference.

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

Definition at line 124 of file TMatColRowsIterator_decl.h.

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

Definition at line 100 of file TMatColRowsIterator_decl.h.

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

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

Definition at line 95 of file TMatColRowsIterator_decl.h.

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

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

Definition at line 119 of file TMatColRowsIterator_decl.h.

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

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

Definition at line 141 of file TMatColRowsIterator_decl.h.

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

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

Definition at line 135 of file TMatColRowsIterator_decl.h.

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

Definition at line 112 of file TMatColRowsIterator_decl.h.

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

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

Definition at line 107 of file TMatColRowsIterator_decl.h.

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

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

Definition at line 130 of file TMatColRowsIterator_decl.h.

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

template<class T>
reference PLearn::TMatColRowsIterator< T >::operator->  )  [inline]
 

< works if T is some kind

< of smart pointer

Definition at line 90 of file TMatColRowsIterator_decl.h.

References PLearn::TMatColRowsIterator< T >::ptr, and PLearn::TMatColRowsIterator< T >::reference.

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

Definition at line 149 of file TMatColRowsIterator_decl.h.

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

template<class T>
bool PLearn::TMatColRowsIterator< T >::operator== const TMatColRowsIterator< T > &  other  )  const [inline]
 

Definition at line 82 of file TMatColRowsIterator_decl.h.

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

template<class T>
reference PLearn::TMatColRowsIterator< T >::operator[] difference_type  n  )  [inline]
 

Definition at line 145 of file TMatColRowsIterator_decl.h.

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

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


Member Data Documentation

template<class T>
int PLearn::TMatColRowsIterator< T >::mod [private]
 

mod in underlying matrix

Definition at line 71 of file TMatColRowsIterator_decl.h.

Referenced by PLearn::TMatColRowsIterator< T >::operator++(), PLearn::TMatColRowsIterator< T >::operator+=(), PLearn::TMatColRowsIterator< T >::operator-(), PLearn::TMatColRowsIterator< T >::operator--(), PLearn::TMatColRowsIterator< T >::operator-=(), PLearn::TMatColRowsIterator< T >::operator==(), PLearn::TMatColRowsIterator< T >::operator[](), and PLearn::TMatColRowsIterator< T >::TMatColRowsIterator().

template<class T>
T* PLearn::TMatColRowsIterator< T >::ptr [private]
 

current element pointer

Definition at line 70 of file TMatColRowsIterator_decl.h.

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


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