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

Per-component functor returning the multiplicative inverse \( \overline{e} / \|e\|^2 \) of a quaternion expression (n2 is the precomputed squared norm). More...

#include <Functional.hpp>

+ Inheritance diagram for CDPL::Math::QuaternionInverse< Q, T >:

Public Types

typedef Scalar2QuaternionBinaryFunctor< Q, T >::Argument2Type Argument2Type
 
typedef Scalar2QuaternionBinaryFunctor< Q, T >::ResultType ResultType
 
- Public Types inherited from CDPL::Math::Scalar2QuaternionBinaryFunctor< Q, T >
typedef CommonType< typename Q::ValueType, T >::Type ResultType
 The component result type (common type of the quaternion's element value type and the scalar). More...
 
typedef const T & Argument2Type
 The second (scalar) argument type. More...
 

Static Public Member Functions

template<typename E >
static ResultType applyC1 (const QuaternionExpression< E > &e, Argument2Type n2)
 Returns the C1 (real) component of the multiplicative inverse \( e^{-1} = \overline{e} / \|e\|^2 \). More...
 
template<typename E >
static ResultType applyC2 (const QuaternionExpression< E > &e, Argument2Type n2)
 Returns the C2 component of the multiplicative inverse \( e^{-1} \). More...
 
template<typename E >
static ResultType applyC3 (const QuaternionExpression< E > &e, Argument2Type n2)
 Returns the C3 component of the multiplicative inverse \( e^{-1} \). More...
 
template<typename E >
static ResultType applyC4 (const QuaternionExpression< E > &e, Argument2Type n2)
 Returns the C4 component of the multiplicative inverse \( e^{-1} \). More...
 

Detailed Description

template<typename Q, typename T>
struct CDPL::Math::QuaternionInverse< Q, T >

Per-component functor returning the multiplicative inverse \( \overline{e} / \|e\|^2 \) of a quaternion expression (n2 is the precomputed squared norm).

Template Parameters
QThe quaternion expression type.
TThe precomputed-norm scalar type.

Member Typedef Documentation

◆ Argument2Type

template<typename Q , typename T >
typedef Scalar2QuaternionBinaryFunctor<Q, T>::Argument2Type CDPL::Math::QuaternionInverse< Q, T >::Argument2Type

◆ ResultType

template<typename Q , typename T >
typedef Scalar2QuaternionBinaryFunctor<Q, T>::ResultType CDPL::Math::QuaternionInverse< Q, T >::ResultType

Member Function Documentation

◆ applyC1()

template<typename Q , typename T >
template<typename E >
static ResultType CDPL::Math::QuaternionInverse< Q, T >::applyC1 ( const QuaternionExpression< E > &  e,
Argument2Type  n2 
)
inlinestatic

Returns the C1 (real) component of the multiplicative inverse \( e^{-1} = \overline{e} / \|e\|^2 \).

Template Parameters
EThe quaternion expression type.
Parameters
eThe quaternion expression.
n2The precomputed squared norm \( \|e\|^2 \).
Returns
e.getC1() / n2.

◆ applyC2()

template<typename Q , typename T >
template<typename E >
static ResultType CDPL::Math::QuaternionInverse< Q, T >::applyC2 ( const QuaternionExpression< E > &  e,
Argument2Type  n2 
)
inlinestatic

Returns the C2 component of the multiplicative inverse \( e^{-1} \).

Template Parameters
EThe quaternion expression type.
Parameters
eThe quaternion expression.
n2The precomputed squared norm \( \|e\|^2 \).
Returns
-e.getC2() / n2.

◆ applyC3()

template<typename Q , typename T >
template<typename E >
static ResultType CDPL::Math::QuaternionInverse< Q, T >::applyC3 ( const QuaternionExpression< E > &  e,
Argument2Type  n2 
)
inlinestatic

Returns the C3 component of the multiplicative inverse \( e^{-1} \).

Template Parameters
EThe quaternion expression type.
Parameters
eThe quaternion expression.
n2The precomputed squared norm \( \|e\|^2 \).
Returns
-e.getC3() / n2.

◆ applyC4()

template<typename Q , typename T >
template<typename E >
static ResultType CDPL::Math::QuaternionInverse< Q, T >::applyC4 ( const QuaternionExpression< E > &  e,
Argument2Type  n2 
)
inlinestatic

Returns the C4 component of the multiplicative inverse \( e^{-1} \).

Template Parameters
EThe quaternion expression type.
Parameters
eThe quaternion expression.
n2The precomputed squared norm \( \|e\|^2 \).
Returns
-e.getC4() / n2.

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