![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Quaternion expression that exposes a 4-element vector as a quaternion (component indices 0-3 map to C1-C4). More...
#include <VectorAdapter.hpp>
Inheritance diagram for CDPL::Math::VectorQuaternionAdapter< V >:Public Types | |
| typedef V | VectorType |
| The wrapped 4-element vector type. More... | |
| typedef V::ValueType | ValueType |
| The element value type. More... | |
| typedef V::ConstReference | ConstReference |
| Constant reference type to a component. More... | |
| typedef std::conditional< std::is_const< V >::value, typename V::ConstReference, typename V::Reference >::type | Reference |
Mutable reference type (degrades to ConstReference when the wrapped vector is const). More... | |
| typedef std::conditional< std::is_const< V >::value, typename V::ConstClosureType, typename V::ClosureType >::type | VectorClosureType |
| Closure type used to store the wrapped vector internally. More... | |
| typedef const SelfType | ConstClosureType |
| Constant closure type used when this adapter appears inside another expression. More... | |
| typedef SelfType | ClosureType |
| Closure type used when this adapter appears inside another expression. More... | |
Public Types inherited from CDPL::Math::QuaternionExpression< VectorQuaternionAdapter< V > > | |
| typedef VectorQuaternionAdapter< V > | ExpressionType |
| The derived quaternion 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 | |
| VectorQuaternionAdapter (VectorType &v) | |
| Constructs the adapter wrapping the 4-element vector v. More... | |
| Reference | getC1 () |
| Returns a mutable reference to component C1 (mapped to element 0 of the wrapped vector). More... | |
| Reference | getC2 () |
| Returns a mutable reference to component C2 (mapped to element 1 of the wrapped vector). More... | |
| Reference | getC3 () |
| Returns a mutable reference to component C3 (mapped to element 2 of the wrapped vector). More... | |
| Reference | getC4 () |
| Returns a mutable reference to component C4 (mapped to element 3 of the wrapped vector). More... | |
| ConstReference | getC1 () const |
Returns a const reference to component C1. More... | |
| ConstReference | getC2 () const |
Returns a const reference to component C2. More... | |
| ConstReference | getC3 () const |
Returns a const reference to component C3. More... | |
| ConstReference | getC4 () const |
Returns a const reference to component C4. More... | |
| VectorClosureType & | getData () |
| Returns a reference to the wrapped vector (via its stored closure). More... | |
| const VectorClosureType & | getData () const |
Returns a const reference to the wrapped vector (via its stored closure). More... | |
| VectorQuaternionAdapter & | operator= (const VectorQuaternionAdapter &a) |
| Copies the components of a into this view (writing through to the wrapped vector). More... | |
| template<typename E > | |
| VectorQuaternionAdapter & | operator= (const QuaternionExpression< E > &e) |
| Assigns the quaternion expression e to this view (writing through to the wrapped vector). More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, VectorQuaternionAdapter >::type & | operator= (const T &t) |
| Assigns the scalar t to this view (sets C1 to t and the remaining components to the default value). More... | |
| template<typename E > | |
| VectorQuaternionAdapter & | operator+= (const QuaternionExpression< E > &e) |
| Adds the quaternion expression e componentwise to this view. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, VectorQuaternionAdapter >::type & | operator+= (const T &t) |
| Adds the scalar t to component C1 of this view. More... | |
| template<typename E > | |
| VectorQuaternionAdapter & | operator-= (const QuaternionExpression< E > &e) |
| Subtracts the quaternion expression e componentwise from this view. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, VectorQuaternionAdapter >::type & | operator-= (const T &t) |
| Subtracts the scalar t from component C1 of this view. More... | |
| template<typename E > | |
| VectorQuaternionAdapter & | operator*= (const QuaternionExpression< E > &e) |
| Multiplies this view by the quaternion expression e (Hamilton-product semantics). More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, VectorQuaternionAdapter >::type & | operator*= (const T &t) |
| Multiplies every component of this view by the scalar t. More... | |
| template<typename E > | |
| VectorQuaternionAdapter & | operator/= (const QuaternionExpression< E > &e) |
| Divides this view by the quaternion expression e (Hamilton-quotient semantics). More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, VectorQuaternionAdapter >::type & | operator/= (const T &t) |
| Divides every component of this view by the scalar t. More... | |
| template<typename E > | |
| VectorQuaternionAdapter & | assign (const QuaternionExpression< E > &e) |
| Assigns the quaternion expression e to this view without intermediate temporary (use only when e does not alias the wrapped vector). More... | |
| template<typename E > | |
| VectorQuaternionAdapter & | plusAssign (const QuaternionExpression< E > &e) |
| Adds the quaternion expression e to this view without intermediate temporary. More... | |
| template<typename E > | |
| VectorQuaternionAdapter & | minusAssign (const QuaternionExpression< E > &e) |
| Subtracts the quaternion expression e from this view without intermediate temporary. More... | |
| void | swap (VectorQuaternionAdapter &a) |
| Swaps the components of this view with those of a. More... | |
| void | set (const ValueType &c1=ValueType(), const ValueType &c2=ValueType(), const ValueType &c3=ValueType(), const ValueType &c4=ValueType()) |
| Assigns the four supplied component values to this view (writing through to the wrapped vector). More... | |
Public Member Functions inherited from CDPL::Math::QuaternionExpression< VectorQuaternionAdapter< V > > | |
| const ExpressionType & | operator() () const |
Returns a const reference to the derived quaternion expression. More... | |
| ExpressionType & | operator() () |
| Returns a reference to the derived quaternion expression. More... | |
Friends | |
| void | swap (VectorQuaternionAdapter &a1, VectorQuaternionAdapter &a2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::QuaternionExpression< VectorQuaternionAdapter< V > > | |
| QuaternionExpression () | |
| ~QuaternionExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
Quaternion expression that exposes a 4-element vector as a quaternion (component indices 0-3 map to C1-C4).
| V | The wrapped 4-element vector type. |
| typedef V CDPL::Math::VectorQuaternionAdapter< V >::VectorType |
The wrapped 4-element vector type.
| typedef V::ValueType CDPL::Math::VectorQuaternionAdapter< V >::ValueType |
The element value type.
| typedef V::ConstReference CDPL::Math::VectorQuaternionAdapter< V >::ConstReference |
Constant reference type to a component.
| typedef std::conditional<std::is_const<V>::value, typename V::ConstReference, typename V::Reference>::type CDPL::Math::VectorQuaternionAdapter< V >::Reference |
Mutable reference type (degrades to ConstReference when the wrapped vector is const).
| typedef std::conditional<std::is_const<V>::value, typename V::ConstClosureType, typename V::ClosureType>::type CDPL::Math::VectorQuaternionAdapter< V >::VectorClosureType |
Closure type used to store the wrapped vector internally.
| typedef const SelfType CDPL::Math::VectorQuaternionAdapter< V >::ConstClosureType |
Constant closure type used when this adapter appears inside another expression.
| typedef SelfType CDPL::Math::VectorQuaternionAdapter< V >::ClosureType |
Closure type used when this adapter appears inside another expression.
|
inlineexplicit |
Constructs the adapter wrapping the 4-element vector v.
| v | The 4-element vector to be viewed as a quaternion. |
|
inline |
Returns a mutable reference to component C1 (mapped to element 0 of the wrapped vector).
|
inline |
Returns a mutable reference to component C2 (mapped to element 1 of the wrapped vector).
|
inline |
Returns a mutable reference to component C3 (mapped to element 2 of the wrapped vector).
|
inline |
Returns a mutable reference to component C4 (mapped to element 3 of the wrapped vector).
|
inline |
Returns a const reference to component C1.
const reference to C1.
|
inline |
Returns a const reference to component C2.
const reference to C2.
|
inline |
Returns a const reference to component C3.
const reference to C3.
|
inline |
Returns a const reference to component C4.
const reference to C4.
|
inline |
Returns a reference to the wrapped vector (via its stored closure).
|
inline |
Returns a const reference to the wrapped vector (via its stored closure).
const reference to the wrapped vector closure.
|
inline |
Copies the components of a into this view (writing through to the wrapped vector).
| a | The source adapter. |
|
inline |
Assigns the quaternion expression e to this view (writing through to the wrapped vector).
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Assigns the scalar t to this view (sets C1 to t and the remaining components to the default value).
| T | The scalar type. |
| t | The scalar to assign. |
|
inline |
Adds the quaternion expression e componentwise to this view.
| E | The source quaternion expression type. |
| e | The quaternion expression to add. |
|
inline |
Adds the scalar t to component C1 of this view.
| T | The scalar type. |
| t | The scalar summand. |
|
inline |
Subtracts the quaternion expression e componentwise from this view.
| E | The source quaternion expression type. |
| e | The quaternion expression to subtract. |
|
inline |
Subtracts the scalar t from component C1 of this view.
| T | The scalar type. |
| t | The scalar subtrahend. |
|
inline |
Multiplies this view by the quaternion expression e (Hamilton-product semantics).
| E | The source quaternion expression type. |
| e | The quaternion expression to multiply by. |
|
inline |
Multiplies every component of this view by the scalar t.
| T | The scalar type. |
| t | The scalar multiplier. |
|
inline |
Divides this view by the quaternion expression e (Hamilton-quotient semantics).
| E | The source quaternion expression type. |
| e | The quaternion expression to divide by. |
|
inline |
Divides every component of this view by the scalar t.
| T | The scalar type. |
| t | The scalar divisor. |
|
inline |
Assigns the quaternion expression e to this view without intermediate temporary (use only when e does not alias the wrapped vector).
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Adds the quaternion expression e to this view without intermediate temporary.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Subtracts the quaternion expression e from this view without intermediate temporary.
| E | The source quaternion expression type. |
| e | The source quaternion expression. |
|
inline |
Swaps the components of this view with those of a.
| a | The adapter to swap with. |
|
inline |
Assigns the four supplied component values to this view (writing through to the wrapped vector).
| c1 | The C1 component value. |
| c2 | The C2 component value. |
| c3 | The C3 component value. |
| c4 | The C4 component value. |
|
friend |
ADL-enabled free-function form of swap().
| a1 | The first adapter. |
| a2 | The second adapter. |