LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::genericMatrix< T >::const_iterator Class Reference

const iterator type (allows read-only operations). More...

#include <ltiGenericMatrix.h>

List of all members.

Public Member Functions

 const_iterator ()
 const_iterator (const const_iterator &other)
 const_iterator (const iterator &other)
const_iteratoroperator++ ()
const_iteratoroperator-- ()
const_iterator operator++ (int)
const_iterator operator-- (int)
const_iteratoroperator+= (const int n)
const_iteratoroperator-= (const int n)
const_iterator operator+ (const int n)
const_iterator operator- (const int n)
bool operator== (const const_iterator &other) const
bool operator!= (const const_iterator &other) const
bool operator== (const iterator &other) const
bool operator!= (const iterator &other) const
bool operator< (const iterator &other) const
bool operator> (const iterator &other) const
bool operator<= (const iterator &other) const
bool operator>= (const iterator &other) const
bool operator< (const const_iterator &other) const
bool operator> (const const_iterator &other) const
bool operator<= (const const_iterator &other) const
bool operator>= (const const_iterator &other) const
const T & operator* ()
const_iteratoroperator= (const const_iterator &other)
const_iteratoroperator= (const iterator &other)

Protected Member Functions

 const_iterator (const int startPos, const genericMatrix< T > *vct)

Detailed Description

template<class T>
class lti::genericMatrix< T >::const_iterator

const iterator type (allows read-only operations).

The use of the iterator classes is similar to the iterators of the STL (Standard Template Library). See lti::genericMatrix::begin() for an example.

For the debugging version of the iterators, boundary check will be done! This explains the low speed of the iterators of the debug version. In the release version, no boundary check will be done, and the iterators are sometimes a factor 10 faster than the debug iterators.

The use of the access operator at(.) is faster than the iterators in the debug version only. If you need to iterate on a genericMatrix use iterators instead (in the release version iterators are approx. a factor 3 faster than "at(.)").

Iterators don't work on lined matrices.

CAUTION: Try to use the prefix incremental operator (i.e. ++it) instead of the postfix operator (i.e. it++) to allow efficient code also in debug-modus!


Constructor & Destructor Documentation

template<class T>
lti::genericMatrix< T >::const_iterator::const_iterator (  )  [inline]
template<class T>
lti::genericMatrix< T >::const_iterator::const_iterator ( const const_iterator other  )  [inline]

copy constructor

template<class T>
lti::genericMatrix< T >::const_iterator::const_iterator ( const iterator other  )  [inline]

copy constructor

template<class T>
lti::genericMatrix< T >::const_iterator::const_iterator ( const int  startPos,
const genericMatrix< T > *  vct 
) [inline, explicit, protected]

protected constructor DO NOT EXPLICITLY USE THIS CONSTRUCTOR.

OTHERWISE YOUR CODE WILL NOT COMPILE IN THE RELEASE VERSION!


Member Function Documentation

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator!= ( const iterator other  )  const [inline]
template<class T>
bool lti::genericMatrix< T >::const_iterator::operator!= ( const const_iterator other  )  const [inline]

compare

template<class T>
const T& lti::genericMatrix< T >::const_iterator::operator* (  )  [inline]

get pointed data

template<class T>
const_iterator lti::genericMatrix< T >::const_iterator::operator+ ( const int  n  )  [inline]

advance (skip) some elements.

Use this operator with care! Note that you can skip the end of the vector, and read (or even worse: write!) out of bounds!

References lti::genericMatrix< T >::const_iterator::const_iterator().

template<class T>
const_iterator lti::genericMatrix< T >::const_iterator::operator++ ( int   )  [inline]

advance to next item -- postfix

template<class T>
const_iterator& lti::genericMatrix< T >::const_iterator::operator++ (  )  [inline]

advance to next item -- prefix

template<class T>
const_iterator& lti::genericMatrix< T >::const_iterator::operator+= ( const int  n  )  [inline]

advance (skip) some elements.

Use this operator with care! Note that you can skip the end of the genericMatrix, and read (or even worse: write!) out of bounds!

template<class T>
const_iterator lti::genericMatrix< T >::const_iterator::operator- ( const int  n  )  [inline]

recede (skip) some elements.

Use this operator with care! Note that you can skip the beginning of the vector, and read (or even worse: write!) out of bounds!

References lti::genericMatrix< T >::const_iterator::const_iterator().

template<class T>
const_iterator lti::genericMatrix< T >::const_iterator::operator-- ( int   )  [inline]

recede to previous item -- postfix

template<class T>
const_iterator& lti::genericMatrix< T >::const_iterator::operator-- (  )  [inline]

recede to previous item -- prefix

template<class T>
const_iterator& lti::genericMatrix< T >::const_iterator::operator-= ( const int  n  )  [inline]

recede (skip) some elements.

Use this operator with care! Note that you can skip the beginning of the genericMatrix, and read (or even worse: write!) out of bounds!

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator< ( const const_iterator other  )  const [inline]

compare if the position of the first iterator is smaller than the position of the second iterator

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator< ( const iterator other  )  const [inline]

compare if the position of the first iterator is smaller than the position of the second iterator

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator<= ( const const_iterator other  )  const [inline]

compare if the position of the first iterator is smaller or equal than the position of the second iterator

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator<= ( const iterator other  )  const [inline]

compare if the position of the first iterator is smaller or equal than the position of the second iterator

template<class T>
const_iterator& lti::genericMatrix< T >::const_iterator::operator= ( const iterator other  )  [inline]
template<class T>
const_iterator& lti::genericMatrix< T >::const_iterator::operator= ( const const_iterator other  )  [inline]

copy member

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator== ( const iterator other  )  const [inline]
template<class T>
bool lti::genericMatrix< T >::const_iterator::operator== ( const const_iterator other  )  const [inline]

compare

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator> ( const const_iterator other  )  const [inline]

compare if the position of the first iterator is greater than the position of the second iterator

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator> ( const iterator other  )  const [inline]

compare if the position of the first iterator is greater than the position of the second iterator

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator>= ( const const_iterator other  )  const [inline]

compare if the position of the first iterator is greater or equal than the position of the second iterator

template<class T>
bool lti::genericMatrix< T >::const_iterator::operator>= ( const iterator other  )  const [inline]

compare if the position of the first iterator is greater or equal than the position of the second iterator


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

Generated on Sat Apr 10 15:28:23 2010 for LTI-Lib by Doxygen 1.6.1