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

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

#include <Functional.hpp>

+ Inheritance diagram for CDPL::Math::VectorElementSum< V >:

Public Types

typedef VectorScalarUnaryFunctor< V >::ResultType ResultType
 
- Public Types inherited from CDPL::Math::VectorScalarUnaryFunctor< V >
typedef V::ValueType ResultType
 The scalar result type (the vector's element value type). More...
 
typedef V::SizeType SizeType
 The unsigned size type used by the vector. More...
 

Static Public Member Functions

static ResultType apply (const VectorExpression< V > &e)
 Returns the sum of all elements of e. More...
 

Detailed Description

template<typename V>
struct CDPL::Math::VectorElementSum< V >

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

Template Parameters
VThe vector expression type.

Member Typedef Documentation

◆ ResultType

Member Function Documentation

◆ apply()

template<typename V >
static ResultType CDPL::Math::VectorElementSum< V >::apply ( const VectorExpression< V > &  e)
inlinestatic

Returns the sum of all elements of e.

Parameters
eThe vector expression.
Returns
\( \sum_i e(i) \).

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