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

Functor returning the sum of all elements of a matrix expression. More...

#include <Functional.hpp>

+ Inheritance diagram for CDPL::Math::MatrixElementSum< M >:

Public Types

typedef MatrixScalarUnaryFunctor< M >::ResultType ResultType
 
- Public Types inherited from CDPL::Math::MatrixScalarUnaryFunctor< M >
typedef M::ValueType ResultType
 The scalar result type (the matrix's element value type). More...
 

Static Public Member Functions

static ResultType apply (const MatrixExpression< M > &e)
 Returns the element sum of e. More...
 

Detailed Description

template<typename M>
struct CDPL::Math::MatrixElementSum< M >

Functor returning the sum of all elements of a matrix expression.

Template Parameters
MThe matrix expression type.

Member Typedef Documentation

◆ ResultType

Member Function Documentation

◆ apply()

template<typename M >
static ResultType CDPL::Math::MatrixElementSum< M >::apply ( const MatrixExpression< M > &  e)
inlinestatic

Returns the element sum of e.

Parameters
eThe matrix expression.
Returns
\( \sum_{i, j} e(i, j) \).

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