deal.II version GIT relicensing-2287-g6548a49e0a 2024-12-20 18:30: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 | Protected Member Functions | Protected Attributes | Friends | List of all members
MatrixTableIterators::AccessorBase< TableType, Constness, storage_order > Class Template Reference

Accessor base class for Table<2, T> and TransposeTable. More...

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

Inheritance diagram for MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >:
Inheritance graph
[legend]

Public Types

using container_pointer_type = std::conditional_t< Constness, const TableType *, TableType * >
 
using value_type = typename TableType::value_type
 
using size_type = typename TableType::size_type
 

Public Member Functions

 AccessorBase ()
 
 AccessorBase (const container_pointer_type table)
 
 AccessorBase (const AccessorBase< TableType, false, storage_order > &)
 
 AccessorBase (const container_pointer_type table, const std::ptrdiff_t linear_index)
 
const value_typevalue () const
 
 operator const value_type & () const
 
size_type row () const
 
size_type column () const
 

Protected Member Functions

void assert_valid_linear_index () const
 

Protected Attributes

container_pointer_type container
 
std::ptrdiff_t linear_index
 

Friends

class AccessorBase< TableType, true, storage_order >
 
class LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >
 
template<bool OtherConstness>
bool operator== (const AccessorBase< TableType, Constness, storage_order > &left, const AccessorBase< TableType, OtherConstness, storage_order > &right)
 

Detailed Description

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

Accessor base class for Table<2, T> and TransposeTable.

This class is compatible with the requirements for an Accessor described in LinearIndexIterator: See the documentation of that class for a description of the split between iterators and accessors.

Template Parameters
TableTypethe type of the Table, e.g., Table<2, T> or TransposeTable.
Constnesswhether or not this object stores a constant pointer and can modify the provided table object.
storage_orderThe storage scheme of the underlying table, e.g., Storage::row_major for Table<2, T>.

Definition at line 983 of file table.h.

Member Typedef Documentation

◆ container_pointer_type

template<typename TableType , bool Constness, Storage storage_order>
using MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::container_pointer_type = std::conditional_t<Constness, const TableType *, TableType *>

Type of the stored pointer to the table.

Definition at line 989 of file table.h.

◆ value_type

template<typename TableType , bool Constness, Storage storage_order>
using MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::value_type = typename TableType::value_type

Value type of the underlying container.

Definition at line 995 of file table.h.

◆ size_type

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

Numerical type of the row and column indices of the table.

Definition at line 1000 of file table.h.

Constructor & Destructor Documentation

◆ AccessorBase() [1/4]

template<typename TableType , bool Constness, Storage storage_order>
MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::AccessorBase ( )

Default constructor.

◆ AccessorBase() [2/4]

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

Constructor setting up the end iterator.

◆ AccessorBase() [3/4]

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

Copy constructor from a non-const Accessor.

◆ AccessorBase() [4/4]

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

Constructor taking an array index.

Member Function Documentation

◆ value()

template<typename TableType , bool Constness, Storage storage_order>
const value_type & MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::value ( ) const

Get a constant reference to the value of the element represented by this accessor.

◆ operator const value_type &()

template<typename TableType , bool Constness, Storage storage_order>
MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::operator const value_type & ( ) const

Conversion operator that returns a constant reference to the element.

◆ row()

template<typename TableType , bool Constness, Storage storage_order>
size_type MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::row ( ) const

Return the row of the current entry.

◆ column()

template<typename TableType , bool Constness, Storage storage_order>
size_type MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::column ( ) const

Return the column of the current entry.

◆ assert_valid_linear_index()

template<typename TableType , bool Constness, Storage storage_order>
void MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::assert_valid_linear_index ( ) const
protected

Check that linear_index corresponds to an entry that is actually stored by the table (i.e., assert that linear_index is nonnegative and less than container->size()).

Friends And Related Symbol Documentation

◆ AccessorBase< TableType, true, storage_order >

template<typename TableType , bool Constness, Storage storage_order>
friend class AccessorBase< TableType, true, storage_order >
friend

Definition at line 1078 of file table.h.

◆ LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >

template<typename TableType , bool Constness, Storage storage_order>
friend class LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >
friend

Definition at line 1078 of file table.h.

◆ operator==

template<typename TableType , bool Constness, Storage storage_order>
template<bool OtherConstness>
bool operator== ( const AccessorBase< TableType, Constness, storage_order > &  left,
const AccessorBase< TableType, OtherConstness, storage_order > &  right 
)
friend

Comparison operator.

Definition at line 1028 of file table.h.

Member Data Documentation

◆ container

template<typename TableType , bool Constness, Storage storage_order>
container_pointer_type MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::container
protected

Pointer to the table.

Definition at line 1064 of file table.h.

◆ linear_index

template<typename TableType , bool Constness, Storage storage_order>
std::ptrdiff_t MatrixTableIterators::AccessorBase< TableType, Constness, storage_order >::linear_index
protected

Current index.

Definition at line 1069 of file table.h.


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