Reference documentation for deal.II version 9.6.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
MatrixIterator< AccessorType > Class Template Reference

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

Public Types

using size_type = types::global_dof_index
 
using MatrixType = typename AccessorType::MatrixType
 

Public Member Functions

 MatrixIterator (MatrixType *matrix, const size_type row=0, const size_type index=0)
 
template<class OtherAccessorType >
 MatrixIterator (const MatrixIterator< OtherAccessorType > &other)
 
MatrixIteratoroperator++ ()
 
MatrixIterator operator++ (int)
 
const AccessorType & operator* () const
 
const AccessorType * operator-> () const
 
template<class OtherAccessorType >
bool operator== (const MatrixIterator< OtherAccessorType > &) const
 
template<class OtherAccessorType >
bool operator!= (const MatrixIterator< OtherAccessorType > &) const
 
bool operator< (const MatrixIterator &) const
 
bool operator> (const MatrixIterator &) const
 

Private Attributes

AccessorType accessor
 

Friends

template<class OtherAccessorType >
class MatrixIterator
 

Detailed Description

template<typename AccessorType>
class MatrixIterator< AccessorType >

Iterator for constant and non-constant matrices.

This iterator is abstracted from the actual matrix type and can be used for any matrix having the required AccessorType type.

Definition at line 32 of file matrix_iterator.h.

Member Typedef Documentation

◆ size_type

template<typename AccessorType >
using MatrixIterator< AccessorType >::size_type = types::global_dof_index

Declare type for container size.

Definition at line 38 of file matrix_iterator.h.

◆ MatrixType

template<typename AccessorType >
using MatrixIterator< AccessorType >::MatrixType = typename AccessorType::MatrixType

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

Definition at line 43 of file matrix_iterator.h.

Constructor & Destructor Documentation

◆ MatrixIterator() [1/2]

template<typename AccessorType >
MatrixIterator< AccessorType >::MatrixIterator ( MatrixType * matrix,
const size_type row = 0,
const size_type index = 0 )
inline

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

Definition at line 131 of file matrix_iterator.h.

◆ MatrixIterator() [2/2]

template<typename AccessorType >
template<class OtherAccessorType >
MatrixIterator< AccessorType >::MatrixIterator ( const MatrixIterator< OtherAccessorType > & other)
inline

Copy from another matrix iterator. Mostly implemented to allow initialization of a constant iterator from a non constant, this function only requires that a conversion from the other iterator's AccessorType to this AccessorType object is possible.

Definition at line 140 of file matrix_iterator.h.

Member Function Documentation

◆ operator++() [1/2]

template<typename AccessorType >
MatrixIterator< AccessorType > & MatrixIterator< AccessorType >::operator++ ( )
inline

Prefix increment.

Definition at line 148 of file matrix_iterator.h.

◆ operator++() [2/2]

template<typename AccessorType >
MatrixIterator< AccessorType > MatrixIterator< AccessorType >::operator++ ( int )
inline

Postfix increment.

Definition at line 157 of file matrix_iterator.h.

◆ operator*()

template<typename AccessorType >
const AccessorType & MatrixIterator< AccessorType >::operator* ( ) const
inline

Dereferencing operator.

Definition at line 167 of file matrix_iterator.h.

◆ operator->()

template<typename AccessorType >
const AccessorType * MatrixIterator< AccessorType >::operator-> ( ) const
inline

Dereferencing operator.

Definition at line 175 of file matrix_iterator.h.

◆ operator==()

template<typename AccessorType >
template<class OtherAccessorType >
bool MatrixIterator< AccessorType >::operator== ( const MatrixIterator< OtherAccessorType > & other) const
inline

Comparison. True, if both accessors are equal.

Definition at line 184 of file matrix_iterator.h.

◆ operator!=()

template<typename AccessorType >
template<class OtherAccessorType >
bool MatrixIterator< AccessorType >::operator!= ( const MatrixIterator< OtherAccessorType > & other) const
inline

Inverse of ==.

Definition at line 194 of file matrix_iterator.h.

◆ operator<()

template<typename AccessorType >
bool MatrixIterator< AccessorType >::operator< ( const MatrixIterator< AccessorType > & 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 matrix.

Definition at line 202 of file matrix_iterator.h.

◆ operator>()

template<typename AccessorType >
bool MatrixIterator< AccessorType >::operator> ( const MatrixIterator< AccessorType > & other) const
inline

Comparison operator. Works in the same way as above operator, just the other way round.

Definition at line 214 of file matrix_iterator.h.

Friends And Related Symbol Documentation

◆ MatrixIterator

template<typename AccessorType >
template<class OtherAccessorType >
friend class MatrixIterator
friend

Definition at line 124 of file matrix_iterator.h.

Member Data Documentation

◆ accessor

template<typename AccessorType >
AccessorType MatrixIterator< AccessorType >::accessor
private

Store an object of the AccessorType class.

Definition at line 120 of file matrix_iterator.h.


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