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

Per-component functor returning the scalar/quaternion division \( t \cdot e^{-1} \) (n2 is the precomputed squared norm of e). More...

#include <Functional.hpp>

+ Inheritance diagram for CDPL::Math::ScalarQuaternionDivision< T1, Q, T2 >:

Public Types

typedef Scalar13QuaternionTernaryFunctor< T1, Q, T2 >::Argument1Type Argument1Type
 
typedef Scalar13QuaternionTernaryFunctor< T1, Q, T2 >::Argument3Type Argument3Type
 
typedef Scalar13QuaternionTernaryFunctor< T1, Q, T2 >::ResultType ResultType
 
- Public Types inherited from CDPL::Math::Scalar13QuaternionTernaryFunctor< T1, Q, T2 >
typedef CommonType< typename CommonType< T1, typename Q::ValueType >::Type, T2 >::Type ResultType
 The component result type (common type of T1, the quaternion's element value type, and T2). More...
 
typedef const T1 & Argument1Type
 The first (scalar) argument type. More...
 
typedef const T2 & Argument3Type
 The third (scalar) argument type. More...
 

Static Public Member Functions

template<typename E >
static ResultType applyC1 (Argument1Type t, const QuaternionExpression< E > &e, Argument3Type n2)
 Returns the C1 component of \( t / e \) using the precomputed squared norm n2 of e. More...
 
template<typename E >
static ResultType applyC2 (Argument1Type t, const QuaternionExpression< E > &e, Argument3Type n2)
 Returns the C2 component of \( t / e \) using the precomputed squared norm n2 of e. More...
 
template<typename E >
static ResultType applyC3 (Argument1Type t, const QuaternionExpression< E > &e, Argument3Type n2)
 Returns the C3 component of \( t / e \) using the precomputed squared norm n2 of e. More...
 
template<typename E >
static ResultType applyC4 (Argument1Type t, const QuaternionExpression< E > &e, Argument3Type n2)
 Returns the C4 component of \( t / e \) using the precomputed squared norm n2 of e. More...
 

Detailed Description

template<typename T1, typename Q, typename T2>
struct CDPL::Math::ScalarQuaternionDivision< T1, Q, T2 >

Per-component functor returning the scalar/quaternion division \( t \cdot e^{-1} \) (n2 is the precomputed squared norm of e).

Template Parameters
T1The scalar type on the left-hand side.
QThe quaternion expression type.
T2The precomputed-norm scalar type.

Member Typedef Documentation

◆ Argument1Type

template<typename T1 , typename Q , typename T2 >
typedef Scalar13QuaternionTernaryFunctor<T1, Q, T2>::Argument1Type CDPL::Math::ScalarQuaternionDivision< T1, Q, T2 >::Argument1Type

◆ Argument3Type

template<typename T1 , typename Q , typename T2 >
typedef Scalar13QuaternionTernaryFunctor<T1, Q, T2>::Argument3Type CDPL::Math::ScalarQuaternionDivision< T1, Q, T2 >::Argument3Type

◆ ResultType

template<typename T1 , typename Q , typename T2 >
typedef Scalar13QuaternionTernaryFunctor<T1, Q, T2>::ResultType CDPL::Math::ScalarQuaternionDivision< T1, Q, T2 >::ResultType

Member Function Documentation

◆ applyC1()

template<typename T1 , typename Q , typename T2 >
template<typename E >
static ResultType CDPL::Math::ScalarQuaternionDivision< T1, Q, T2 >::applyC1 ( Argument1Type  t,
const QuaternionExpression< E > &  e,
Argument3Type  n2 
)
inlinestatic

Returns the C1 component of \( t / e \) using the precomputed squared norm n2 of e.

Template Parameters
EThe quaternion expression type.
Parameters
tThe scalar value on the left-hand side.
eThe quaternion expression on the right-hand side.
n2The squared norm of e.
Returns
t * e.getC1() / n2.

◆ applyC2()

template<typename T1 , typename Q , typename T2 >
template<typename E >
static ResultType CDPL::Math::ScalarQuaternionDivision< T1, Q, T2 >::applyC2 ( Argument1Type  t,
const QuaternionExpression< E > &  e,
Argument3Type  n2 
)
inlinestatic

Returns the C2 component of \( t / e \) using the precomputed squared norm n2 of e.

Template Parameters
EThe quaternion expression type.
Parameters
tThe scalar value on the left-hand side.
eThe quaternion expression on the right-hand side.
n2The squared norm of e.
Returns
t * -e.getC2() / n2.

◆ applyC3()

template<typename T1 , typename Q , typename T2 >
template<typename E >
static ResultType CDPL::Math::ScalarQuaternionDivision< T1, Q, T2 >::applyC3 ( Argument1Type  t,
const QuaternionExpression< E > &  e,
Argument3Type  n2 
)
inlinestatic

Returns the C3 component of \( t / e \) using the precomputed squared norm n2 of e.

Template Parameters
EThe quaternion expression type.
Parameters
tThe scalar value on the left-hand side.
eThe quaternion expression on the right-hand side.
n2The squared norm of e.
Returns
t * -e.getC3() / n2.

◆ applyC4()

template<typename T1 , typename Q , typename T2 >
template<typename E >
static ResultType CDPL::Math::ScalarQuaternionDivision< T1, Q, T2 >::applyC4 ( Argument1Type  t,
const QuaternionExpression< E > &  e,
Argument3Type  n2 
)
inlinestatic

Returns the C4 component of \( t / e \) using the precomputed squared norm n2 of e.

Template Parameters
EThe quaternion expression type.
Parameters
tThe scalar value on the left-hand side.
eThe quaternion expression on the right-hand side.
n2The squared norm of e.
Returns
t * -e.getC4() / n2.

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