PETScWrappers::MatrixIterators::const_iterator Class Reference
[PETScWrappers]

List of all members.

Classes

class  Accessor
class  ExcInvalidIndexWithinRow

Public Member Functions

 const_iterator (const MatrixBase *matrix, const unsigned int row, const unsigned int index)
const_iteratoroperator++ ()
const_iterator operator++ (int)
const Accessoroperator* () const
const Accessoroperator-> () const
bool operator== (const const_iterator &) const
bool operator!= (const const_iterator &) const
bool operator< (const const_iterator &) const

Private Attributes

Accessor accessor


Detailed Description

STL conforming iterator. This class acts as an iterator walking over the elements of PETSc matrices. Since PETSc offers a uniform interface for all types of matrices, this iterator can be used to access both sparse and full matrices.

Note that PETSc does not give any guarantees as to the order of elements within each row. Note also that accessing the elements of a full matrix surprisingly only shows the nonzero elements of the matrix, not all elements.

Author:
Guido Kanschat, Roy Stogner, Wolfgang Bangerth, 2004

Constructor & Destructor Documentation

PETScWrappers::MatrixIterators::const_iterator::const_iterator ( const MatrixBase matrix,
const unsigned int  row,
const unsigned int  index 
)

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


Member Function Documentation

const_iterator& PETScWrappers::MatrixIterators::const_iterator::operator++ (  ) 

Prefix increment.

const_iterator PETScWrappers::MatrixIterators::const_iterator::operator++ ( int   ) 

Postfix increment.

const Accessor& PETScWrappers::MatrixIterators::const_iterator::operator* (  )  const

Dereferencing operator.

const Accessor* PETScWrappers::MatrixIterators::const_iterator::operator-> (  )  const

Dereferencing operator.

bool PETScWrappers::MatrixIterators::const_iterator::operator== ( const const_iterator  )  const

Comparison. True, if both iterators point to the same matrix position.

bool PETScWrappers::MatrixIterators::const_iterator::operator!= ( const const_iterator  )  const

Inverse of ==.

bool PETScWrappers::MatrixIterators::const_iterator::operator< ( const const_iterator  )  const

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.


Member Data Documentation

Store an object of the accessor class.


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

deal.II documentation generated on Sat Aug 15 16:52:45 2009 by doxygen 1.5.9