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
MatrixTableIterators::Iterator< TableType, Constness, storage_order > Class Template Reference

Iterator class for both matrix-like tables, i.e., Table<2, T> and TransposeTable. More...

#include <deal.II/base/table.h>

Inheritance diagram for MatrixTableIterators::Iterator< TableType, Constness, storage_order >:

Public Types

using size_type = typename TableType::size_type
 
using container_pointer_type
 
using iterator_category
 
using value_type
 
using difference_type
 
using reference
 
using pointer
 

Public Member Functions

 Iterator (const Accessor< TableType, Constness, storage_order > &accessor)
 
 Iterator (const container_pointer_type object)
 
 Iterator (const container_pointer_type object, const size_type row, const size_type column)
 
 Iterator (const Iterator< TableType, false, storage_order > &i)
 
 Iterator (const container_pointer_type container, const std::ptrdiff_t linear_index)
 
Iterator< TableType, Constness, storage_order > & operator++ ()
 
Iterator< TableType, Constness, storage_order > operator++ (int)
 
Iterator< TableType, Constness, storage_order > & operator-- ()
 
Iterator< TableType, Constness, storage_order > operator-- (int)
 
Iterator< TableType, Constness, storage_order > operator+ (const difference_type n) const
 
Iterator< TableType, Constness, storage_order > operator- (const difference_type n) const
 
difference_type operator- (const Iterator< TableType, Constness, storage_order > &p) const
 
Iterator< TableType, Constness, storage_order > & operator+= (const difference_type n)
 
Iterator< TableType, Constness, storage_order > & operator-= (const difference_type n)
 
reference operator* () const
 
pointer operator-> () const
 
std::enable_if_t< std::is_convertible_v< OtherIterator, Iterator< TableType, Constness, storage_order > >, booloperator== (const OtherIterator &right) const
 
std::enable_if_t< std::is_convertible_v< OtherIterator, Iterator< TableType, Constness, storage_order > >, booloperator!= (const OtherIterator &right) const
 
bool operator<= (const Iterator< TableType, Constness, storage_order > &) const
 
bool operator>= (const Iterator< TableType, Constness, storage_order > &) const
 
bool operator< (const Iterator< TableType, Constness, storage_order > &) const
 
bool operator> (const Iterator< TableType, Constness, storage_order > &) const
 

Protected Attributes

Accessor< TableType, Constness, storage_order > accessor
 

Detailed Description

template<typename TableType, bool Constness, Storage storage_order>
class MatrixTableIterators::Iterator< TableType, Constness, storage_order >

Iterator class for both matrix-like tables, i.e., Table<2, T> and TransposeTable.

Template Parameters
TableTypethe type of the Table, e.g., Table<2, T> or TransposeTable.
Constnesswhether or not this is a constant iterator.
storage_orderThe storage scheme of the underlying table, e.g., Storage::row_major for Table<2, T>.

Definition at line 1188 of file table.h.

Member Typedef Documentation

◆ size_type

template<typename TableType , bool Constness, Storage storage_order>
using MatrixTableIterators::Iterator< TableType, Constness, storage_order >::size_type = typename TableType::size_type

Size type used by the underlying table.

Definition at line 1196 of file table.h.

◆ container_pointer_type

template<typename TableType , bool Constness, Storage storage_order>
using MatrixTableIterators::Iterator< TableType, Constness, storage_order >::container_pointer_type
Initial value:
std::conditional_t<Constness, const TableType *, TableType *>

Type of the stored pointer to the table.

Definition at line 1201 of file table.h.

◆ iterator_category

using LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::iterator_category
inherited

Iterator category.

Definition at line 147 of file linear_index_iterator.h.

◆ value_type

using LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::value_type
inherited

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

Definition at line 154 of file linear_index_iterator.h.

◆ difference_type

using LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::difference_type
inherited

Difference type.

Definition at line 159 of file linear_index_iterator.h.

◆ reference

using LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::reference
inherited

Reference type.

Definition at line 164 of file linear_index_iterator.h.

◆ pointer

using LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::pointer
inherited

Pointer type.

Definition at line 169 of file linear_index_iterator.h.

Constructor & Destructor Documentation

◆ Iterator() [1/5]

template<typename TableType , bool Constness, Storage storage_order>
MatrixTableIterators::Iterator< TableType, Constness, storage_order >::Iterator ( const Accessor< TableType, Constness, storage_order > & accessor)

Constructor from an accessor.

◆ Iterator() [2/5]

template<typename TableType , bool Constness, Storage storage_order>
MatrixTableIterators::Iterator< TableType, Constness, storage_order >::Iterator ( const container_pointer_type object)

Constructor. Create the end iterator for a table.

◆ Iterator() [3/5]

