Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Math::QuaternionVectorBinary< E1, E2, F > Class Template Reference

Expression-template node combining a quaternion expression E1 and a vector expression E2 into a vector expression via the per-element functor F (used e.g. for quaternion-vector rotation). More...

#include <VectorExpression.hpp>

+ Inheritance diagram for CDPL::Math::QuaternionVectorBinary< E1, E2, F >:

Public Types

typedef F::ResultType ValueType
 The element value type of the expression (the functor's result type). More...
 
typedef const ValueType ConstReference
 Constant reference type to an element value. More...
 
typedef const ValueType Reference
 Mutable reference type (degrades to const for expression-template results). More...
 
typedef const SelfType ConstClosureType
 Constant closure type used when this expression appears inside another expression. More...
 
typedef SelfType ClosureType
 Closure type used when this expression appears inside another expression. More...
 
typedef E2::SizeType SizeType
 The size type inherited from the wrapped vector expression. More...
 
typedef E2::DifferenceType DifferenceType
 The signed difference type inherited from the wrapped vector expression. More...
 
- Public Types inherited from CDPL::Math::VectorExpression< QuaternionVectorBinary< E1, E2, F > >
typedef QuaternionVectorBinary< E1, E2, F > ExpressionType
 The derived vector expression type. More...
 
- Public Types inherited from CDPL::Math::Expression< E >
typedef E ExpressionType
 The derived expression type (made available to expression-template machinery). More...
 

Public Member Functions

 QuaternionVectorBinary (const Expression1Type &e1, const Expression2Type &e2)
 Constructs the expression-template node combining the quaternion expression e1 and the vector expression e2. More...
 
SizeType getSize () const
 Returns the wrapped vector expression's size. More...
 
ConstReference operator() (SizeType i) const
 Invokes the functor with the quaternion expression, the vector expression, and the index i. More...
 
ConstReference operator[] (SizeType i) const
 Alias for operator() — invokes the functor with both wrapped expressions and the index i. More...
 
- Public Member Functions inherited from CDPL::Math::VectorExpression< QuaternionVectorBinary< E1, E2, F > >
const ExpressionTypeoperator() () const
 Returns a const reference to the derived vector expression. More...
 
ExpressionTypeoperator() ()
 Returns a reference to the derived vector expression. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CDPL::Math::VectorExpression< QuaternionVectorBinary< E1, E2, F > >
 VectorExpression ()
 
 ~VectorExpression ()
 
- Protected Member Functions inherited from CDPL::Math::Expression< E >
 Expression ()
 
 ~Expression ()
 

Detailed Description

template<typename E1, typename E2, typename F>
class CDPL::Math::QuaternionVectorBinary< E1, E2, F >

Expression-template node combining a quaternion expression E1 and a vector expression E2 into a vector expression via the per-element functor F (used e.g. for quaternion-vector rotation).

Template Parameters
E1The wrapped quaternion expression type.
E2The wrapped vector expression type.
FThe per-element functor type.

Member Typedef Documentation

◆ ValueType

template<typename E1 , typename E2 , typename F >
typedef F::ResultType CDPL::Math::QuaternionVectorBinary< E1, E2, F >::ValueType

The element value type of the expression (the functor's result type).

◆ ConstReference

template<typename E1 , typename E2 , typename F >
typedef const ValueType CDPL::Math::QuaternionVectorBinary< E1, E2, F >::ConstReference

Constant reference type to an element value.

◆ Reference

template<typename E1 , typename E2 , typename F >
typedef const ValueType CDPL::Math::QuaternionVectorBinary< E1, E2, F >::Reference

Mutable reference type (degrades to const for expression-template results).

◆ ConstClosureType

template<typename E1 , typename E2 , typename F >
typedef const SelfType CDPL::Math::QuaternionVectorBinary< E1, E2, F >::ConstClosureType

Constant closure type used when this expression appears inside another expression.

◆ ClosureType

template<typename E1 , typename E2 , typename F >
typedef SelfType CDPL::Math::QuaternionVectorBinary< E1, E2, F >::ClosureType

Closure type used when this expression appears inside another expression.

◆ SizeType

template<typename E1 , typename E2 , typename F >
typedef E2::SizeType CDPL::Math::QuaternionVectorBinary< E1, E2, F >::SizeType

The size type inherited from the wrapped vector expression.

◆ DifferenceType

template<typename E1 , typename E2 , typename F >
typedef E2::DifferenceType CDPL::Math::QuaternionVectorBinary< E1, E2, F >::DifferenceType

The signed difference type inherited from the wrapped vector expression.

Constructor & Destructor Documentation

◆ QuaternionVectorBinary()

template<typename E1 , typename E2 , typename F >
CDPL::Math::QuaternionVectorBinary< E1, E2, F >::QuaternionVectorBinary ( const Expression1Type &  e1,
const Expression2Type &  e2 
)
inline

Constructs the expression-template node combining the quaternion expression e1 and the vector expression e2.

Parameters
e1The quaternion expression.
e2The vector expression.

Member Function Documentation

◆ getSize()

template<typename E1 , typename E2 , typename F >
SizeType CDPL::Math::QuaternionVectorBinary< E1, E2, F >::getSize ( ) const
inline

Returns the wrapped vector expression's size.

Returns
The element count.

◆ operator()()

template<typename E1 , typename E2 , typename F >
ConstReference CDPL::Math::QuaternionVectorBinary< E1, E2, F >::operator() ( SizeType  i) const
inline

Invokes the functor with the quaternion expression, the vector expression, and the index i.

Parameters
iThe zero-based element index.
Returns
The computed element value.

◆ operator[]()

template<typename E1 , typename E2 , typename F >
ConstReference CDPL::Math::QuaternionVectorBinary< E1, E2, F >::operator[] ( SizeType  i) const
inline

Alias for operator() — invokes the functor with both wrapped expressions and the index i.

Parameters
iThe zero-based element index.
Returns
The computed element value.

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