Public Member Functions | |
| Accessor (const SparseMatrix *matrix, const unsigned int row, const unsigned int index) | |
| unsigned int | row () const |
| unsigned int | index () const |
| unsigned int | column () const |
| TrilinosScalar | value () const |
Static Public Member Functions | |
| ::ExceptionBase & | ExcBeyondEndOfMatrix () |
| ::ExceptionBase & | ExcAccessToNonlocalRow (int arg1, int arg2, int arg3) throw (errortext << "You tried to access row " << arg1 << " of a distributed matrix, but only rows " << arg2 << " through " << arg3 << " are stored locally and can be accessed." ) |
Private Member Functions | |
| void | visit_present_row () |
Private Attributes | |
| SparseMatrix * | matrix |
| unsigned int | a_row |
| unsigned int | a_index |
| std_cxx1x::shared_ptr < std::vector< unsigned int > > | colnum_cache |
| std_cxx1x::shared_ptr < std::vector< TrilinosScalar > > | value_cache |
Friends | |
| class | const_iterator |
Accessor class for iterators
Definition at line 81 of file trilinos_sparse_matrix.h.
| TrilinosWrappers::MatrixIterators::const_iterator::Accessor::Accessor | ( | const SparseMatrix * | matrix, |
| const unsigned int | row, | ||
| const unsigned int | index | ||
| ) |
Constructor. Since we use accessors only for read access, a const matrix pointer is sufficient.
| unsigned int TrilinosWrappers::MatrixIterators::const_iterator::Accessor::row | ( | ) | const |
Row number of the element represented by this object.
| unsigned int TrilinosWrappers::MatrixIterators::const_iterator::Accessor::index | ( | ) | const |
Index in row of the element represented by this object.
| unsigned int TrilinosWrappers::MatrixIterators::const_iterator::Accessor::column | ( | ) | const |
Column number of the element represented by this object.
| TrilinosScalar TrilinosWrappers::MatrixIterators::const_iterator::Accessor::value | ( | ) | const |
Value of this matrix entry.
| ::ExceptionBase& TrilinosWrappers::MatrixIterators::const_iterator::Accessor::ExcBeyondEndOfMatrix | ( | ) | [static] |
Exception
| ::ExceptionBase& TrilinosWrappers::MatrixIterators::const_iterator::Accessor::ExcAccessToNonlocalRow | ( | int | arg1, |
| int | arg2, | ||
| int | arg3 | ||
| ) | throw (errortext << "You tried to access row " << arg1 << " of a distributed matrix, but only rows " << arg2 << " through " << arg3 << " are stored locally and can be accessed." ) [static] |
Exception
| void TrilinosWrappers::MatrixIterators::const_iterator::Accessor::visit_present_row | ( | ) | [private] |
Discard the old row caches (they may still be used by other accessors) and generate new ones for the row pointed to presently by this accessor.
friend class const_iterator [friend] |
Make enclosing class a friend.
Definition at line 195 of file trilinos_sparse_matrix.h.
SparseMatrix* TrilinosWrappers::MatrixIterators::const_iterator::Accessor::matrix [mutable, private] |
The matrix accessed.
Definition at line 136 of file trilinos_sparse_matrix.h.
Current row number.
Definition at line 141 of file trilinos_sparse_matrix.h.
Current index in row.
Definition at line 146 of file trilinos_sparse_matrix.h.
std_cxx1x::shared_ptr<std::vector<unsigned int> > TrilinosWrappers::MatrixIterators::const_iterator::Accessor::colnum_cache [private] |
Cache where we store the column indices of the present row. This is necessary, since Trilinos makes access to the elements of its matrices rather hard, and it is much more efficient to copy all column entries of a row once when we enter it than repeatedly asking Trilinos for individual ones. This also makes some sense since it is likely that we will access them sequentially anyway.
In order to make copying of iterators/accessor of acceptable performance, we keep a shared pointer to these entries so that more than one accessor can access this data if necessary.
Definition at line 173 of file trilinos_sparse_matrix.h.
std_cxx1x::shared_ptr<std::vector<TrilinosScalar> > TrilinosWrappers::MatrixIterators::const_iterator::Accessor::value_cache [private] |
Similar cache for the values of this row.
Definition at line 179 of file trilinos_sparse_matrix.h.
documentation generated on Fri Feb 3 2012 06:04:18 by
doxygen
1.7.2