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;
97 return FunctorType::apply(expr.getC1());
106 return FunctorType::apply(expr.getC2());
115 return FunctorType::apply(expr.getC3());
124 return FunctorType::apply(expr.getC4());
128 ExpressionClosureType expr;
136 template <
typename E,
typename F>
158 template <
typename E,
typename F>
163 typedef F FunctorType;
165 typedef typename E::ConstClosureType ExpressionClosureType;
206 return FunctorType::applyC1(expr);
215 return FunctorType::applyC2(expr);
224 return FunctorType::applyC3(expr);
233 return FunctorType::applyC4(expr);
237 ExpressionClosureType expr;
245 template <
typename E,
typename F>
266 template <
typename E1,
typename E2,
typename F>
271 typedef F FunctorType;
272 typedef E1 Expression1Type;
273 typedef E2 Expression2Type;
274 typedef typename E1::ConstClosureType Expression1ClosureType;
275 typedef typename E2::ConstClosureType Expression2ClosureType;
309 expr1(e1), expr2(e2) {}
317 return FunctorType::apply(expr1.getC1(), expr2.getC1());
326 return FunctorType::apply(expr1.getC2(), expr2.getC2());
335 return FunctorType::apply(expr1.getC3(), expr2.getC3());
344 return FunctorType::apply(expr1.getC4(), expr2.getC4());
348 Expression1ClosureType expr1;
349 Expression2ClosureType expr2;
358 template <
typename E1,
typename E2,
typename F>
380 template <
typename E1,
typename E2,
typename F>
385 typedef F FunctorType;
386 typedef E1 Expression1Type;
387 typedef E2 Expression2Type;
388 typedef typename E1::ConstClosureType Expression1ClosureType;
389 typedef typename E2::ConstClosureType Expression2ClosureType;
423 expr1(e1), expr2(e2) {}
431 return FunctorType::applyC1(expr1, expr2);
440 return FunctorType::applyC2(expr1, expr2);
449 return FunctorType::applyC3(expr1, expr2);
458 return FunctorType::applyC4(expr1, expr2);
462 Expression1ClosureType expr1;
463 Expression2ClosureType expr2;
472 template <
typename E1,
typename E2,
typename F>
493 template <
typename E1,
typename E2,
typename F>
498 typedef F FunctorType;
499 typedef E1 Expression1Type;
500 typedef E2 Expression2Type;
501 typedef const E1 Expression1ClosureType;
502 typedef typename E2::ConstClosureType Expression2ClosureType;
536 expr1(e1), expr2(e2) {}
544 return FunctorType::apply(expr1, expr2.getC1());
553 return FunctorType::apply(expr1, expr2.getC2());
562 return FunctorType::apply(expr1, expr2.getC3());
571 return FunctorType::apply(expr1, expr2.getC4());
575 Expression1ClosureType expr1;
576 Expression2ClosureType expr2;
585 template <
typename E1,
typename E2,
typename F>
607 template <
typename E1,
typename E2,
typename F>
612 typedef F FunctorType;
613 typedef E1 Expression1Type;
614 typedef E2 Expression2Type;
615 typedef const E1 Expression1ClosureType;
616 typedef typename E2::ConstClosureType Expression2ClosureType;
650 expr1(e1), expr2(e2) {}
658 return FunctorType::applyC1(expr1, expr2);
667 return FunctorType::applyC2(expr1, expr2);
676 return FunctorType::applyC3(expr1, expr2);
685 return FunctorType::applyC4(expr1, expr2);
689 Expression1ClosureType expr1;
690 Expression2ClosureType expr2;
699 template <
typename E1,
typename E2,
typename F>
720 template <
typename E1,
typename E2,
typename F>
725 typedef F FunctorType;
726 typedef E1 Expression1Type;
727 typedef E2 Expression2Type;
728 typedef typename E1::ConstClosureType Expression1ClosureType;
729 typedef const E2 Expression2ClosureType;
763 expr1(e1), expr2(e2) {}
771 return FunctorType::apply(expr1.getC1(), expr2);
780 return FunctorType::apply(expr1.getC2(), expr2);
789 return FunctorType::apply(expr1.getC3(), expr2);
798 return FunctorType::apply(expr1.getC4(), expr2);
802 Expression1ClosureType expr1;
803 Expression2ClosureType expr2;
812 template <
typename E1,
typename E2,
typename F>
834 template <
typename E1,
typename E2,
typename F>
839 typedef F FunctorType;
840 typedef E1 Expression1Type;
841 typedef E2 Expression2Type;
842 typedef typename E1::ConstClosureType Expression1ClosureType;
843 typedef const E2 Expression2ClosureType;
877 expr1(e1), expr2(e2) {}
885 return FunctorType::applyC1(expr1, expr2);
894 return FunctorType::applyC2(expr1, expr2);
903 return FunctorType::applyC3(expr1, expr2);
912 return FunctorType::applyC4(expr1, expr2);
916 Expression1ClosureType expr1;
917 Expression2ClosureType expr2;
926 template <
typename E1,
typename E2,
typename F>
949 template <
typename E1,
typename E2,
typename E3,
typename F>
954 typedef F FunctorType;
955 typedef E1 Expression1Type;
956 typedef E2 Expression2Type;
957 typedef E3 Expression3Type;
958 typedef typename E1::ConstClosureType Expression1ClosureType;
959 typedef typename E2::ConstClosureType Expression2ClosureType;
960 typedef const E3 Expression3ClosureType;
995 expr1(e1), expr2(e2), expr3(e3) {}
1003 return FunctorType::applyC1(expr1, expr2, expr3);
1012 return FunctorType::applyC2(expr1, expr2, expr3);
1021 return FunctorType::applyC3(expr1, expr2, expr3);
1030 return FunctorType::applyC4(expr1, expr2, expr3);
1034 Expression1ClosureType expr1;
1035 Expression2ClosureType expr2;
1036 Expression3ClosureType expr3;
1046 template <
typename E1,
typename E2,
typename E3,
typename F>
1069 template <
typename E1,
typename E2,
typename E3,
typename F>
1074 typedef F FunctorType;
1075 typedef E1 Expression1Type;
1076 typedef E2 Expression2Type;
1077 typedef E3 Expression3Type;
1078 typedef const E1 Expression1ClosureType;
1079 typedef typename E2::ConstClosureType Expression2ClosureType;
1080 typedef const E3 Expression3ClosureType;
1115 expr1(e1), expr2(e2), expr3(e3) {}
1123 return FunctorType::applyC1(expr1, expr2, expr3);
1132 return FunctorType::applyC2(expr1, expr2, expr3);
1141 return FunctorType::applyC3(expr1, expr2, expr3);
1150 return FunctorType::applyC4(expr1, expr2, expr3);
1154 Expression1ClosureType expr1;
1155 Expression2ClosureType expr2;
1156 Expression3ClosureType expr3;
1166 template <
typename E1,
typename E2,
typename E3,
typename F>
1187 template <
typename E>
1193 return ExpressionType(e());
1202 template <
typename E>
1217 template <
typename E1,
typename E2>
1218 typename QuaternionBinary1Traits<E1, E2, ScalarAddition<typename E1::ValueType, typename E2::ValueType> >::ResultType
1224 return ExpressionType(e1(), e2());
1235 template <
typename E,
typename T>
1236 typename std::enable_if<IsScalar<T>::value,
typename Scalar2QuaternionBinary2Traits<E, T, Scalar2QuaternionAddition<E, T> >::ResultType>::type
1241 return ExpressionType(e(), t);
1252 template <
typename T,
typename E>
1253 typename std::enable_if<IsScalar<T>::value,
typename Scalar1QuaternionBinary2Traits<T, E, Scalar1QuaternionAddition<T, E> >::ResultType>::type
1258 return ExpressionType(t, e());
1269 template <
typename E1,
typename E2>
1270 typename QuaternionBinary1Traits<E1, E2, ScalarSubtraction<typename E1::ValueType, typename E2::ValueType> >::ResultType
1276 return ExpressionType(e1(), e2());
1287 template <
typename E,
typename T>
1288 typename std::enable_if<IsScalar<T>::value,
typename Scalar2QuaternionBinary2Traits<E, T, Scalar2QuaternionSubtraction<E, T> >::ResultType>::type
1293 return ExpressionType(e(), t);
1304 template <
typename T,
typename E>
1305 typename std::enable_if<IsScalar<T>::value,
typename Scalar1QuaternionBinary2Traits<T, E, Scalar1QuaternionSubtraction<T, E> >::ResultType>::type
1310 return ExpressionType(t, e());
1321 template <
typename E1,
typename E2>
1322 typename QuaternionBinary2Traits<E1, E2, QuaternionProduct<E1, E2> >::ResultType
1327 return ExpressionType(e1(), e2());
1338 template <
typename E,
typename T>
1339 typename std::enable_if<IsScalar<T>::value,
typename Scalar2QuaternionBinary1Traits<E, T, ScalarMultiplication<typename E::ValueType, T> >::ResultType>::type
1345 return ExpressionType(e(), t);
1356 template <
typename T,
typename E>
1357 typename std::enable_if<IsScalar<T>::value,
typename Scalar1QuaternionBinary1Traits<T, E, ScalarMultiplication<T, typename E::ValueType> >::ResultType>::type
1363 return ExpressionType(t, e());
1374 template <
typename E1,
typename E2>
1382 return ExpressionType(e1(), e2(),
norm2(e2));
1393 template <
typename E,
typename T>
1394 typename std::enable_if<IsScalar<T>::value,
typename Scalar2QuaternionBinary1Traits<E, T, ScalarDivision<typename E::ValueType, T> >::ResultType>::type
1400 return ExpressionType(e(), t);
1411 template <
typename T,
typename E>
1412 typename std::enable_if<IsScalar<T>::value,
1420 return ExpressionType(t, e(),
norm2(e));
1431 template <
typename E1,
typename E2>
1446 template <
typename E1,
typename E2>
1463 template <
typename E1,
typename E2,
typename T>
1478 template <
typename E1,
typename E2>
1479 typename QuaternionBinary1Traits<E1, E2, ScalarDivision<typename E1::ValueType, typename E2::ValueType> >::ResultType
1485 return ExpressionType(e1(), e2());
1496 template <
typename E1,
typename E2>
1497 typename QuaternionBinary1Traits<E1, E2, ScalarMultiplication<typename E1::ValueType, typename E2::ValueType> >::ResultType
1503 return ExpressionType(e1(), e2());
1512 template <
typename E>
1513 typename E::ValueType
1525 template <
typename E>
1526 typename QuaternionUnary2Traits<E, QuaternionUnreal<E> >::ResultType
1531 return ExpressionType(e());
1540 template <
typename E>
1541 typename QuaternionUnary2Traits<E, QuaternionConjugate<E> >::ResultType
1546 return ExpressionType(e());
1555 template <
typename E>
1563 return ExpressionType(e(),
norm2(e));
1572 template <
typename E>
1585 template <
typename E>
1598 template <
typename E>
Definition of basic expression types.
Definition of various functors.
Definition of type traits.
E ExpressionType
The derived expression type.
Definition: Expression.hpp:49
Expression template node combining two quaternion expressions E1 and E2 component-wise via the binary...
Definition: QuaternionExpression.hpp:268
ConstReference getC1() const
Returns the result of applying the binary functor to the C1 components of the two wrapped expressions...
Definition: QuaternionExpression.hpp:315
ConstReference getC4() const
Returns the result of applying the binary functor to the C4 components of the two wrapped expressions...
Definition: QuaternionExpression.hpp:342
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:291
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:286
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:296
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:281
QuaternionBinary1(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node wrapping e1 and e2.
Definition: QuaternionExpression.hpp:308
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:301
ConstReference getC3() const
Returns the result of applying the binary functor to the C3 components of the two wrapped expressions...
Definition: QuaternionExpression.hpp:333
ConstReference getC2() const
Returns the result of applying the binary functor to the C2 components of the two wrapped expressions...
Definition: QuaternionExpression.hpp:324
Expression template node combining two quaternion expressions E1 and E2 via the per-component functor...
Definition: QuaternionExpression.hpp:382
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:405
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:410
QuaternionBinary2(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node wrapping e1 and e2.
Definition: QuaternionExpression.hpp:422
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the two wrapped expressions.
Definition: QuaternionExpression.hpp:456
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:415
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:400
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the two wrapped expressions.
Definition: QuaternionExpression.hpp:429
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the two wrapped expressions.
Definition: QuaternionExpression.hpp:447
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the two wrapped expressions.
Definition: QuaternionExpression.hpp:438
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:395
CRTP base class of all quaternion expression types.
Definition: Expression.hpp:148
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:122
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:62
ConstReference getC1() const
Returns the result of applying the unary functor to component C1 of the wrapped expression.
Definition: QuaternionExpression.hpp:95
ConstReference getC3() const
Returns the result of applying the unary functor to component C3 of the wrapped expression.
Definition: QuaternionExpression.hpp:113
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:67
ConstReference getC2() const
Returns the result of applying the unary functor to component C2 of the wrapped expression.
Definition: QuaternionExpression.hpp:104
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:72
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:82
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:77
QuaternionUnary1(const ExpressionType &e)
Constructs the expression template node wrapping e.
Definition: QuaternionExpression.hpp:88
Expression template node applying a per-component functor F to a quaternion expression E,...
Definition: QuaternionExpression.hpp:160
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:171
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the wrapped expression.
Definition: QuaternionExpression.hpp:204
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:191
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the wrapped expression.
Definition: QuaternionExpression.hpp:231
QuaternionUnary2(const ExpressionType &e)
Constructs the expression template node wrapping e.
Definition: QuaternionExpression.hpp:197
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:176
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:186
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:181
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the wrapped expression.
Definition: QuaternionExpression.hpp:222
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the wrapped expression.
Definition: QuaternionExpression.hpp:213
Expression template node combining a scalar E1 (lhs), a quaternion expression E2 (middle),...
Definition: QuaternionExpression.hpp:1071
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:1114
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the two scalars and the wrapped expres...
Definition: QuaternionExpression.hpp:1139
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the two scalars and the wrapped expres...
Definition: QuaternionExpression.hpp:1148
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the two scalars and the wrapped expres...
Definition: QuaternionExpression.hpp:1121
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:1106
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:1096
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:1086
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:1091
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:1101
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the two scalars and the wrapped expres...
Definition: QuaternionExpression.hpp:1130
Expression template node combining a scalar E1 (lhs) and a quaternion expression E2 (rhs) component-w...
Definition: QuaternionExpression.hpp:495
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:569
Scalar1QuaternionBinary1(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node combining the scalar e1 and the quaternion expression e2.
Definition: QuaternionExpression.hpp:535
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:513
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:518
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:551
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:560
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:523
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:528
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:542
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:508
Expression template node combining a scalar E1 (lhs) and a quaternion expression E2 (rhs) via the per...
Definition: QuaternionExpression.hpp:609
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the scalar and the wrapped expression.
Definition: QuaternionExpression.hpp:674
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:627
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:622
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:642
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the scalar and the wrapped expression.
Definition: QuaternionExpression.hpp:665
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the scalar and the wrapped expression.
Definition: QuaternionExpression.hpp:683
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:632
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:637
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the scalar and the wrapped expression.
Definition: QuaternionExpression.hpp:656
Scalar1QuaternionBinary2(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node combining the scalar e1 and the quaternion expression e2.
Definition: QuaternionExpression.hpp:649
Expression template node combining a quaternion expression E1 (lhs) and a scalar E2 (rhs) component-w...
Definition: QuaternionExpression.hpp:722
ConstReference getC4() const
Returns the result of applying the binary functor to the C4 component of the wrapped expression and t...
Definition: QuaternionExpression.hpp:796
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:745
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:735
ConstReference getC3() const
Returns the result of applying the binary functor to the C3 component of the wrapped expression and t...
Definition: QuaternionExpression.hpp:787
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:740
Scalar2QuaternionBinary1(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node combining the quaternion expression e1 and the scalar e2.
Definition: QuaternionExpression.hpp:762
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:755
ConstReference getC2() const
Returns the result of applying the binary functor to the C2 component of the wrapped expression and t...
Definition: QuaternionExpression.hpp:778
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:750
ConstReference getC1() const
Returns the result of applying the binary functor to the C1 component of the wrapped expression and t...
Definition: QuaternionExpression.hpp:769
Expression template node combining a quaternion expression E1 (lhs) and a scalar E2 (rhs) via the per...
Definition: QuaternionExpression.hpp:836
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the wrapped expression and the scalar.
Definition: QuaternionExpression.hpp:892
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:869
Scalar2QuaternionBinary2(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node combining the quaternion expression e1 and the scalar e2.
Definition: QuaternionExpression.hpp:876
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:859
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the wrapped expression and the scalar.
Definition: QuaternionExpression.hpp:901
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the wrapped expression and the scalar.
Definition: QuaternionExpression.hpp:910
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:854
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:849
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:864
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the wrapped expression and the scalar.
Definition: QuaternionExpression.hpp:883
Expression template node combining two quaternion expressions E1 (lhs) and E2 (middle) with a scalar ...
Definition: QuaternionExpression.hpp:951
ConstReference getC4() const
Returns the result of applying the functor's applyC4 method to the two wrapped expressions and the sc...
Definition: QuaternionExpression.hpp:1028
ConstReference getC1() const
Returns the result of applying the functor's applyC1 method to the two wrapped expressions and the sc...
Definition: QuaternionExpression.hpp:1001
ConstReference getC3() const
Returns the result of applying the functor's applyC3 method to the two wrapped expressions and the sc...
Definition: QuaternionExpression.hpp:1019
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: QuaternionExpression.hpp:966
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:981
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:994
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: QuaternionExpression.hpp:986
ConstReference getC2() const
Returns the result of applying the functor's applyC2 method to the two wrapped expressions and the sc...
Definition: QuaternionExpression.hpp:1010
const ValueType ConstReference
Constant component reference type.
Definition: QuaternionExpression.hpp:971
const ValueType Reference
Mutable component reference type (degrades to const for expression template results).
Definition: QuaternionExpression.hpp:976
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:802
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:722
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:709
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:1527
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:659
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:752
QuaternionNorm2< E >::ResultType norm2(const QuaternionExpression< E > &e)
Returns the squared norm of the quaternion expression e.
Definition: QuaternionExpression.hpp:1587
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:692
QuaternionNorm< E >::ResultType norm(const QuaternionExpression< E > &e)
Returns the norm (Euclidean length) of the quaternion expression e.
Definition: QuaternionExpression.hpp:1574
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:677
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:623
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:784
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:557
GridElementSum< E >::ResultType sum(const GridExpression< E > &e)
Returns the sum of all elements of the grid expression e.
Definition: GridExpression.hpp:818
const E & operator+(const GridExpression< E > &e)
Returns the grid expression e unchanged (unary +).
Definition: GridExpression.hpp:572
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:1558
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:360
QuaternionBinary1< E1, E2, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:365
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:370
Traits selecting the expression template node and its result type for the Math::QuaternionBinary2 ins...
Definition: QuaternionExpression.hpp:474
QuaternionBinary2< E1, E2, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:479
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:484
Per-component functor returning the quaternion division (n2 is the precomputed squared norm of e_2).
Definition: Functional.hpp:2408
Scalar3QuaternionTernaryFunctor< Q1, Q2, T >::ResultType ResultType
Definition: Functional.hpp:2411
QuaternionScalarUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1714
static ResultType apply(const QuaternionExpression< Q > &e)
Returns the component sum of e.
Definition: Functional.hpp:1721
static ResultType apply(const QuaternionExpression< Q1 > &e1, const QuaternionExpression< Q2 > &e2)
Tells whether e1 and e2 have equal components.
Definition: Functional.hpp:1629
QuaternionBooleanBinaryFunctor< Q1, Q2 >::ResultType ResultType
Definition: Functional.hpp:1621
Per-component functor returning the multiplicative inverse of a quaternion expression (n2 is the pre...
Definition: Functional.hpp:2234
Scalar2QuaternionBinaryFunctor< Q, T >::ResultType ResultType
Definition: Functional.hpp:2237
static ResultType apply(const QuaternionExpression< Q > &e)
Returns .
Definition: Functional.hpp:1796
QuaternionScalarRealUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1789
QuaternionScalarRealUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1761
static ResultType apply(const QuaternionExpression< Q > &e)
Returns .
Definition: Functional.hpp:1768
Scalar3QuaternionBooleanTernaryFunctor< Q1, Q2, T >::ResultType ResultType
Definition: Functional.hpp:1672
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:1682
Traits selecting the expression template node and its result type for the Math::QuaternionUnary1 inst...
Definition: QuaternionExpression.hpp:138
QuaternionUnary1< E, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:143
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:148
Traits selecting the expression template node and its result type for the Math::QuaternionUnary2 inst...
Definition: QuaternionExpression.hpp:247
QuaternionUnary2< E, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:252
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:257
Traits selecting the expression template node and its result type for the Math::Scalar13QuaternionTer...
Definition: QuaternionExpression.hpp:1168
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:1178
Scalar13QuaternionTernary< E1, E2, E3, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:1173
Traits selecting the expression template node and its result type for the Math::Scalar1QuaternionBina...
Definition: QuaternionExpression.hpp:587
Scalar1QuaternionBinary1< E1, E2, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:592
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::Scalar1QuaternionBina...
Definition: QuaternionExpression.hpp:701
Scalar1QuaternionBinary2< E1, E2, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:706
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:711
Traits selecting the expression template node and its result type for the Math::Scalar2QuaternionBina...
Definition: QuaternionExpression.hpp:814
Scalar2QuaternionBinary1< E1, E2, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:819
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:824
Traits selecting the expression template node and its result type for the Math::Scalar2QuaternionBina...
Definition: QuaternionExpression.hpp:928
Scalar2QuaternionBinary2< E1, E2, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:933
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:938
Traits selecting the expression template node and its result type for the Math::Scalar3QuaternionTern...
Definition: QuaternionExpression.hpp:1048
Scalar3QuaternionTernary< E1, E2, E3, F > ExpressionType
The expression template node type.
Definition: QuaternionExpression.hpp:1053
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: QuaternionExpression.hpp:1058
Scalar binary addition functor: apply(t1, t2) returns t1 + t2.
Definition: Functional.hpp:373
Scalar binary division functor: apply(t1, t2) returns t1 / t2.
Definition: Functional.hpp:448
Scalar binary multiplication functor: apply(t1, t2) returns t1 * t2.
Definition: Functional.hpp:423
Per-component functor returning the scalar/quaternion division (n2 is the precomputed squared norm o...
Definition: Functional.hpp:2512
Scalar13QuaternionTernaryFunctor< T1, Q, T2 >::ResultType ResultType
Definition: Functional.hpp:2516
Scalar binary subtraction functor: apply(t1, t2) returns t1 - t2.
Definition: Functional.hpp:398