template<typename TableType , bool Constness, Storage storage_order>
MatrixTableIterators::Iterator< TableType, Constness, storage_order >::Iterator ( const container_pointer_type object,
const size_type row,
const size_type column )

Constructor for a particular table entry.

◆ Iterator() [4/5]

template<typename TableType , bool Constness, Storage storage_order>
MatrixTableIterators::Iterator< TableType, Constness, storage_order >::Iterator ( const Iterator< TableType, false, storage_order > & i)

Copy constructor from a non-const iterator.

◆ Iterator() [5/5]

template<typename TableType , bool Constness, Storage storage_order>
MatrixTableIterators::Iterator< TableType, Constness, storage_order >::Iterator ( const container_pointer_type container,
const std::ptrdiff_t linear_index )

Constructor for an entry with a particular linear index.

Member Function Documentation

◆ operator++() [1/2]

Iterator< TableType, Constness, storage_order > & LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator++ ( )
inlineinherited

Prefix increment.

Definition at line 186 of file linear_index_iterator.h.

◆ operator++() [2/2]

Iterator< TableType, Constness, storage_order > LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator++ ( int )
inlineinherited

Postfix increment.

Definition at line 192 of file linear_index_iterator.h.

◆ operator--() [1/2]

Iterator< TableType, Constness, storage_order > & LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator-- ( )
inlineinherited

Prefix decrement.

Definition at line 198 of file linear_index_iterator.h.

◆ operator--() [2/2]

Iterator< TableType, Constness, storage_order > LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator-- ( int )
inlineinherited

Postfix decrement.

Definition at line 204 of file linear_index_iterator.h.

◆ operator+()

Iterator< TableType, Constness, storage_order > LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator+ ( const difference_type n) const
inlineinherited

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

Definition at line 210 of file linear_index_iterator.h.

◆ operator-() [1/2]

Iterator< TableType, Constness, storage_order > LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator- ( const difference_type n) const
inlineinherited

Return an iterator that is n entries behind the current one.

Definition at line 216 of file linear_index_iterator.h.

◆ operator-() [2/2]

LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::difference_type LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator- ( const Iterator< TableType, Constness, storage_order > & p) const
inlineinherited

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).

Definition at line 237 of file linear_index_iterator.h.

◆ operator+=()

Iterator< TableType, Constness, storage_order > & LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator+= ( const difference_type n)
inlineinherited

Increment the iterator position by n.

Definition at line 222 of file linear_index_iterator.h.

◆ operator-=()

Iterator< TableType, Constness, storage_order > & LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator-= ( const difference_type n)
inlineinherited

Decrement the iterator position by n.

Definition at line 228 of file linear_index_iterator.h.

◆ operator*()

LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::reference LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator* ( ) const
inlineinherited

Dereferencing operator.

Definition at line 243 of file linear_index_iterator.h.

◆ operator->()

LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::pointer LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator-> ( ) const
inlineinherited

Dereferencing operator.

Definition at line 249 of file linear_index_iterator.h.

◆ operator==()

std::enable_if_t< std::is_convertible_v< OtherIterator, Iterator< TableType, Constness, storage_order > >, bool > LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator== ( const OtherIterator & right) const
inlineinherited

Comparison operator. Returns true if both iterators point to the same entry in the same container.

Definition at line 257 of file linear_index_iterator.h.

◆ operator!=()

std::enable_if_t< std::is_convertible_v< OtherIterator, Iterator< TableType, Constness, storage_order > >, bool > LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator!= ( const OtherIterator & right) const
inlineinherited

Opposite of operator==().

Definition at line 268 of file linear_index_iterator.h.

◆ operator<=()

bool LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator<= ( const Iterator< TableType, Constness, storage_order > & other) const
inlineinherited

Comparison operator: uses the same ordering as operator<(), but also checks for equality.

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

Definition at line 280 of file linear_index_iterator.h.

◆ operator>=()

bool LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator>= ( const Iterator< TableType, Constness, storage_order > & other) const
inlineinherited

Comparison operator: uses the same ordering as operator>(), but also checks for equality.

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

Definition at line 291 of file linear_index_iterator.h.

◆ operator<()

bool LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator< ( const Iterator< TableType, Constness, storage_order > & other) const
inlineinherited

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 container.

Definition at line 300 of file linear_index_iterator.h.

◆ operator>()

bool LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::operator> ( const Iterator< TableType, Constness, storage_order > & other) const
inlineinherited

Comparison operator. Works in the same way as operator<(), just the other way round.

Definition at line 308 of file linear_index_iterator.h.

Member Data Documentation

◆ accessor

Accessor< TableType, Constness, storage_order > LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >::accessor
protectedinherited

Store an object of the accessor class.

Definition at line 325 of file linear_index_iterator.h.


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