OGS
MathLib::EigenBlockMatrixViewFunctor< D, M > Class Template Reference

Detailed Description

template<int D, typename M>
class MathLib::EigenBlockMatrixViewFunctor< D, M >

Definition at line 17 of file EigenBlockMatrixView.h.

#include <EigenBlockMatrixView.h>

Public Types

using Scalar = typename M::Scalar
 
using Matrix = Eigen::Matrix<Scalar, rows, cols, Eigen::ColMajor>
 

Public Member Functions

constexpr EigenBlockMatrixViewFunctor (const M &matrix)
 
constexpr const Scalar operator() (Eigen::Index row, Eigen::Index col) const
 

Static Public Attributes

static constexpr int rows
 
static constexpr int cols
 

Private Attributes

const M::Nested & matrix_
 

Member Typedef Documentation

◆ Matrix

template<int D, typename M >
using MathLib::EigenBlockMatrixViewFunctor< D, M >::Matrix = Eigen::Matrix<Scalar, rows, cols, Eigen::ColMajor>

Definition at line 27 of file EigenBlockMatrixView.h.

◆ Scalar

template<int D, typename M >
using MathLib::EigenBlockMatrixViewFunctor< D, M >::Scalar = typename M::Scalar

Definition at line 26 of file EigenBlockMatrixView.h.

Constructor & Destructor Documentation

◆ EigenBlockMatrixViewFunctor()

template<int D, typename M >
MathLib::EigenBlockMatrixViewFunctor< D, M >::EigenBlockMatrixViewFunctor ( const M & matrix)
inlineexplicitconstexpr

Definition at line 29 of file EigenBlockMatrixView.h.

30 : matrix_(matrix){};

Member Function Documentation

◆ operator()()

template<int D, typename M >
const Scalar MathLib::EigenBlockMatrixViewFunctor< D, M >::operator() ( Eigen::Index row,
Eigen::Index col ) const
inlineconstexpr

Definition at line 32 of file EigenBlockMatrixView.h.

33 {
34 if (row / matrix_.rows() != col / matrix_.cols())
35 {
36 return 0;
37 }
38 return matrix_(row % matrix_.rows(), col % matrix_.cols());
39 }

References MathLib::EigenBlockMatrixViewFunctor< D, M >::matrix_.

Member Data Documentation

◆ cols

template<int D, typename M >
int MathLib::EigenBlockMatrixViewFunctor< D, M >::cols
staticconstexpr
Initial value:
= M::ColsAtCompileTime == Eigen::Dynamic
? Eigen::Dynamic
: D * M::ColsAtCompileTime

Definition at line 23 of file EigenBlockMatrixView.h.

◆ matrix_

template<int D, typename M >
const M::Nested& MathLib::EigenBlockMatrixViewFunctor< D, M >::matrix_
private

◆ rows

template<int D, typename M >
int MathLib::EigenBlockMatrixViewFunctor< D, M >::rows
staticconstexpr
Initial value:
= M::RowsAtCompileTime == Eigen::Dynamic
? Eigen::Dynamic
: D * M::RowsAtCompileTime

Definition at line 20 of file EigenBlockMatrixView.h.


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