27 #ifndef CDPL_MATH_QUATERNIONEXPRESSION_HPP
28 #define CDPL_MATH_QUATERNIONEXPRESSION_HPP
30 #include <type_traits>
49 template <
typename E,
typename F>
54 typedef F FunctorType;
56 typedef typename E::ConstClosureType ExpressionClosureType;
83 return FunctorType::apply(expr.getC1());
92 return FunctorType::apply(expr.getC2());
101 return FunctorType::apply(expr.getC3());
110 return FunctorType::apply(expr.getC4());
114 ExpressionClosureType expr;
122 template <
typename E,
typename F>
139 template <
typename E,
typename F>
144 typedef F FunctorType;
146 typedef typename E::ConstClosureType ExpressionClosureType;
173 return FunctorType::applyC1(expr);
182 return FunctorType::applyC2(expr);
191 return FunctorType::applyC3(expr);
200 return FunctorType::applyC4(expr);
204 ExpressionClosureType expr;
212 template <
typename E,
typename F>
228 template <
typename E1,
typename E2,
typename F>
233 typedef F FunctorType;
234 typedef E1 Expression1Type;
235 typedef E2 Expression2Type;
236 typedef typename E1::ConstClosureType Expression1ClosureType;
237 typedef typename E2::ConstClosureType Expression2ClosureType;
257 expr1(e1), expr2(e2) {}
265 return FunctorType::apply(expr1.getC1(), expr2.getC1());
274 return FunctorType::apply(expr1.getC2(), expr2.getC2());
283 return FunctorType::apply(expr1.getC3(), expr2.getC3());
292 return FunctorType::apply(expr1.getC4(), expr2.getC4());
296 Expression1ClosureType expr1;
297 Expression2ClosureType expr2;
306 template <
typename E1,
typename E2,
typename F>
323 template <
typename E1,
typename E2,
typename F>
328 typedef F FunctorType;
329 typedef E1 Expression1Type;
330 typedef E2 Expression2Type;
331 typedef typename E1::ConstClosureType Expression1ClosureType;
332 typedef typename E2::ConstClosureType Expression2ClosureType;
352 expr1(e1), expr2(e2) {}
360 return FunctorType::applyC1(expr1, expr2);
369 return FunctorType::applyC2(expr1, expr2);
378 return FunctorType::applyC3(expr1, expr2);
387 return FunctorType::applyC4(expr1, expr2);
391 Expression1ClosureType expr1;
392 Expression2ClosureType expr2;
401 template <
typename E1,
typename E2,
typename F>
417 template <
typename E1,
typename E2,
typename F>
422 typedef F FunctorType;
423 typedef E1 Expression1Type;
424 typedef E2 Expression2Type;
425 typedef const E1 Expression1ClosureType;
426 typedef typename E2::ConstClosureType Expression2ClosureType;
446 expr1(e1), expr2(e2) {}
454 return FunctorType::apply(expr1, expr2.getC1());
463 return FunctorType::apply(expr1, expr2.getC2());
472 return FunctorType::apply(expr1, expr2.getC3());
481 return FunctorType::apply(expr1, expr2.getC4());
485 Expression1ClosureType expr1;
486 Expression2ClosureType expr2;
495 template <
typename E1,
typename E2,
typename F>
512 template <
typename E1,
typename E2,
typename F>
517 typedef F FunctorType;
518 typedef E1 Expression1Type;
519 typedef E2 Expression2Type;
520 typedef const E1 Expression1ClosureType;
521 typedef typename E2::ConstClosureType Expression2ClosureType;
541 expr1(e1), expr2(e2) {}
549 return FunctorType::applyC1(expr1, expr2);
558 return FunctorType::applyC2(expr1, expr2);
567 return FunctorType::applyC3(expr1, expr2);
576 return FunctorType::applyC4(expr1, expr2);
580 Expression1ClosureType expr1;
581 Expression2ClosureType expr2;
590 template <
typename E1,
typename E2,
typename F>
606 template <
typename E1,
typename E2,
typename F>
611 typedef F FunctorType;
612 typedef E1 Expression1Type;
613 typedef E2 Expression2Type;
614 typedef typename E1::ConstClosureType Expression1ClosureType;
615 typedef const E2 Expression2ClosureType;
635 expr1(e1), expr2(e2) {}
643 return FunctorType::apply(expr1.getC1(), expr2);
652 return FunctorType::apply(expr1.getC2(), expr2);
661 return FunctorType::apply(expr1.getC3(), expr2);
670 return FunctorType::apply(expr1.getC4(), expr2);
674 Expression1ClosureType expr1;
675 Expression2ClosureType expr2;
684 template <
typename E1,
typename E2,
typename F>
701 template <
typename E1,
typename E2,
typename F>
706 typedef F FunctorType;
707 typedef E1 Expression1Type;
708 typedef E2 Expression2Type;
709 typedef typename E1::ConstClosureType Expression1ClosureType;
710 typedef const E2 Expression2ClosureType;
730 expr1(e1), expr2(e2) {}
738 return FunctorType::applyC1(expr1, expr2);
747 return FunctorType::applyC2(expr1, expr2);
756 return FunctorType::applyC3(expr1, expr2);
765 return FunctorType::applyC4(expr1, expr2);
769 Expression1ClosureType expr1;
770 Expression2ClosureType expr2;
779 template <
typename E1,
typename E2,
typename F>
797 template <
typename E1,
typename E2,
typename E3,
typename F>
802 typedef F FunctorType;
803 typedef E1 Expression1Type;
804 typedef E2 Expression2Type;
805 typedef E3 Expression3Type;
806 typedef typename E1::ConstClosureType Expression1ClosureType;
807 typedef typename E2::ConstClosureType Expression2ClosureType;
808 typedef const E3 Expression3ClosureType;
829 expr1(e1), expr2(e2), expr3(e3) {}
837 return FunctorType::applyC1(expr1, expr2, expr3);
846 return FunctorType::applyC2(expr1, expr2, expr3);
855 return FunctorType::applyC3(expr1, expr2, expr3);
864 return FunctorType::applyC4(expr1, expr2, expr3);
868 Expression1ClosureType expr1;
869 Expression2ClosureType expr2;
870 Expression3ClosureType expr3;
880 template <
typename E1,
typename E2,
typename E3,
typename F>
898 template <
typename E1,
typename E2,
typename E3,
typename F>
903 typedef F FunctorType;
904 typedef E1 Expression1Type;
905 typedef E2 Expression2Type;
906 typedef E3 Expression3Type;
907 typedef const E1 Expression1ClosureType;
908 typedef typename E2::ConstClosureType Expression2ClosureType;
909 typedef const E3 Expression3ClosureType;
930 expr1(e1), expr2(e2), expr3(e3) {}
938 return FunctorType::applyC1(expr1, expr2, expr3);
947 return FunctorType::applyC2(expr1, expr2, expr3);
956 return FunctorType::applyC3(expr1, expr2, expr3);
965 return FunctorType::applyC4(expr1, expr2, expr3);
969 Expression1ClosureType expr1;
970 Expression2ClosureType expr2;
971 Expression3ClosureType expr3;
981 template <
typename E1,
typename E2,
typename E3,
typename F>
997 template <
typename E>
1003 return ExpressionType(e());
1012 template <
typename E>
1027 template <
typename E1,
typename E2>
1028 typename QuaternionBinary1Traits<E1, E2, ScalarAddition<typename E1::ValueType, typename E2::ValueType> >::ResultType
1034 return ExpressionType(e1(), e2());
1045 template <
typename E,
typename T>
1046 typename std::enable_if<IsScalar<T>::value,
typename Scalar2QuaternionBinary2Traits<E, T, Scalar2QuaternionAddition<E, T> >::ResultType>::type
1051 return ExpressionType(e(), t);
1062 template <
typename T,
typename E>
1063 typename std::enable_if<IsScalar<T>::value,
typename Scalar1QuaternionBinary2Traits<T, E, Scalar1QuaternionAddition<T, E> >::ResultType>::type
1068 return ExpressionType(t, e());
1079 template <
typename E1,
typename E2>
1080 typename QuaternionBinary1Traits<E1, E2, ScalarSubtraction<typename E1::ValueType, typename E2::ValueType> >::ResultType
1086 return ExpressionType(e1(), e2());
1097 template <
typename E,
typename T>
1098 typename std::enable_if<IsScalar<T>::value,
typename Scalar2QuaternionBinary2Traits<E, T, Scalar2QuaternionSubtraction<E, T> >::ResultType>::type
1103 return ExpressionType(e(), t);
1114 template <
typename T,
typename E>
1115 typename std::enable_if<IsScalar<T>::value,
typename Scalar1QuaternionBinary2Traits<T, E, Scalar1QuaternionSubtraction<T, E> >::ResultType>::type
1120 return ExpressionType(t, e());
1131 template <
typename E1,
typename E2>
1132 typename QuaternionBinary2Traits<E1, E2, QuaternionProduct<E1, E2> >::ResultType
1137 return ExpressionType(e1(), e2());
1148 template <
typename E,
typename T>
1149 typename std::enable_if<IsScalar<T>::value,
typename Scalar2QuaternionBinary1Traits<E, T, ScalarMultiplication<typename E::ValueType, T> >::ResultType>::type
1155 return ExpressionType(e(), t);
1166 template <
typename T,
typename E>
1167 typename std::enable_if<IsScalar<T>::value,
typename Scalar1QuaternionBinary1Traits<T, E, ScalarMultiplication<T, typename E::ValueType> >::ResultType>::type
1173 return ExpressionType(t, e());
1184 template <
typename E1,
typename E2>
1192 return ExpressionType(e1(), e2(),
norm2(e2));
1203 template <
typename E,
typename T>
1204 typename std::enable_if<IsScalar<T>::value,
typename Scalar2QuaternionBinary1Traits<E, T, ScalarDivision<typename E::ValueType, T> >::ResultType>::type
1210 return ExpressionType(e(), t);
1221 template <
typename T,
typename E>
1222 typename std::enable_if<IsScalar<T>::value,
1230 return ExpressionType(t, e(),
norm2(e));
1241 template <
typename E1,
typename E2>
1256 template <
typename E1,
typename E2>
1273 template <
typename E1,
typename E2,
typename T>
1288 template <
typename E1,
typename E2>
1289 typename QuaternionBinary1Traits<E1, E2, ScalarDivision<typename E1::ValueType, typename E2::ValueType> >::ResultType
1295 return ExpressionType(e1(), e2());
1306 template <
typename E1,
typename E2>
1307 typename QuaternionBinary1Traits<E1, E2, ScalarMultiplication<typename E1::ValueType, typename E2::ValueType> >::ResultType
1313 return ExpressionType(e1(), e2());
1322 template <
typename E>
1323 typename E::ValueType
1335 template <
typename E>
1336 typename QuaternionUnary2Traits<E, QuaternionUnreal<E> >::ResultType
1341 return ExpressionType(e());
1350 template <
typename E>
1351 typename QuaternionUnary2Traits<E, QuaternionConjugate<E> >::ResultType
1356 return ExpressionType(e());
1365 template <
typename E>
1373 return ExpressionType(e(),
norm2(e));
1382 template <
typename E>
1395 template <
typename E>
1408 template <
typename E>
Definition of basic expression types.
Definition of various functors.
Definition of type traits.
E ExpressionType
The derived expression type (made available to expression-template machinery).
Definition: Expression.hpp:47
Expression-template node combining two quaternion expressions E1 and E2 component-wise via the binary...
Definition: QuaternionExpression.hpp:230
ConstReference getC1() const
Returns the result of applying the binary functor to the C1 components of the two wrapped expressions...
Definition: QuaternionExpression.hpp:263
ConstReference getC4() const
Returns the result of applying the binary functor to the C4 components of the two wrapped expressions...
Definition: QuaternionExpression.hpp:290
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:245
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:243
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:247
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:241
QuaternionBinary1(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression-template node wrapping e1 and e2.
Definition: QuaternionExpression.hpp:256
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:249
ConstReference getC3() const
Returns the result of applying the binary functor to the C3 components of the two wrapped expressions...
Definition: QuaternionExpression.hpp:281
ConstReference getC2() const
Returns the result of applying the binary functor to the C2 components of the two wrapped expressions...
Definition: QuaternionExpression.hpp:272
Expression-template node combining two quaternion expressions E1 and E2 via the per-component functor...
Definition: QuaternionExpression.hpp:325
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:340
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:342
QuaternionBinary2(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression-template node wrapping e1 and e2.
Definition: QuaternionExpression.hpp:351
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the two wrapped expressions.
Definition: QuaternionExpression.hpp:385
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:344
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:338
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the two wrapped expressions.
Definition: QuaternionExpression.hpp:358
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the two wrapped expressions.
Definition: QuaternionExpression.hpp:376
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the two wrapped expressions.
Definition: QuaternionExpression.hpp:367
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:336
CRTP base class for all quaternion expression types.
Definition: Expression.hpp:142
Expression-template node applying a unary functor F that returns a quaternion result to a quaternion ...
Definition: QuaternionExpression.hpp:51
ConstReference getC4() const
Returns the result of applying the unary functor to component C4 of the wrapped expression.
Definition: QuaternionExpression.hpp:108
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:60
ConstReference getC1() const
Returns the result of applying the unary functor to component C1 of the wrapped expression.
Definition: QuaternionExpression.hpp:81
ConstReference getC3() const
Returns the result of applying the unary functor to component C3 of the wrapped expression.
Definition: QuaternionExpression.hpp:99
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:62
ConstReference getC2() const
Returns the result of applying the unary functor to component C2 of the wrapped expression.
Definition: QuaternionExpression.hpp:90
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:64
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:68
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:66
QuaternionUnary1(const ExpressionType &e)
Constructs the expression-template node wrapping e.
Definition: QuaternionExpression.hpp:74
Expression-template node applying a per-component functor F to a quaternion expression E,...
Definition: QuaternionExpression.hpp:141
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:150
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the wrapped expression.
Definition: QuaternionExpression.hpp:171
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:158
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the wrapped expression.
Definition: QuaternionExpression.hpp:198
QuaternionUnary2(const ExpressionType &e)
Constructs the expression-template node wrapping e.
Definition: QuaternionExpression.hpp:164
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:152
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:156
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:154
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the wrapped expression.
Definition: QuaternionExpression.hpp:189
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the wrapped expression.
Definition: QuaternionExpression.hpp:180
Expression-template node combining a scalar E1 (lhs), a quaternion expression E2 (middle),...
Definition: QuaternionExpression.hpp:900
Scalar13QuaternionTernary(const Expression1Type &e1, const Expression2Type &e2, const Expression3Type &e3)
Constructs the expression-template node combining the two scalars and the wrapped quaternion expressi...
Definition: QuaternionExpression.hpp:929
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the two scalars and the wrapped expres...
Definition: QuaternionExpression.hpp:954
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the two scalars and the wrapped expres...
Definition: QuaternionExpression.hpp:963
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the two scalars and the wrapped expres...
Definition: QuaternionExpression.hpp:936
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:921
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:917
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:913
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:915
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:919
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the two scalars and the wrapped expres...
Definition: QuaternionExpression.hpp:945
Expression-template node combining a scalar E1 (lhs) and a quaternion expression E2 (rhs) component-w...
Definition: QuaternionExpression.hpp:419
ConstReference getC4() const
Returns the result of applying the binary functor to the scalar and the C4 component of the wrapped e...
Definition: QuaternionExpression.hpp:479
Scalar1QuaternionBinary1(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression-template node combining the scalar e1 and the quaternion expression e2.
Definition: QuaternionExpression.hpp:445
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:432
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:434
ConstReference getC2() const
Returns the result of applying the binary functor to the scalar and the C2 component of the wrapped e...
Definition: QuaternionExpression.hpp:461
ConstReference getC3() const
Returns the result of applying the binary functor to the scalar and the C3 component of the wrapped e...
Definition: QuaternionExpression.hpp:470
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:436
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:438
ConstReference getC1() const
Returns the result of applying the binary functor to the scalar and the C1 component of the wrapped e...
Definition: QuaternionExpression.hpp:452
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:430
Expression-template node combining a scalar E1 (lhs) and a quaternion expression E2 (rhs) via the per...
Definition: QuaternionExpression.hpp:514
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the scalar and the wrapped expression.
Definition: QuaternionExpression.hpp:565
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:527
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:525
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:533
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the scalar and the wrapped expression.
Definition: QuaternionExpression.hpp:556
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the scalar and the wrapped expression.
Definition: QuaternionExpression.hpp:574
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:529
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:531
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the scalar and the wrapped expression.
Definition: QuaternionExpression.hpp:547
Scalar1QuaternionBinary2(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression-template node combining the scalar e1 and the quaternion expression e2.
Definition: QuaternionExpression.hpp:540
Expression-template node combining a quaternion expression E1 (lhs) and a scalar E2 (rhs) component-w...
Definition: QuaternionExpression.hpp:608
ConstReference getC4() const
Returns the result of applying the binary functor to the C4 component of the wrapped expression and t...
Definition: QuaternionExpression.hpp:668
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:623
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:619
ConstReference getC3() const
Returns the result of applying the binary functor to the C3 component of the wrapped expression and t...
Definition: QuaternionExpression.hpp:659
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:621
Scalar2QuaternionBinary1(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression-template node combining the quaternion expression e1 and the scalar e2.
Definition: QuaternionExpression.hpp:634
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:627
ConstReference getC2() const
Returns the result of applying the binary functor to the C2 component of the wrapped expression and t...
Definition: QuaternionExpression.hpp:650
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:625
ConstReference getC1() const
Returns the result of applying the binary functor to the C1 component of the wrapped expression and t...
Definition: QuaternionExpression.hpp:641
Expression-template node combining a quaternion expression E1 (lhs) and a scalar E2 (rhs) via the per...
Definition: QuaternionExpression.hpp:703
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the wrapped expression and the scalar.
Definition: QuaternionExpression.hpp:745
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:722
Scalar2QuaternionBinary2(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression-template node combining the quaternion expression e1 and the scalar e2.
Definition: QuaternionExpression.hpp:729
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:718
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the wrapped expression and the scalar.
Definition: QuaternionExpression.hpp:754
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the wrapped expression and the scalar.
Definition: QuaternionExpression.hpp:763
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:716
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:714
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:720
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the wrapped expression and the scalar.
Definition: QuaternionExpression.hpp:736
Expression-template node combining two quaternion expressions E1 (lhs) and E2 (middle) with a scalar ...
Definition: QuaternionExpression.hpp:799
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the two wrapped expressions and the sc...
Definition: QuaternionExpression.hpp:862
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the two wrapped expressions and the sc...
Definition: QuaternionExpression.hpp:835
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the two wrapped expressions and the sc...
Definition: QuaternionExpression.hpp:853
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:812
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:818
Scalar3QuaternionTernary(const Expression1Type &e1, const Expression2Type &e2, const Expression3Type &e3)
Constructs the expression-template node combining the two quaternion expressions and the scalar.
Definition: QuaternionExpression.hpp:828
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:820
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the two wrapped expressions and the sc...
Definition: QuaternionExpression.hpp:844
const ValueType ConstReference
Constant reference type to a component value.
Definition: QuaternionExpression.hpp:814
const ValueType Reference
Mutable reference type (degrades to const for expression-template results).
Definition: QuaternionExpression.hpp:816
constexpr unsigned int T
Specifies Hydrogen (Tritium).
Definition: AtomType.hpp:67
constexpr unsigned int F
Specifies Fluorine.
Definition: AtomType.hpp:107
constexpr unsigned int E
Specifies that the stereocenter has E configuration.
Definition: CIPDescriptor.hpp:96
GridBinary1Traits< E1, E2, ScalarMultiplication< typename E1::ValueType, typename E2::ValueType > >::ResultType elemProd(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2)
Returns the element-wise product of the grid expressions e1 and e2 (Hadamard product).
Definition: GridExpression.hpp:704
GridUnaryTraits< E, ScalarConjugation< typename E::ValueType > >::ResultType conj(const GridExpression< E > &e)
Returns the element-wise complex conjugate of the grid expression e (identity for real-valued grids).
Definition: GridExpression.hpp:624
std::enable_if< std::is_arithmetic< T >::value, typename GridToleranceEquality< E1, E2, T >::ResultType >::type equals(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2, const T &eps)
Tells whether the grid expressions e1 and e2 agree element-wise within the absolute tolerance eps.
Definition: GridExpression.hpp:611
QuaternionUnary2Traits< E, QuaternionUnreal< E > >::ResultType unreal(const QuaternionExpression< E > &e)
Returns the unreal (pure-quaternion) part of the quaternion expression e (with C1 zeroed out).
Definition: QuaternionExpression.hpp:1337
std::enable_if< IsScalar< T >::value, typename Scalar2GridBinaryTraits< E, T, ScalarDivision< typename E::ValueType, T > >::ResultType >::type operator/(const GridExpression< E > &e, const T &t)
Returns the element-wise quotient of the grid expression e by the scalar t.
Definition: GridExpression.hpp:561
GridUnaryTraits< E, ScalarReal< typename E::ValueType > >::ResultType real(const GridExpression< E > &e)
Returns the element-wise real part of the grid expression e.
Definition: GridExpression.hpp:654
QuaternionNorm2< E >::ResultType norm2(const QuaternionExpression< E > &e)
Returns the squared norm of the quaternion expression e.
Definition: QuaternionExpression.hpp:1397
GridEquality< E1, E2 >::ResultType operator!=(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2)
Tells whether the grid expressions e1 and e2 differ in at least one element.
Definition: GridExpression.hpp:594
QuaternionNorm< E >::ResultType norm(const QuaternionExpression< E > &e)
Returns the norm (Euclidean length) of the quaternion expression e.
Definition: QuaternionExpression.hpp:1384
GridEquality< E1, E2 >::ResultType operator==(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2)
Tells whether the grid expressions e1 and e2 are element-wise equal.
Definition: GridExpression.hpp:579
std::enable_if< IsScalar< T >::value, typename Scalar2GridBinaryTraits< E, T, ScalarMultiplication< typename E::ValueType, T > >::ResultType >::type operator*(const GridExpression< E > &e, const T &t)
Returns the element-wise product of the grid expression e and the scalar t.
Definition: GridExpression.hpp:525
GridBinary1Traits< E1, E2, ScalarDivision< typename E1::ValueType, typename E2::ValueType > >::ResultType elemDiv(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2)
Returns the element-wise quotient of the grid expressions e1 and e2.
Definition: GridExpression.hpp:686
GridUnaryTraits< E, ScalarNegation< typename E::ValueType > >::ResultType operator-(const GridExpression< E > &e)
Returns the element-wise negation of the grid expression e.
Definition: GridExpression.hpp:458
GridElementSum< E >::ResultType sum(const GridExpression< E > &e)
Returns the sum of all elements of the grid expression e.
Definition: GridExpression.hpp:720
const E & operator+(const GridExpression< E > &e)
Returns the grid expression e unchanged (unary +).
Definition: GridExpression.hpp:474
Scalar2QuaternionBinary2Traits< E, typename QuaternionNorm2< E >::ResultType, QuaternionInverse< E, typename QuaternionNorm2< E >::ResultType > >::ResultType inv(const QuaternionExpression< E > &e)
Returns the multiplicative inverse of the quaternion expression e ( ).
Definition: QuaternionExpression.hpp:1368
The namespace of the Chemical Data Processing Library.
Traits selecting the expression-template node and its result type for the Math::QuaternionBinary1 ins...
Definition: QuaternionExpression.hpp:308
QuaternionBinary1< E1, E2, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:311
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:313
Traits selecting the expression-template node and its result type for the Math::QuaternionBinary2 ins...
Definition: QuaternionExpression.hpp:403
QuaternionBinary2< E1, E2, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:406
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:408
Per-component functor returning the quaternion division (n2 is the precomputed squared norm of e_2).
Definition: Functional.hpp:2243
Scalar3QuaternionTernaryFunctor< Q1, Q2, T >::ResultType ResultType
Definition: Functional.hpp:2246
QuaternionScalarUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1576
static ResultType apply(const QuaternionExpression< Q > &e)
Returns the component sum of e.
Definition: Functional.hpp:1583
static ResultType apply(const QuaternionExpression< Q1 > &e1, const QuaternionExpression< Q2 > &e2)
Tells whether e1 and e2 have equal components.
Definition: Functional.hpp:1501
QuaternionBooleanBinaryFunctor< Q1, Q2 >::ResultType ResultType
Definition: Functional.hpp:1493
Per-component functor returning the multiplicative inverse of a quaternion expression (n2 is the pre...
Definition: Functional.hpp:2076
Scalar2QuaternionBinaryFunctor< Q, T >::ResultType ResultType
Definition: Functional.hpp:2079
static ResultType apply(const QuaternionExpression< Q > &e)
Returns .
Definition: Functional.hpp:1650
QuaternionScalarRealUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1643
QuaternionScalarRealUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1615
static ResultType apply(const QuaternionExpression< Q > &e)
Returns .
Definition: Functional.hpp:1622
Scalar3QuaternionBooleanTernaryFunctor< Q1, Q2, T >::ResultType ResultType
Definition: Functional.hpp:1536
static ResultType apply(const QuaternionExpression< Q1 > &e1, const QuaternionExpression< Q2 > &e2, Argument3Type epsilon)
Tells whether e1 and e2 agree component-wise within the absolute tolerance epsilon.
Definition: Functional.hpp:1546
Traits selecting the expression-template node and its result type for the Math::QuaternionUnary1 inst...
Definition: QuaternionExpression.hpp:124
QuaternionUnary1< E, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:127
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:129
Traits selecting the expression-template node and its result type for the Math::QuaternionUnary2 inst...
Definition: QuaternionExpression.hpp:214
QuaternionUnary2< E, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:217
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:219
Traits selecting the expression-template node and its result type for the Math::Scalar13QuaternionTer...
Definition: QuaternionExpression.hpp:983
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:988
Scalar13QuaternionTernary< E1, E2, E3, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:986
Traits selecting the expression-template node and its result type for the Math::Scalar1QuaternionBina...
Definition: QuaternionExpression.hpp:497
Scalar1QuaternionBinary1< E1, E2, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:500
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:502
Traits selecting the expression-template node and its result type for the Math::Scalar1QuaternionBina...
Definition: QuaternionExpression.hpp:592
Scalar1QuaternionBinary2< E1, E2, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:595
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:597
Traits selecting the expression-template node and its result type for the Math::Scalar2QuaternionBina...
Definition: QuaternionExpression.hpp:686
Scalar2QuaternionBinary1< E1, E2, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:689
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:691
Traits selecting the expression-template node and its result type for the Math::Scalar2QuaternionBina...
Definition: QuaternionExpression.hpp:781
Scalar2QuaternionBinary2< E1, E2, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:784
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:786
Traits selecting the expression-template node and its result type for the Math::Scalar3QuaternionTern...
Definition: QuaternionExpression.hpp:882
Scalar3QuaternionTernary< E1, E2, E3, F > ExpressionType
The expression-template node type.
Definition: QuaternionExpression.hpp:885
ExpressionType ResultType
The expression-template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:887
Scalar binary addition functor: apply(t1, t2) returns t1 + t2.
Definition: Functional.hpp:344
Scalar binary division functor: apply(t1, t2) returns t1 / t2.
Definition: Functional.hpp:419
Scalar binary multiplication functor: apply(t1, t2) returns t1 * t2.
Definition: Functional.hpp:394
Per-component functor returning the scalar/quaternion division (n2 is the precomputed squared norm o...
Definition: Functional.hpp:2339
Scalar13QuaternionTernaryFunctor< T1, Q, T2 >::ResultType ResultType
Definition: Functional.hpp:2343
Scalar binary subtraction functor: apply(t1, t2) returns t1 - t2.
Definition: Functional.hpp:369