Reference documentation for deal.II version Git d9b14c2d54 2019-09-14 18:13:29 -0600
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
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 >:
[legend]

Public Types

using container_pointer_type = typename std::conditional< Constness, const TableType *, TableType * >::type
 
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 LinearIndexIterator< Iterator< TableType, Constness, storage_order >, Accessor< TableType, Constness, storage_order > >
 

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 874 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 = typename std:: conditional<Constness, const TableType *, TableType *>::type

Type of the stored pointer to the table.

Definition at line 881 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 886 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 891 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()).

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 942 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 947 of file table.h.


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