Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Static Public Member Functions | List of all members
CDPL::Math::MatrixProduct< M1, M2 > Struct Template Reference

Functor returning entry (i, j) of the matrix product \( e_1 \cdot e_2 \). More...

#include <Functional.hpp>

+ Inheritance diagram for CDPL::Math::MatrixProduct< M1, M2 >:

Public Types

typedef MatrixVectorBinaryFunctor< M1, M2 >::ValueType ValueType
 
typedef MatrixVectorBinaryFunctor< M1, M2 >::SizeType SizeType
 
typedef MatrixVectorBinaryFunctor< M1, M2 >::ResultType ResultType
 
- Public Types inherited from CDPL::Math::MatrixBinaryFunctor< M1, M2 >
typedef CommonType< typename M1::ValueType, typename M2::ValueType >::Type ValueType
 The element value type (common type of the two matrix element types). More...
 
typedef CommonType< typename M1::SizeType, typename M2::SizeType >::Type SizeType
 The unsigned size type (common type of the two matrix size types). More...
 
typedef ValueType ResultType
 The scalar result type (alias for ValueType). More...
 

Static Public Member Functions

template<typename E1 , typename E2 >
static ResultType apply (const MatrixExpression< E1 > &e1, const MatrixExpression< E2 > &e2, SizeType i, SizeType j)
 Returns entry (i, j) of the matrix product \( e_1 \cdot e_2 \). More...
 

Detailed Description

template<typename M1, typename M2>
struct CDPL::Math::MatrixProduct< M1, M2 >

Functor returning entry (i, j) of the matrix product \( e_1 \cdot e_2 \).

Template Parameters
M1The first matrix expression type.
M2The second matrix expression type.

Member Typedef Documentation

◆ ValueType

template<typename M1 , typename M2 >
typedef MatrixVectorBinaryFunctor<M1, M2>::ValueType CDPL::Math::MatrixProduct< M1, M2 >::ValueType

◆ SizeType

template<typename M1 , typename M2 >
typedef MatrixVectorBinaryFunctor<M1, M2>::SizeType CDPL::Math::MatrixProduct< M1, M2 >::SizeType

◆ ResultType

template<typename M1 , typename M2 >
typedef MatrixVectorBinaryFunctor<M1, M2>::ResultType CDPL::Math::MatrixProduct< M1, M2 >::ResultType

Member Function Documentation

◆ apply()

template<typename M1 , typename M2 >
template<typename E1 , typename E2 >
static ResultType CDPL::Math::MatrixProduct< M1, M2 >::apply ( const MatrixExpression< E1 > &  e1,
const MatrixExpression< E2 > &  e2,
SizeType  i,
SizeType  j 
)
inlinestatic

Returns entry (i, j) of the matrix product \( e_1 \cdot e_2 \).

Template Parameters
E1The first matrix expression type.
E2The second matrix expression type.
Parameters
e1The first matrix expression.
e2The second matrix expression.
iThe zero-based row index of the result entry.
jThe zero-based column index of the result entry.
Returns
\( \sum_k e_1(i, k) \cdot e_2(k, j) \).
Exceptions
Base::SizeErrorif e1.getSize2() does not equal e2.getSize1().

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