Reference documentation for deal.II version Git 794e78bdba 2019-10-20 13:25:05 +0200
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
DynamicSparsityPatternIterators::Accessor Class Reference

#include <deal.II/lac/dynamic_sparsity_pattern.h>

Public Member Functions

 Accessor (const DynamicSparsityPattern *sparsity_pattern, const size_type row, const unsigned int index_within_row)
 
 Accessor (const DynamicSparsityPattern *sparsity_pattern)
 
 Accessor ()
 
size_type row () const
 
size_type index () const
 
size_type column () const
 
bool operator== (const Accessor &) const
 
bool operator< (const Accessor &) const
 

Protected Member Functions

void advance ()
 

Static Protected Member Functions

static ::ExceptionBaseDummyAccessor ()
 

Protected Attributes

const DynamicSparsityPatternsparsity_pattern
 
size_type current_row
 
std::vector< size_type >::const_iterator current_entry
 
std::vector< size_type >::const_iterator end_of_row
 

Detailed Description

Accessor class for iterators into objects of type DynamicSparsityPattern.

Note that this class only allows read access to elements, providing their row and column number (or alternatively the index within the complete sparsity pattern). It does not allow modifying the sparsity pattern itself.

Author
Wolfgang Bangerth
Date
2015

Definition at line 68 of file dynamic_sparsity_pattern.h.

Constructor & Destructor Documentation

◆ Accessor() [1/3]

DynamicSparsityPatternIterators::Accessor::Accessor ( const DynamicSparsityPattern sparsity_pattern,
const size_type  row,
const unsigned int  index_within_row 
)
inline

Constructor.

Definition at line 748 of file dynamic_sparsity_pattern.h.

◆ Accessor() [2/3]

DynamicSparsityPatternIterators::Accessor::Accessor ( const DynamicSparsityPattern sparsity_pattern)
inline

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

Definition at line 784 of file dynamic_sparsity_pattern.h.

◆ Accessor() [3/3]

DynamicSparsityPatternIterators::Accessor::Accessor ( )
inline

Default constructor creating a dummy accessor. This constructor is here only to be able to store accessors in STL containers such as std::vector.

Definition at line 793 of file dynamic_sparsity_pattern.h.

Member Function Documentation

◆ row()

size_type DynamicSparsityPatternIterators::Accessor::row ( ) const
inline

Row number of the element represented by this object.

Definition at line 802 of file dynamic_sparsity_pattern.h.

◆ index()

size_type DynamicSparsityPatternIterators::Accessor::index ( ) const
inline

Index within the current row of the element represented by this object.

Definition at line 822 of file dynamic_sparsity_pattern.h.

◆ column()

size_type DynamicSparsityPatternIterators::Accessor::column ( ) const
inline

Column number of the element represented by this object.

Definition at line 812 of file dynamic_sparsity_pattern.h.

◆ operator==()

bool DynamicSparsityPatternIterators::Accessor::operator== ( const Accessor other) const
inline

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

Definition at line 838 of file dynamic_sparsity_pattern.h.

◆ operator<()

bool DynamicSparsityPatternIterators::Accessor::operator< ( const 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 sparsity pattern.

Definition at line 855 of file dynamic_sparsity_pattern.h.

◆ advance()

void DynamicSparsityPatternIterators::Accessor::advance ( )
inlineprotected

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

Definition at line 881 of file dynamic_sparsity_pattern.h.

Member Data Documentation

◆ sparsity_pattern

const DynamicSparsityPattern* DynamicSparsityPatternIterators::Accessor::sparsity_pattern
protected

The sparsity pattern we operate on accessed.

Definition at line 134 of file dynamic_sparsity_pattern.h.

◆ current_row

size_type DynamicSparsityPatternIterators::Accessor::current_row
protected

The row we currently point into.

Definition at line 139 of file dynamic_sparsity_pattern.h.

◆ current_entry

std::vector<size_type>::const_iterator DynamicSparsityPatternIterators::Accessor::current_entry
protected

A pointer to the element within the current row that we currently point to.

Definition at line 145 of file dynamic_sparsity_pattern.h.

◆ end_of_row

std::vector<size_type>::const_iterator DynamicSparsityPatternIterators::Accessor::end_of_row
protected

A pointer to the end of the current row. We store this to make comparison against the end of line iterator cheaper as it otherwise needs to do the IndexSet translation from row index to the index within the 'lines' array of DynamicSparsityPattern.

Definition at line 153 of file dynamic_sparsity_pattern.h.


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