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

Functor returning the squared norm \( \|e\|^2 \) of a quaternion expression. More...

#include <Functional.hpp>

+ Inheritance diagram for CDPL::Math::QuaternionNorm2< Q >:

Public Types

typedef QuaternionScalarRealUnaryFunctor< Q >::ValueType ValueType
 
typedef QuaternionScalarRealUnaryFunctor< Q >::RealType RealType
 
typedef QuaternionScalarRealUnaryFunctor< Q >::ResultType ResultType
 
- Public Types inherited from CDPL::Math::QuaternionScalarRealUnaryFunctor< Q >
typedef Q::ValueType ValueType
 The quaternion's component value type. More...
 
typedef ValueType RealType
 The real-valued type (alias for ValueType). More...
 
typedef RealType ResultType
 The real-valued result type. More...
 

Static Public Member Functions

static ResultType apply (const QuaternionExpression< Q > &e)
 Returns \( \|e\|^2 = C_1^2 + C_2^2 + C_3^2 + C_4^2 \). More...
 

Detailed Description

template<typename Q>
struct CDPL::Math::QuaternionNorm2< Q >

Functor returning the squared norm \( \|e\|^2 \) of a quaternion expression.

Template Parameters
QThe quaternion expression type.

Member Typedef Documentation

◆ ValueType

◆ RealType

◆ ResultType

Member Function Documentation

◆ apply()

template<typename Q >
static ResultType CDPL::Math::QuaternionNorm2< Q >::apply ( const QuaternionExpression< Q > &  e)
inlinestatic

Returns \( \|e\|^2 = C_1^2 + C_2^2 + C_3^2 + C_4^2 \).

Parameters
eThe quaternion expression.
Returns
The squared Euclidean norm of e.

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