Public Types | Public Member Functions | Private Attributes | Friends

MatrixIterator< ACCESSOR > Class Template Reference

List of all members.

Public Types

typedef ACCESSOR::MatrixType MatrixType

Public Member Functions

 MatrixIterator (MatrixType *matrix, const unsigned int row=0, const unsigned int index=0)
template<class OtherAccessor >
 MatrixIterator (const MatrixIterator< OtherAccessor > &other)
MatrixIteratoroperator++ ()
MatrixIterator operator++ (int)
const ACCESSOR & operator* () const
const ACCESSOR * operator-> () const
bool operator== (const MatrixIterator &) const
bool operator!= (const MatrixIterator &) const
bool operator< (const MatrixIterator &) const
bool operator> (const MatrixIterator &) const

Private Attributes

ACCESSOR accessor

Friends

class MatrixIterator

Detailed Description

template<class ACCESSOR>
class MatrixIterator< ACCESSOR >

STL conforming iterator for constant and non-constant matrices.

This iterator is abstracted from the actual matrix type and can be used for any matrix having the required ACCESSOR type.

Author:
Guido Kanschat, 2006, based on previous a implementation

Definition at line 33 of file matrix_iterator.h.


Member Typedef Documentation

template<class ACCESSOR>
typedef ACCESSOR::MatrixType MatrixIterator< ACCESSOR >::MatrixType

Typedef for the matrix type (including constness) we are to operate on.

Definition at line 41 of file matrix_iterator.h.


Constructor & Destructor Documentation

template<class ACCESSOR >
MatrixIterator< ACCESSOR >::MatrixIterator ( MatrixType matrix,
const unsigned int  row = 0,
const unsigned int  index = 0 
) [inline]

Constructor. Create an iterator into the matrix matrix for the given row and the index within it.

Definition at line 139 of file matrix_iterator.h.

template<class ACCESSOR >
template<class OtherAccessor >
MatrixIterator< ACCESSOR >::MatrixIterator ( const MatrixIterator< OtherAccessor > &  other ) [inline]

Copy from another matrix iterator. Mostly implemented to allow initialization of a constant iterator from a non constant, this function only requires that a conversion from the other iterator's accessor to this accessor object is possible.

Definition at line 151 of file matrix_iterator.h.


Member Function Documentation

template<class ACCESSOR >
MatrixIterator< ACCESSOR > & MatrixIterator< ACCESSOR >::operator++ (  ) [inline]

Prefix increment.

Definition at line 160 of file matrix_iterator.h.

References MatrixIterator< ACCESSOR >::accessor.

template<class ACCESSOR >
MatrixIterator< ACCESSOR > MatrixIterator< ACCESSOR >::operator++ ( int   ) [inline]

Postfix increment.

Definition at line 170 of file matrix_iterator.h.

References MatrixIterator< ACCESSOR >::accessor.

template<class ACCESSOR >
const ACCESSOR & MatrixIterator< ACCESSOR >::operator* (  ) const [inline]

Dereferencing operator.

Definition at line 181 of file matrix_iterator.h.

References MatrixIterator< ACCESSOR >::accessor.

template<class ACCESSOR >
const ACCESSOR * MatrixIterator< ACCESSOR >::operator-> (  ) const [inline]

Dereferencing operator.

Definition at line 190 of file matrix_iterator.h.

References MatrixIterator< ACCESSOR >::accessor.

template<class ACCESSOR >
bool MatrixIterator< ACCESSOR >::operator== ( const MatrixIterator< ACCESSOR > &  other ) const [inline]

Comparison. True, if both accessors are equal.

Definition at line 200 of file matrix_iterator.h.

References MatrixIterator< ACCESSOR >::accessor.

template<class ACCESSOR >
bool MatrixIterator< ACCESSOR >::operator!= ( const MatrixIterator< ACCESSOR > &  other ) const [inline]

Inverse of ==.

Definition at line 210 of file matrix_iterator.h.

template<class ACCESSOR >
bool MatrixIterator< ACCESSOR >::operator< ( const MatrixIterator< ACCESSOR > &  other ) const [inline]

Comparison operator. Result is true if either the first row number is smaller or if the row numbers are equal and the first index is smaller.

This function is only valid if both iterators point into the same matrix.

Definition at line 220 of file matrix_iterator.h.

References MatrixIterator< ACCESSOR >::accessor, Assert, and StandardExceptions::ExcInternalError().

template<class ACCESSOR >
bool MatrixIterator< ACCESSOR >::operator> ( const MatrixIterator< ACCESSOR > &  other ) const [inline]

Comparison operator. Works in the same way as above operator, just the other way round.

Definition at line 233 of file matrix_iterator.h.


Friends And Related Function Documentation

template<class ACCESSOR>
friend class MatrixIterator [friend]

Allow other iterators access to private data.

Definition at line 130 of file matrix_iterator.h.


Member Data Documentation

template<class ACCESSOR>
ACCESSOR MatrixIterator< ACCESSOR >::accessor [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:09 by doxygen 1.7.2