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

Functor returning the L2 (Euclidean) norm of a vector expression. More...

#include <Functional.hpp>

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

Public Types

typedef VectorScalarRealUnaryFunctor< V >::ValueType ValueType
 
typedef VectorScalarRealUnaryFunctor< V >::RealType RealType
 
typedef VectorScalarRealUnaryFunctor< V >::ResultType ResultType
 
- Public Types inherited from CDPL::Math::VectorScalarRealUnaryFunctor< V >
typedef V::ValueType ValueType
 The vector's element value type. More...
 
typedef TypeTraits< ValueType >::RealType RealType
 The real-valued type derived from ValueType via Math::TypeTraits. More...
 
typedef RealType ResultType
 The real-valued result type. More...
 

Static Public Member Functions

static ResultType apply (const VectorExpression< V > &e)
 Returns the L2 norm of e. More...
 

Detailed Description

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

Functor returning the L2 (Euclidean) norm of a vector expression.

Template Parameters
VThe vector expression type.

Member Typedef Documentation

◆ ValueType

◆ RealType

template<typename V >
typedef VectorScalarRealUnaryFunctor<V>::RealType CDPL::Math::VectorNorm2< V >::RealType

◆ ResultType

Member Function Documentation

◆ apply()

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

Returns the L2 norm of e.

Parameters
eThe vector expression.
Returns
\( \sqrt{\sum_i \|e(i)\|_2^2} \).

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