internals::SparsityPatternIterators::Accessor Class Reference

Inheritance diagram for internals::SparsityPatternIterators::Accessor:

Inheritance graph
[legend]

List of all members.

Classes

class  ExcInvalidIterator

Public Member Functions

 Accessor (const SparsityPattern *matrix, const unsigned int row, const unsigned int index)
 Accessor (const SparsityPattern *matrix)
unsigned int row () const
unsigned int index () const
unsigned int column () const
bool is_valid_entry () const
bool operator== (const Accessor &) const
bool operator< (const Accessor &) const

Protected Member Functions

void advance ()

Protected Attributes

const SparsityPatternsparsity_pattern
unsigned int a_row
unsigned int a_index

Friends

class Iterator


Detailed Description

Accessor class for iterators into sparsity patterns. This class is also the base class for both const and non-const accessor classes into sparse matrices.

Note that this class only allow read access to elements, providing their row and column number. It does not allow to modify the sparsity pattern itself.


Constructor & Destructor Documentation

internals::SparsityPatternIterators::Accessor::Accessor ( const SparsityPattern matrix,
const unsigned int  row,
const unsigned int  index 
)

Constructor.

internals::SparsityPatternIterators::Accessor::Accessor ( const SparsityPattern matrix  ) 

Constructor. Construct the end accessor for the given sparsity pattern.


Member Function Documentation

unsigned int internals::SparsityPatternIterators::Accessor::row (  )  const

Row number of the element represented by this object. This function can only be called for entries for which is_valid_entry() is true.

unsigned int internals::SparsityPatternIterators::Accessor::index (  )  const

Index in row of the element represented by this object. This function can only be called for entries for which is_valid_entry() is true.

unsigned int internals::SparsityPatternIterators::Accessor::column (  )  const

Column number of the element represented by this object. This function can only be called for entries for which is_valid_entry() is true.

bool internals::SparsityPatternIterators::Accessor::is_valid_entry (  )  const [inline]

Return whether the sparsity pattern entry pointed to by this iterator is valid or not. Note that after compressing the sparsity pattern, all entries are valid. However, before compression, the sparsity pattern allocated some memory to be used while still adding new nonzero entries; if you create iterators in this phase of the sparsity pattern's lifetime, you will iterate over elements that are not valid. If this is so, then this function will return false.

bool internals::SparsityPatternIterators::Accessor::operator== ( const Accessor  )  const

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

bool internals::SparsityPatternIterators::Accessor::operator< ( const Accessor  )  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.

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

void internals::SparsityPatternIterators::Accessor::advance (  )  [protected]

Move the accessor to the next nonzero entry in the matrix.


Friends And Related Function Documentation

friend class Iterator [friend]


Member Data Documentation

The sparsity pattern we operate on accessed.

Current row number.

Current index in row.


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

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