deal.II version GIT relicensing-2167-g9622207b8f 2024-11-21 12:40:00+00:00
\(\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
Public Types | Public Member Functions | Private Attributes | List of all members
ChunkSparseMatrixIterators::Iterator< number, Constness > Class Template Reference

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

Public Types

using MatrixType = typename Accessor< number, Constness >::MatrixType
 
using value_type = const Accessor< number, Constness > &
 
using difference_type = types::global_dof_index
 

Public Member Functions

 Iterator (MatrixType *matrix, const unsigned int row)
 
 Iterator (MatrixType *matrix)
 
 Iterator (const ChunkSparseMatrixIterators::Iterator< number, false > &i)
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
const Accessor< number, Constness > & operator* () const
 
const Accessor< number, Constness > * operator-> () const
 
bool operator== (const Iterator &) const
 
bool operator!= (const Iterator &) const
 
bool operator< (const Iterator &) const
 
bool operator> (const Iterator &) const
 
int operator- (const Iterator &p) const
 
Iterator operator+ (const unsigned int n) const
 

Private Attributes

Accessor< number, Constness > accessor
 

Detailed Description

template<typename number, bool Constness>
class ChunkSparseMatrixIterators::Iterator< number, Constness >

Iterator for constant and non-constant matrices.

The first template argument denotes the underlying numeric type, the second the constness of the matrix.

Since there is a specialization of this class for Constness=false, this class is for iterators to constant matrices.

Definition at line 297 of file chunk_sparse_matrix.h.

Member Typedef Documentation

◆ MatrixType

template<typename number , bool Constness>
using ChunkSparseMatrixIterators::Iterator< number, Constness >::MatrixType = typename Accessor<number, Constness>::MatrixType

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

Definition at line 303 of file chunk_sparse_matrix.h.

◆ value_type

template<typename number , bool Constness>
using ChunkSparseMatrixIterators::Iterator< number, Constness >::value_type = const Accessor<number, Constness> &

An alias for the type you get when you dereference an iterator of the current kind.

Definition at line 309 of file chunk_sparse_matrix.h.

◆ difference_type

template<typename number , bool Constness>
using ChunkSparseMatrixIterators::Iterator< number, Constness >::difference_type = types::global_dof_index

A type that denotes what data types is used to express the difference between two iterators.

Definition at line 315 of file chunk_sparse_matrix.h.

Constructor & Destructor Documentation

◆ Iterator() [1/3]

template<typename number , bool Constness>
ChunkSparseMatrixIterators::Iterator< number, Constness >::Iterator ( MatrixType matrix,
const unsigned int  row 
)

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

◆ Iterator() [2/3]

template<typename number , bool Constness>
ChunkSparseMatrixIterators::Iterator< number, Constness >::Iterator ( MatrixType matrix)

Constructor. Create the end iterator for the given matrix.

◆ Iterator() [3/3]

template<typename number , bool Constness>
ChunkSparseMatrixIterators::Iterator< number, Constness >::Iterator ( const ChunkSparseMatrixIterators::Iterator< number, false > &  i)

Conversion constructor to get from a non-const iterator to a const iterator.

Member Function Documentation

◆ operator++() [1/2]

template<typename number , bool Constness>
Iterator & ChunkSparseMatrixIterators::Iterator< number, Constness >::operator++ ( )

Prefix increment.

◆ operator++() [2/2]

template<typename number , bool Constness>
Iterator ChunkSparseMatrixIterators::Iterator< number, Constness >::operator++ ( int  )

Postfix increment.

◆ operator*()

template<typename number , bool Constness>
const Accessor< number, Constness > & ChunkSparseMatrixIterators::Iterator< number, Constness >::operator* ( ) const

Dereferencing operator.

◆ operator->()

template<typename number , bool Constness>
const Accessor< number, Constness > * ChunkSparseMatrixIterators::Iterator< number, Constness >::operator-> ( ) const

Dereferencing operator.

◆ operator==()

template<typename number , bool Constness>
bool ChunkSparseMatrixIterators::Iterator< number, Constness >::operator== ( const Iterator< number, Constness > &  ) const

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

◆ operator!=()

template<typename number , bool Constness>
bool ChunkSparseMatrixIterators::Iterator< number, Constness >::operator!= ( const Iterator< number, Constness > &  ) const

Inverse of ==.

◆ operator<()

template<typename number , bool Constness>
bool ChunkSparseMatrixIterators::Iterator< number, Constness >::operator< ( const Iterator< number, 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.

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

◆ operator>()

template<typename number , bool Constness>
bool ChunkSparseMatrixIterators::Iterator< number, Constness >::operator> ( const Iterator< number, Constness > &  ) const

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

◆ operator-()

template<typename number , bool Constness>
int ChunkSparseMatrixIterators::Iterator< number, Constness >::operator- ( const Iterator< number, Constness > &  p) const

Return the distance between the current iterator and the argument. The distance is given by how many times one has to apply operator++ to the current iterator to get the argument (for a positive return value), or operator-- (for a negative return value).

◆ operator+()

template<typename number , bool Constness>
Iterator ChunkSparseMatrixIterators::Iterator< number, Constness >::operator+ ( const unsigned int  n) const

Return an iterator that is n ahead of the current one.

Member Data Documentation

◆ accessor

template<typename number , bool Constness>
Accessor<number, Constness> ChunkSparseMatrixIterators::Iterator< number, Constness >::accessor
private

Store an object of the accessor class.

Definition at line 406 of file chunk_sparse_matrix.h.


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