Reference documentation for deal.II version 8.1.0
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
TrilinosWrappers::SparseMatrixIterators::Iterator< Constness > Class Template Reference

#include <trilinos_sparse_matrix.h>

Public Types

typedef ::types::global_dof_index size_type
 
typedef Accessor< Constness >::MatrixType MatrixType
 

Public Member Functions

 Iterator (MatrixType *matrix, const size_type row, const size_type index)
 
template<bool Other>
 Iterator (const Iterator< Other > &other)
 
Iterator< Constness > & operator++ ()
 
Iterator< Constness > operator++ (int)
 
const Accessor< Constness > & operator* () const
 
const Accessor< Constness > * operator-> () const
 
bool operator== (const Iterator< Constness > &) const
 
bool operator!= (const Iterator< Constness > &) const
 
bool operator< (const Iterator< Constness > &) const
 
bool operator> (const Iterator< Constness > &) const
 
 DeclException2 (ExcInvalidIndexWithinRow, size_type, size_type,<< "Attempt to access element "<< arg2<< " of row "<< arg1<< " which doesn't have that many elements.")
 

Private Attributes

Accessor< Constness > accessor
 

Friends

template<bool Other>
class Iterator
 

Detailed Description

template<bool Constness>
class TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >

STL conforming iterator. This class acts as an iterator walking over the elements of Trilinos matrices. The implementation of this class is similar to the one for PETSc matrices.

Note that Trilinos stores the elements within each row in ascending order. This is opposed to the deal.II sparse matrix style where the diagonal element (if it exists) is stored before all other values, and the PETSc sparse matrices, where one can't guarantee a certain order of the elements.

Author
Martin Kronbichler, Wolfgang Bangerth, 2008

Definition at line 69 of file trilinos_sparse_matrix.h.

Member Typedef Documentation

Declare type for container size.

Definition at line 390 of file trilinos_sparse_matrix.h.

template<bool Constness>
typedef Accessor<Constness>::MatrixType TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::MatrixType

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

Definition at line 397 of file trilinos_sparse_matrix.h.

Constructor & Destructor Documentation

template<bool Constness>
TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::Iterator ( MatrixType matrix,
const size_type  row,
const size_type  index 
)

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

template<bool Constness>
template<bool Other>
TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::Iterator ( const Iterator< Other > &  other)

Copy constructor with optional change of constness.

Member Function Documentation

template<bool Constness>
Iterator<Constness>& TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator++ ( )

Prefix increment.

template<bool Constness>
Iterator<Constness> TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator++ ( int  )

Postfix increment.

template<bool Constness>
const Accessor<Constness>& TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator* ( ) const

Dereferencing operator.

template<bool Constness>
const Accessor<Constness>* TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator-> ( ) const

Dereferencing operator.

template<bool Constness>
bool TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator== ( const Iterator< Constness > &  ) const

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

template<bool Constness>
bool TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator!= ( const Iterator< Constness > &  ) const

Inverse of ==.

template<bool Constness>
bool TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator< ( const Iterator< Constness > &  ) 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.

template<bool Constness>
bool TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::operator> ( const Iterator< Constness > &  ) const

Comparison operator. The opposite of the previous operator

template<bool Constness>
TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::DeclException2 ( ExcInvalidIndexWithinRow  ,
size_type  ,
size_type  ,
<< "Attempt to access element "<< arg2<< " of row "<< arg1<< " which doesn't have that many elements."   
)

Exception

Member Data Documentation

template<bool Constness>
Accessor<Constness> TrilinosWrappers::SparseMatrixIterators::Iterator< Constness >::accessor
private

Store an object of the accessor class.

Definition at line 477 of file trilinos_sparse_matrix.h.


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