27 #ifndef CDPL_MATH_FUNCTIONAL_HPP
28 #define CDPL_MATH_FUNCTIONAL_HPP
30 #include <boost/algorithm/clamp.hpp>
45 class VectorExpression;
47 class MatrixExpression;
49 class QuaternionExpression;
53 template <
typename T1,
typename T2>
61 template <
typename T1,
typename T2>
74 template <
typename T1,
typename T2>
87 template <
typename T1,
typename T2>
100 template <
typename T1,
typename T2>
113 template <
typename T1,
typename T2>
126 template <
typename T>
135 template <
typename T>
149 template <
typename T>
163 template <
typename T>
172 template <
typename T>
186 template <
typename T>
200 template <
typename T1,
typename T2>
209 template <
typename T1,
typename T2>
223 template <
typename T1,
typename T2>
237 template <
typename T1,
typename T2>
251 template <
typename T1,
typename T2>
265 template <
typename V1,
typename V2>
272 template <
typename V1,
typename V2>
285 for (SizeType i = 0; i < size; i++)
286 res += e1()(i) * e2()(i);
292 template <
typename V1,
typename V2,
typename T>
309 template <
typename V1,
typename V2>
318 template <
typename V1,
typename V2>
331 for (
SizeType i = 0, size = e1().getSize(); i < size; i++)
339 template <
typename V1,
typename V2,
typename T>
349 template <
typename V1,
typename V2,
typename T>
365 ComparisonType norm_inf_max(epsilon);
367 for (
SizeType i = 0, size = e1().getSize(); i < size; i++)
375 template <
typename V1,
typename V2>
382 template <
typename V1,
typename V2>
388 template <
typename E1,
typename E2,
typename SizeType>
397 return (e1()(1) * e2()(2) - e1()(2) * e2()(1));
400 return (e1()(2) * e2()(0) - e1()(0) * e2()(2));
403 return (e1()(0) * e2()(1) - e1()(1) * e2()(0));
411 template <
typename V>
419 template <
typename V>
427 typedef typename V::SizeType
SizeType;
431 for (
SizeType i = 0, size = e().getSize(); i < size; i++)
438 template <
typename V>
447 template <
typename V>
457 typedef typename V::SizeType SizeType;
461 for (SizeType i = 0, size = e().getSize(); i < size; i++)
468 template <
typename V>
478 typedef typename V::SizeType SizeType;
482 for (SizeType i = 0, size = e().getSize(); i < size; i++) {
492 template <
typename V>
502 typedef typename V::SizeType SizeType;
506 for (SizeType i = 0, size = e().getSize(); i < size; i++) {
517 template <
typename V>
526 template <
typename V>
536 typedef typename V::SizeType SizeType;
541 for (SizeType i = 0, size = e().getSize(); i < size; i++) {
554 template <
typename M1,
typename M2>
563 template <
typename M1,
typename M2>
579 for (
SizeType i = 0, size1 = e1().getSize1(); i < size1; i++)
580 for (
SizeType j = 0, size2 = e1().getSize2(); j < size2; j++)
588 template <
typename M1,
typename M2,
typename T>
598 template <
typename M1,
typename M2,
typename T>
617 ComparisonType norm_inf_max(epsilon);
619 for (
SizeType i = 0, size1 = e1().getSize1(); i < size1; i++)
620 for (
SizeType j = 0, size2 = e1().getSize2(); j < size2; j++)
628 template <
typename M>
635 template <
typename M>
643 typedef typename M::SizeType SizeType;
646 SizeType size1 = e().getSize1();
647 SizeType size2 = e().getSize2();
649 for (SizeType i = 0; i < size1; i++)
650 for (SizeType j = 0; j < size2; j++)
657 template <
typename M>
665 typedef typename M::SizeType SizeType;
670 for (SizeType i = 0; i < size; i++)
677 template <
typename M>
686 template <
typename M>
696 typedef typename M::SizeType SizeType;
699 SizeType size1 = e().getSize1();
700 SizeType size2 = e().getSize2();
702 for (SizeType j = 0; j < size2; j++) {
705 for (SizeType i = 0; i < size1; i++)
716 template <
typename M>
726 typedef typename M::SizeType SizeType;
729 SizeType size1 = e().getSize1();
730 SizeType size2 = e().getSize2();
732 for (SizeType i = 0; i < size1; i++) {
733 for (SizeType j = 0; j < size2; j++) {
744 template <
typename M>
754 typedef typename M::SizeType SizeType;
757 SizeType size1 = e().getSize1();
758 SizeType size2 = e().getSize2();
760 for (SizeType i = 0; i < size1; i++) {
763 for (SizeType j = 0; j < size2; j++)
774 template <
typename V>
782 template <
typename V>
789 template <
typename E>
799 template <
typename V>
806 template <
typename E>
861 template <
typename M,
typename V>
870 template <
typename M,
typename V>
878 template <
typename E1,
typename E2>
885 res += e1()(i, j) * e2()(j);
891 template <
typename V,
typename M>
899 template <
typename E1,
typename E2>
906 res += e1()(j) * e2()(j, i);
912 template <
typename M1,
typename M2>
921 template <
typename M1,
typename M2>
929 template <
typename E1,
typename E2>
936 res += e1()(i, k) * e2()(k, j);
942 template <
typename Q1,
typename Q2>
950 template <
typename Q1,
typename Q2>
963 template <
typename Q1,
typename Q2,
typename T>
972 template <
typename Q1,
typename Q2,
typename T>
984 ComparisonType norm_inf_max(epsilon);
990 template <
typename Q>
997 template <
typename Q>
1005 return (e().getC1() + e().getC2() + e().getC3() + e().getC4());
1009 template <
typename Q>
1018 template <
typename Q>
1028 RealType t = e().getC1() * e().getC1() +
1029 e().getC2() * e().getC2() +
1030 e().getC3() * e().getC3() +
1031 e().getC4() * e().getC4();
1037 template <
typename Q>
1047 RealType t = e().getC1() * e().getC1() +
1048 e().getC2() * e().getC2() +
1049 e().getC3() * e().getC3() +
1050 e().getC4() * e().getC4();
1056 template <
typename Q>
1063 template <
typename Q>
1069 template <
typename E>
1075 template <
typename E>
1081 template <
typename E>
1087 template <
typename E>
1094 template <
typename Q>
1100 template <
typename E>
1106 template <
typename E>
1109 return -e().getC2();
1112 template <
typename E>
1115 return -e().getC3();
1118 template <
typename E>
1121 return -e().getC4();
1125 template <
typename T,
typename Q>
1133 template <
typename T,
typename Q>
1140 template <
typename E>
1143 return (t + e().getC1());
1146 template <
typename E>
1152 template <
typename E>
1158 template <
typename E>
1165 template <
typename T,
typename Q>
1172 template <
typename E>
1175 return (t - e().getC1());
1178 template <
typename E>
1181 return -e().getC2();
1184 template <
typename E>
1187 return -e().getC3();
1190 template <
typename E>
1193 return -e().getC4();
1197 template <
typename Q,
typename T>
1205 template <
typename Q,
typename T>
1212 template <
typename E>
1215 return (e().getC1() + t);
1218 template <
typename E>
1224 template <
typename E>
1230 template <
typename E>
1237 template <
typename Q,
typename T>
1244 template <
typename E>
1247 return (e().getC1() - t);
1250 template <
typename E>
1256 template <
typename E>
1262 template <
typename E>
1269 template <
typename Q,
typename T>
1276 template <
typename E>
1279 return (e().getC1() / n2);
1282 template <
typename E>
1285 return (-e().getC2() / n2);
1288 template <
typename E>
1291 return (-e().getC3() / n2);
1294 template <
typename E>
1297 return (-e().getC4() / n2);
1301 template <
typename Q1,
typename Q2>
1308 template <
typename Q1,
typename Q2>
1314 template <
typename E1,
typename E2>
1318 return (e1().getC1() * e2().getC1() - e1().getC2() * e2().getC2() - e1().getC3() * e2().getC3() - e1().getC4() * e2().getC4());
1321 template <
typename E1,
typename E2>
1325 return (e1().getC1() * e2().getC2() + e1().getC2() * e2().getC1() + e1().getC3() * e2().getC4() - e1().getC4() * e2().getC3());
1328 template <
typename E1,
typename E2>
1332 return (e1().getC1() * e2().getC3() - e1().getC2() * e2().getC4() + e1().getC3() * e2().getC1() + e1().getC4() * e2().getC2());
1335 template <
typename E1,
typename E2>
1339 return (e1().getC1() * e2().getC4() + e1().getC2() * e2().getC3() - e1().getC3() * e2().getC2() + e1().getC4() * e2().getC1());
1343 template <
typename Q1,
typename Q2,
typename T>
1351 template <
typename Q1,
typename Q2,
typename T>
1358 template <
typename E1,
typename E2>
1362 return ((e1().getC1() * e2().getC1() + e1().getC2() * e2().getC2() + e1().getC3() * e2().getC3() + e1().getC4() * e2().getC4()) / n2);
1365 template <
typename E1,
typename E2>
1369 return ((-e1().getC1() * e2().getC2() + e1().getC2() * e2().getC1() - e1().getC3() * e2().getC4() + e1().getC4() * e2().getC3()) / n2);
1372 template <
typename E1,
typename E2>
1376 return ((-e1().getC1() * e2().getC3() + e1().getC2() * e2().getC4() + e1().getC3() * e2().getC1() - e1().getC4() * e2().getC2()) / n2);
1379 template <
typename E1,
typename E2>
1383 return ((-e1().getC1() * e2().getC4() - e1().getC2() * e2().getC3() + e1().getC3() * e2().getC2() + e1().getC4() * e2().getC1()) / n2);
1387 template <
typename T1,
typename Q,
typename T2>
1396 template <
typename T1,
typename Q,
typename T2>
1404 template <
typename E>
1407 return (t * e().getC1() / n2);
1410 template <
typename E>
1413 return (t * -e().getC2() / n2);
1416 template <
typename E>
1419 return (t * -e().getC3() / n2);
1422 template <
typename E>
1425 return (t * -e().getC4() / n2);
1429 template <
typename Q,
typename V>
1438 template <
typename Q,
typename V>
1446 template <
typename E1,
typename E2>
1455 ValueType t1 = e1().getC1() * e1().getC1() + e1().getC2() * e1().getC2() - e1().getC3() * e1().getC3() - e1().getC4() * e1().getC4();
1456 ValueType t2 =
ValueType(2) * (e1().getC2() * e1().getC3() - e1().getC1() * e1().getC4());
1457 ValueType t3 =
ValueType(2) * (e1().getC2() * e1().getC4() + e1().getC1() * e1().getC3());
1459 return (t1 * e2()(0) + t2 * e2()(1) + t3 * e2()(2));
1464 ValueType t1 =
ValueType(2) * (e1().getC2() * e1().getC3() + e1().getC1() * e1().getC4());
1465 ValueType t2 = e1().getC1() * e1().getC1() - e1().getC2() * e1().getC2() + e1().getC3() * e1().getC3() - e1().getC4() * e1().getC4();
1466 ValueType t3 =
ValueType(2) * (e1().getC3() * e1().getC4() - e1().getC1() * e1().getC2());
1468 return (t1 * e2()(0) + t2 * e2()(1) + t3 * e2()(2));
1473 ValueType t1 =
ValueType(2) * (e1().getC2() * e1().getC4() - e1().getC1() * e1().getC3());
1474 ValueType t2 =
ValueType(2) * (e1().getC3() * e1().getC4() + e1().getC1() * e1().getC2());
1475 ValueType t3 = e1().getC1() * e1().getC1() - e1().getC2() * e1().getC2() - e1().getC3() * e1().getC3() + e1().getC4() * e1().getC4();
1477 return (t1 * e2()(0) + t2 * e2()(1) + t3 * e2()(2));
1486 template <
typename G1,
typename G2>
1495 template <
typename G1,
typename G2>
1514 for (
SizeType i = 0, size1 = e1().getSize1(); i < size1; i++)
1515 for (
SizeType j = 0, size2 = e1().getSize2(); j < size2; j++)
1516 for (
SizeType k = 0, size3 = e1().getSize3(); k < size3; k++)
1524 template <
typename G1,
typename G2,
typename T>
1534 template <
typename G1,
typename G2,
typename T>
1556 ComparisonType norm_inf_max(epsilon);
1558 for (
SizeType i = 0, size1 = e1().getSize1(); i < size1; i++)
1559 for (
SizeType j = 0, size2 = e1().getSize2(); j < size2; j++)
1560 for (
SizeType k = 0, size3 = e1().getSize3(); k < size3; k++)
1568 template <
typename M>
1575 template <
typename G>
1583 typedef typename G::SizeType SizeType;
1586 SizeType size1 = e().getSize1();
1587 SizeType size2 = e().getSize2();
1588 SizeType size3 = e().getSize3();
1590 for (SizeType i = 0; i < size1; i++)
1591 for (SizeType j = 0; j < size2; j++)
1592 for (SizeType k = 0; k < size3; k++)
1593 res += e()(i, j, k);
Definition of exception classes.
Definition of various preprocessor macros for error checking.
#define CDPL_MATH_CHECK(expr, msg, e)
Definition: Check.hpp:36
#define CDPL_MATH_CHECK_SIZE_EQUALITY(size1, size2, e)
Definition: Check.hpp:62
Definition of type traits.
Thrown to indicate that the size of a (multidimensional) array is not correct.
Definition: Base/Exceptions.hpp:133
Definition: Expression.hpp:120
Definition: Expression.hpp:76
Definition: Expression.hpp:98
Definition: Expression.hpp:54
constexpr unsigned int T
Specifies Hydrogen (Tritium).
Definition: AtomType.hpp:67
QuaternionNorm< E >::ResultType norm(const QuaternionExpression< E > &e)
Definition: QuaternionExpression.hpp:797
The namespace of the Chemical Data Processing Library.
Definition: CommonType.hpp:41
std::common_type< T1, T2 >::type Type
Definition: CommonType.hpp:43
Definition: Functional.hpp:801
VectorScalarUnaryFunctor< V >::SizeType SizeType
Definition: Functional.hpp:804
static ResultType apply(const VectorExpression< E > &e, SizeType i, SizeType j)
Definition: Functional.hpp:807
VectorScalarUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:803
Definition: Functional.hpp:784
VectorScalarUnaryFunctor< V >::SizeType SizeType
Definition: Functional.hpp:787
static ResultType apply(const VectorExpression< E > &e, SizeType i, SizeType j)
Definition: Functional.hpp:790
VectorScalarUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:786
Definition: Functional.hpp:1488
CommonType< typename G1::SizeType, typename G2::SizeType >::Type SizeType
Definition: Functional.hpp:1491
bool ResultType
Definition: Functional.hpp:1490
CommonType< typename G1::ValueType, typename G2::ValueType >::Type ValueType
Definition: Functional.hpp:1492
Definition: Functional.hpp:1577
GridScalarUnaryFunctor< G >::ResultType ResultType
Definition: Functional.hpp:1579
static ResultType apply(const GridExpression< G > &e)
Definition: Functional.hpp:1581
Definition: Functional.hpp:1497
static ResultType apply(const GridExpression< G1 > &e1, const GridExpression< G2 > &e2)
Definition: Functional.hpp:1503
GridBooleanBinaryFunctor< G1, G2 >::ResultType ResultType
Definition: Functional.hpp:1501
GridBooleanBinaryFunctor< G1, G2 >::SizeType SizeType
Definition: Functional.hpp:1499
GridBooleanBinaryFunctor< G1, G2 >::ValueType ValueType
Definition: Functional.hpp:1500
Definition: Functional.hpp:1570
M::ValueType ResultType
Definition: Functional.hpp:1572
Definition: Functional.hpp:1536
Scalar3GridBooleanTernaryFunctor< G1, G2, T >::ValueType ValueType
Definition: Functional.hpp:1539
Scalar3GridBooleanTernaryFunctor< G1, G2, T >::ResultType ResultType
Definition: Functional.hpp:1540
Scalar3GridBooleanTernaryFunctor< G1, G2, T >::SizeType SizeType
Definition: Functional.hpp:1538
Scalar3GridBooleanTernaryFunctor< G1, G2, T >::Argument3Type Argument3Type
Definition: Functional.hpp:1541
static ResultType apply(const GridExpression< G1 > &e1, const GridExpression< G2 > &e2, Argument3Type epsilon)
Definition: Functional.hpp:1543
Definition: Functional.hpp:914
ValueType ResultType
Definition: Functional.hpp:918
CommonType< typename M1::ValueType, typename M2::ValueType >::Type ValueType
Definition: Functional.hpp:916
CommonType< typename M1::SizeType, typename M2::SizeType >::Type SizeType
Definition: Functional.hpp:917
Definition: Functional.hpp:556
CommonType< typename M1::SizeType, typename M2::SizeType >::Type SizeType
Definition: Functional.hpp:559
CommonType< typename M1::ValueType, typename M2::ValueType >::Type ValueType
Definition: Functional.hpp:560
bool ResultType
Definition: Functional.hpp:558
Definition: Functional.hpp:637
MatrixScalarUnaryFunctor< M >::ResultType ResultType
Definition: Functional.hpp:639
static ResultType apply(const MatrixExpression< M > &e)
Definition: Functional.hpp:641
Definition: Functional.hpp:565
MatrixBooleanBinaryFunctor< M1, M2 >::SizeType SizeType
Definition: Functional.hpp:567
MatrixBooleanBinaryFunctor< M1, M2 >::ResultType ResultType
Definition: Functional.hpp:569
static ResultType apply(const MatrixExpression< M1 > &e1, const MatrixExpression< M2 > &e2)
Definition: Functional.hpp:571
MatrixBooleanBinaryFunctor< M1, M2 >::ValueType ValueType
Definition: Functional.hpp:568
Definition: Functional.hpp:688
MatrixScalarRealUnaryFunctor< M >::ResultType ResultType
Definition: Functional.hpp:692
MatrixScalarRealUnaryFunctor< M >::RealType RealType
Definition: Functional.hpp:691
MatrixScalarRealUnaryFunctor< M >::ValueType ValueType
Definition: Functional.hpp:690
static ResultType apply(const MatrixExpression< M > &e)
Definition: Functional.hpp:694
Definition: Functional.hpp:718
static ResultType apply(const MatrixExpression< M > &e)
Definition: Functional.hpp:724
MatrixScalarRealUnaryFunctor< M >::ResultType ResultType
Definition: Functional.hpp:722
MatrixScalarRealUnaryFunctor< M >::RealType RealType
Definition: Functional.hpp:721
MatrixScalarRealUnaryFunctor< M >::ValueType ValueType
Definition: Functional.hpp:720
Definition: Functional.hpp:746
static ResultType apply(const MatrixExpression< M > &e)
Definition: Functional.hpp:752
MatrixScalarRealUnaryFunctor< M >::ResultType ResultType
Definition: Functional.hpp:750
MatrixScalarRealUnaryFunctor< M >::ValueType ValueType
Definition: Functional.hpp:748
MatrixScalarRealUnaryFunctor< M >::RealType RealType
Definition: Functional.hpp:749
Definition: Functional.hpp:923
MatrixVectorBinaryFunctor< M1, M2 >::ValueType ValueType
Definition: Functional.hpp:925
MatrixVectorBinaryFunctor< M1, M2 >::SizeType SizeType
Definition: Functional.hpp:926
MatrixVectorBinaryFunctor< M1, M2 >::ResultType ResultType
Definition: Functional.hpp:927
static ResultType apply(const MatrixExpression< E1 > &e1, const MatrixExpression< E2 > &e2, SizeType i, SizeType j)
Definition: Functional.hpp:930
Definition: Functional.hpp:679
M::ValueType ValueType
Definition: Functional.hpp:681
RealType ResultType
Definition: Functional.hpp:683
TypeTraits< ValueType >::RealType RealType
Definition: Functional.hpp:682
Definition: Functional.hpp:630
M::ValueType ResultType
Definition: Functional.hpp:632
Definition: Functional.hpp:600
static ResultType apply(const MatrixExpression< M1 > &e1, const MatrixExpression< M2 > &e2, Argument3Type epsilon)
Definition: Functional.hpp:607
Scalar3MatrixBooleanTernaryFunctor< M1, M2, T >::ValueType ValueType
Definition: Functional.hpp:603
Scalar3MatrixBooleanTernaryFunctor< M1, M2, T >::Argument3Type Argument3Type
Definition: Functional.hpp:605
Scalar3MatrixBooleanTernaryFunctor< M1, M2, T >::ResultType ResultType
Definition: Functional.hpp:604
Scalar3MatrixBooleanTernaryFunctor< M1, M2, T >::SizeType SizeType
Definition: Functional.hpp:602
Definition: Functional.hpp:659
MatrixScalarUnaryFunctor< M >::ResultType ResultType
Definition: Functional.hpp:661
static ResultType apply(const MatrixExpression< M > &e)
Definition: Functional.hpp:663
Definition: Functional.hpp:863
ValueType ResultType
Definition: Functional.hpp:867
CommonType< typename M::ValueType, typename V::ValueType >::Type ValueType
Definition: Functional.hpp:865
CommonType< typename M::SizeType, typename V::SizeType >::Type SizeType
Definition: Functional.hpp:866
Definition: Functional.hpp:872
MatrixVectorBinaryFunctor< M, V >::ValueType ValueType
Definition: Functional.hpp:874
MatrixVectorBinaryFunctor< M, V >::ResultType ResultType
Definition: Functional.hpp:876
MatrixVectorBinaryFunctor< M, V >::SizeType SizeType
Definition: Functional.hpp:875
static ResultType apply(const MatrixExpression< E1 > &e1, const VectorExpression< E2 > &e2, SizeType i)
Definition: Functional.hpp:879
Definition: Functional.hpp:1303
CommonType< typename Q1::ValueType, typename Q2::ValueType >::Type ResultType
Definition: Functional.hpp:1305
Definition: Functional.hpp:944
CommonType< typename Q1::ValueType, typename Q2::ValueType >::Type ValueType
Definition: Functional.hpp:947
bool ResultType
Definition: Functional.hpp:946
Definition: Functional.hpp:1096
static ResultType applyC4(const QuaternionExpression< E > &e)
Definition: Functional.hpp:1119
static ResultType applyC2(const QuaternionExpression< E > &e)
Definition: Functional.hpp:1107
static ResultType applyC3(const QuaternionExpression< E > &e)
Definition: Functional.hpp:1113
static ResultType applyC1(const QuaternionExpression< E > &e)
Definition: Functional.hpp:1101
QuaternionUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1098
Definition: Functional.hpp:1353
static ResultType applyC3(const QuaternionExpression< E1 > &e1, const QuaternionExpression< E2 > &e2, Argument3Type n2)
Definition: Functional.hpp:1373
static ResultType applyC1(const QuaternionExpression< E1 > &e1, const QuaternionExpression< E2 > &e2, Argument3Type n2)
Definition: Functional.hpp:1359
Scalar3QuaternionTernaryFunctor< Q1, Q2, T >::ResultType ResultType
Definition: Functional.hpp:1356
static ResultType applyC4(const QuaternionExpression< E1 > &e1, const QuaternionExpression< E2 > &e2, Argument3Type n2)
Definition: Functional.hpp:1380
static ResultType applyC2(const QuaternionExpression< E1 > &e1, const QuaternionExpression< E2 > &e2, Argument3Type n2)
Definition: Functional.hpp:1366
Scalar3QuaternionTernaryFunctor< Q1, Q2, T >::Argument3Type Argument3Type
Definition: Functional.hpp:1355
Definition: Functional.hpp:999
QuaternionScalarUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1001
static ResultType apply(const QuaternionExpression< Q > &e)
Definition: Functional.hpp:1003
Definition: Functional.hpp:952
static ResultType apply(const QuaternionExpression< Q1 > &e1, const QuaternionExpression< Q2 > &e2)
Definition: Functional.hpp:957
QuaternionBooleanBinaryFunctor< Q1, Q2 >::ResultType ResultType
Definition: Functional.hpp:955
QuaternionBooleanBinaryFunctor< Q1, Q2 >::ValueType ValueType
Definition: Functional.hpp:954
Definition: Functional.hpp:1271
static ResultType applyC3(const QuaternionExpression< E > &e, Argument2Type n2)
Definition: Functional.hpp:1289
Scalar2QuaternionBinaryFunctor< Q, T >::ResultType ResultType
Definition: Functional.hpp:1274
static ResultType applyC1(const QuaternionExpression< E > &e, Argument2Type n2)
Definition: Functional.hpp:1277
Scalar2QuaternionBinaryFunctor< Q, T >::Argument2Type Argument2Type
Definition: Functional.hpp:1273
static ResultType applyC2(const QuaternionExpression< E > &e, Argument2Type n2)
Definition: Functional.hpp:1283
static ResultType applyC4(const QuaternionExpression< E > &e, Argument2Type n2)
Definition: Functional.hpp:1295
Definition: Functional.hpp:1039
QuaternionScalarRealUnaryFunctor< Q >::RealType RealType
Definition: Functional.hpp:1042
static ResultType apply(const QuaternionExpression< Q > &e)
Definition: Functional.hpp:1045
QuaternionScalarRealUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1043
QuaternionScalarRealUnaryFunctor< Q >::ValueType ValueType
Definition: Functional.hpp:1041
Definition: Functional.hpp:1020
QuaternionScalarRealUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1024
static ResultType apply(const QuaternionExpression< Q > &e)
Definition: Functional.hpp:1026
QuaternionScalarRealUnaryFunctor< Q >::ValueType ValueType
Definition: Functional.hpp:1022
QuaternionScalarRealUnaryFunctor< Q >::RealType RealType
Definition: Functional.hpp:1023
Definition: Functional.hpp:1310
QuaternionBinaryFunctor< Q1, Q2 >::ResultType ResultType
Definition: Functional.hpp:1312
static ResultType applyC3(const QuaternionExpression< E1 > &e1, const QuaternionExpression< E2 > &e2)
Definition: Functional.hpp:1329
static ResultType applyC2(const QuaternionExpression< E1 > &e1, const QuaternionExpression< E2 > &e2)
Definition: Functional.hpp:1322
static ResultType applyC4(const QuaternionExpression< E1 > &e1, const QuaternionExpression< E2 > &e2)
Definition: Functional.hpp:1336
static ResultType applyC1(const QuaternionExpression< E1 > &e1, const QuaternionExpression< E2 > &e2)
Definition: Functional.hpp:1315
Definition: Functional.hpp:1011
RealType ResultType
Definition: Functional.hpp:1015
Q::ValueType ValueType
Definition: Functional.hpp:1013
ValueType RealType
Definition: Functional.hpp:1014
Definition: Functional.hpp:992
Q::ValueType ResultType
Definition: Functional.hpp:994
Definition: Functional.hpp:974
Scalar3QuaternionBooleanTernaryFunctor< Q1, Q2, T >::Argument3Type Argument3Type
Definition: Functional.hpp:978
Scalar3QuaternionBooleanTernaryFunctor< Q1, Q2, T >::ValueType ValueType
Definition: Functional.hpp:976
Scalar3QuaternionBooleanTernaryFunctor< Q1, Q2, T >::ResultType ResultType
Definition: Functional.hpp:977
static ResultType apply(const QuaternionExpression< Q1 > &e1, const QuaternionExpression< Q2 > &e2, Argument3Type epsilon)
Definition: Functional.hpp:980
Definition: Functional.hpp:1058
Q::ValueType ResultType
Definition: Functional.hpp:1060
Definition: Functional.hpp:1065
QuaternionUnaryFunctor< Q >::ResultType ResultType
Definition: Functional.hpp:1067
static ResultType applyC1(const QuaternionExpression< E > &e)
Definition: Functional.hpp:1070
static ResultType applyC2(const QuaternionExpression< E > &e)
Definition: Functional.hpp:1076
static ResultType applyC3(const QuaternionExpression< E > &e)
Definition: Functional.hpp:1082
static ResultType applyC4(const QuaternionExpression< E > &e)
Definition: Functional.hpp:1088
Definition: Functional.hpp:1431
ValueType ResultType
Definition: Functional.hpp:1435
V::SizeType SizeType
Definition: Functional.hpp:1434
CommonType< typename Q::ValueType, typename V::ValueType >::Type ValueType
Definition: Functional.hpp:1433
Definition: Functional.hpp:1440
QuaternionVectorBinaryFunctor< Q, V >::SizeType SizeType
Definition: Functional.hpp:1443
QuaternionVectorBinaryFunctor< Q, V >::ResultType ResultType
Definition: Functional.hpp:1444
QuaternionVectorBinaryFunctor< Q, V >::ValueType ValueType
Definition: Functional.hpp:1442
static ResultType apply(const QuaternionExpression< E1 > &e1, const VectorExpression< E2 > &e2, SizeType i)
Definition: Functional.hpp:1447
Definition: Functional.hpp:1389
const T1 & Argument1Type
Definition: Functional.hpp:1392
const T2 & Argument3Type
Definition: Functional.hpp:1393
CommonType< typename CommonType< T1, typename Q::ValueType >::Type, T2 >::Type ResultType
Definition: Functional.hpp:1391
Definition: Functional.hpp:1135
static ResultType applyC4(Argument1Type, const QuaternionExpression< E > &e)
Definition: Functional.hpp:1159
static ResultType applyC1(Argument1Type t, const QuaternionExpression< E > &e)
Definition: Functional.hpp:1141
Scalar1QuaternionBinaryFunctor< T, Q >::Argument1Type Argument1Type
Definition: Functional.hpp:1137
static ResultType applyC3(Argument1Type, const QuaternionExpression< E > &e)
Definition: Functional.hpp:1153
static ResultType applyC2(Argument1Type, const QuaternionExpression< E > &e)
Definition: Functional.hpp:1147
Scalar1QuaternionBinaryFunctor< T, Q >::ResultType ResultType
Definition: Functional.hpp:1138
Definition: Functional.hpp:1127
CommonType< T, typename Q::ValueType >::Type ResultType
Definition: Functional.hpp:1129
const T & Argument1Type
Definition: Functional.hpp:1130
Definition: Functional.hpp:1167
Scalar1QuaternionBinaryFunctor< T, Q >::Argument1Type Argument1Type
Definition: Functional.hpp:1169
Scalar1QuaternionBinaryFunctor< T, Q >::ResultType ResultType
Definition: Functional.hpp:1170
static ResultType applyC2(Argument1Type, const QuaternionExpression< E > &e)
Definition: Functional.hpp:1179
static ResultType applyC3(Argument1Type, const QuaternionExpression< E > &e)
Definition: Functional.hpp:1185
static ResultType applyC1(Argument1Type t, const QuaternionExpression< E > &e)
Definition: Functional.hpp:1173
static ResultType applyC4(Argument1Type, const QuaternionExpression< E > &e)
Definition: Functional.hpp:1191
Definition: Functional.hpp:1207
static ResultType applyC4(const QuaternionExpression< E > &e, Argument2Type)
Definition: Functional.hpp:1231
static ResultType applyC3(const QuaternionExpression< E > &e, Argument2Type)
Definition: Functional.hpp:1225
Scalar2QuaternionBinaryFunctor< Q, T >::Argument2Type Argument2Type
Definition: Functional.hpp:1209
Scalar2QuaternionBinaryFunctor< Q, T >::ResultType ResultType
Definition: Functional.hpp:1210
static ResultType applyC1(const QuaternionExpression< E > &e, Argument2Type t)
Definition: Functional.hpp:1213
static ResultType applyC2(const QuaternionExpression< E > &e, Argument2Type)
Definition: Functional.hpp:1219
Definition: Functional.hpp:1199
CommonType< typename Q::ValueType, T >::Type ResultType
Definition: Functional.hpp:1201
const T & Argument2Type
Definition: Functional.hpp:1202
Definition: Functional.hpp:1239
static ResultType applyC2(const QuaternionExpression< E > &e, Argument2Type)
Definition: Functional.hpp:1251
static ResultType applyC1(const QuaternionExpression< E > &e, Argument2Type t)
Definition: Functional.hpp:1245
static ResultType applyC4(const QuaternionExpression< E > &e, Argument2Type)
Definition: Functional.hpp:1263
Scalar2QuaternionBinaryFunctor< Q, T >::ResultType ResultType
Definition: Functional.hpp:1242
static ResultType applyC3(const QuaternionExpression< E > &e, Argument2Type)
Definition: Functional.hpp:1257
Scalar2QuaternionBinaryFunctor< Q, T >::Argument2Type Argument2Type
Definition: Functional.hpp:1241
Definition: Functional.hpp:1526
bool ResultType
Definition: Functional.hpp:1528
const T & Argument3Type
Definition: Functional.hpp:1529
CommonType< typename G1::ValueType, typename G2::ValueType >::Type ValueType
Definition: Functional.hpp:1531
CommonType< typename G1::SizeType, typename G2::SizeType >::Type SizeType
Definition: Functional.hpp:1530
Definition: Functional.hpp:590
CommonType< typename M1::ValueType, typename M2::ValueType >::Type ValueType
Definition: Functional.hpp:595
CommonType< typename M1::SizeType, typename M2::SizeType >::Type SizeType
Definition: Functional.hpp:594
const T & Argument3Type
Definition: Functional.hpp:593
bool ResultType
Definition: Functional.hpp:592
Definition: Functional.hpp:965
CommonType< typename Q1::ValueType, typename Q2::ValueType >::Type ValueType
Definition: Functional.hpp:969
const T & Argument3Type
Definition: Functional.hpp:968
bool ResultType
Definition: Functional.hpp:967
Definition: Functional.hpp:1345
CommonType< typename CommonType< typename Q1::ValueType, typename Q2::ValueType >::Type, T >::Type ResultType
Definition: Functional.hpp:1347
const T & Argument3Type
Definition: Functional.hpp:1348
Definition: Functional.hpp:341
bool ResultType
Definition: Functional.hpp:343
const T & Argument3Type
Definition: Functional.hpp:344
CommonType< typename V1::ValueType, typename V2::ValueType >::Type ValueType
Definition: Functional.hpp:346
CommonType< typename V1::SizeType, typename V2::SizeType >::Type SizeType
Definition: Functional.hpp:345
Definition: Functional.hpp:76
static void apply(Argument1Type t1, Argument2Type t2)
Definition: Functional.hpp:81
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument2Type Argument2Type
Definition: Functional.hpp:79
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:78
Definition: Functional.hpp:211
ScalarBinaryFunctor< T1, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:213
static ResultType apply(Argument1Type t1, Argument2Type t2)
Definition: Functional.hpp:217
ScalarBinaryFunctor< T1, T2 >::Argument2Type Argument2Type
Definition: Functional.hpp:214
ScalarBinaryFunctor< T1, T2 >::ResultType ResultType
Definition: Functional.hpp:215
Definition: Functional.hpp:63
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument2Type Argument2Type
Definition: Functional.hpp:66
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:65
static void apply(Argument1Type t1, Argument2Type t2)
Definition: Functional.hpp:68
Definition: Functional.hpp:55
const T2 & Argument2Type
Definition: Functional.hpp:58
T1 Argument1Type
Definition: Functional.hpp:57
Definition: Functional.hpp:202
const T2 & Argument2Type
Definition: Functional.hpp:205
const T1 & Argument1Type
Definition: Functional.hpp:204
CommonType< T1, T2 >::Type ResultType
Definition: Functional.hpp:206
Definition: Functional.hpp:151
ScalarUnaryFunctor< T >::ArgumentType ArgumentType
Definition: Functional.hpp:154
static ResultType apply(ArgumentType v)
Definition: Functional.hpp:157
ScalarUnaryFunctor< T >::ResultType ResultType
Definition: Functional.hpp:155
ScalarUnaryFunctor< T >::ValueType ValueType
Definition: Functional.hpp:153
Definition: Functional.hpp:115
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:117
static void apply(Argument1Type t1, Argument2Type t2)
Definition: Functional.hpp:120
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument2Type Argument2Type
Definition: Functional.hpp:118
Definition: Functional.hpp:253
ScalarBinaryFunctor< T1, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:255
static ResultType apply(Argument1Type t1, Argument2Type t2)
Definition: Functional.hpp:259
ScalarBinaryFunctor< T1, T2 >::Argument2Type Argument2Type
Definition: Functional.hpp:256
ScalarBinaryFunctor< T1, T2 >::ResultType ResultType
Definition: Functional.hpp:257
Definition: Functional.hpp:188
ScalarUnaryFunctor< T >::ResultType ResultType
Definition: Functional.hpp:192
static ResultType apply(ArgumentType v)
Definition: Functional.hpp:194
ScalarUnaryFunctor< T >::ValueType ValueType
Definition: Functional.hpp:190
ScalarUnaryFunctor< T >::ArgumentType ArgumentType
Definition: Functional.hpp:191
Definition: Functional.hpp:102
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:104
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument2Type Argument2Type
Definition: Functional.hpp:105
static void apply(Argument1Type t1, Argument2Type t2)
Definition: Functional.hpp:107
Definition: Functional.hpp:239
ScalarBinaryFunctor< T1, T2 >::Argument2Type Argument2Type
Definition: Functional.hpp:242
ScalarBinaryFunctor< T1, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:241
static ResultType apply(Argument1Type t1, Argument2Type t2)
Definition: Functional.hpp:245
ScalarBinaryFunctor< T1, T2 >::ResultType ResultType
Definition: Functional.hpp:243
Definition: Functional.hpp:137
ScalarUnaryFunctor< T >::ValueType ValueType
Definition: Functional.hpp:139
ScalarUnaryFunctor< T >::ResultType ResultType
Definition: Functional.hpp:141
static ResultType apply(ArgumentType v)
Definition: Functional.hpp:143
ScalarUnaryFunctor< T >::ArgumentType ArgumentType
Definition: Functional.hpp:140
Definition: Functional.hpp:1398
static ResultType applyC1(Argument1Type t, const QuaternionExpression< E > &e, Argument3Type n2)
Definition: Functional.hpp:1405
static ResultType applyC4(Argument1Type t, const QuaternionExpression< E > &e, Argument3Type n2)
Definition: Functional.hpp:1423
static ResultType applyC2(Argument1Type t, const QuaternionExpression< E > &e, Argument3Type n2)
Definition: Functional.hpp:1411
Scalar13QuaternionTernaryFunctor< T1, Q, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:1400
Scalar13QuaternionTernaryFunctor< T1, Q, T2 >::ResultType ResultType
Definition: Functional.hpp:1402
static ResultType applyC3(Argument1Type t, const QuaternionExpression< E > &e, Argument3Type n2)
Definition: Functional.hpp:1417
Scalar13QuaternionTernaryFunctor< T1, Q, T2 >::Argument3Type Argument3Type
Definition: Functional.hpp:1401
Definition: Functional.hpp:165
TypeTraits< T >::RealType ResultType
Definition: Functional.hpp:169
const T & ArgumentType
Definition: Functional.hpp:168
T ValueType
Definition: Functional.hpp:167
Definition: Functional.hpp:174
ScalarUnaryFunctor< T >::ArgumentType ArgumentType
Definition: Functional.hpp:177
ScalarUnaryFunctor< T >::ValueType ValueType
Definition: Functional.hpp:176
static ResultType apply(ArgumentType v)
Definition: Functional.hpp:180
ScalarUnaryFunctor< T >::ResultType ResultType
Definition: Functional.hpp:178
Definition: Functional.hpp:89
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument2Type Argument2Type
Definition: Functional.hpp:92
static void apply(Argument1Type t1, Argument2Type t2)
Definition: Functional.hpp:94
ScalarBinaryAssignmentFunctor< T1, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:91
Definition: Functional.hpp:225
ScalarBinaryFunctor< T1, T2 >::ResultType ResultType
Definition: Functional.hpp:229
ScalarBinaryFunctor< T1, T2 >::Argument2Type Argument2Type
Definition: Functional.hpp:228
ScalarBinaryFunctor< T1, T2 >::Argument1Type Argument1Type
Definition: Functional.hpp:227
static ResultType apply(Argument1Type t1, Argument2Type t2)
Definition: Functional.hpp:231
static RealType real(ConstReference t)
Definition: TypeTraits.hpp:74
static RealType conj(ConstReference t)
Definition: TypeTraits.hpp:84
static RealType normInf(ConstReference t)
Definition: TypeTraits.hpp:109
static RealType imag(ConstReference)
Definition: TypeTraits.hpp:79
static ValueType sqrt(ConstReference t)
Definition: TypeTraits.hpp:94
static RealType norm2(ConstReference t)
Definition: TypeTraits.hpp:104
T RealType
Definition: TypeTraits.hpp:70
Definition: Functional.hpp:128
T ValueType
Definition: Functional.hpp:130
const T & ArgumentType
Definition: Functional.hpp:131
ValueType ResultType
Definition: Functional.hpp:132
Definition: TypeTraits.hpp:171
Definition: Functional.hpp:294
static ResultType apply(const VectorExpression< V1 > &e1, const VectorExpression< V2 > &e2, const T &sd, bool clamp)
Definition: Functional.hpp:298
CommonType< typename VectorInnerProduct< V1, V2 >::ResultType, T >::Type ResultType
Definition: Functional.hpp:296
Definition: Functional.hpp:377
CommonType< typename V1::ValueType, typename V2::ValueType >::Type ResultType
Definition: Functional.hpp:379
Definition: Functional.hpp:311
CommonType< typename V1::ValueType, typename V2::ValueType >::Type ValueType
Definition: Functional.hpp:315
bool ResultType
Definition: Functional.hpp:313
CommonType< typename V1::SizeType, typename V2::SizeType >::Type SizeType
Definition: Functional.hpp:314
Definition: Functional.hpp:384
static ResultType apply(const VectorExpression< E1 > &e1, const VectorExpression< E2 > &e2, SizeType i)
Definition: Functional.hpp:389
VectorScalarBinaryFunctor< V1, V2 >::ResultType ResultType
Definition: Functional.hpp:386
Definition: Functional.hpp:421
VectorScalarUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:423
static ResultType apply(const VectorExpression< V > &e)
Definition: Functional.hpp:425
Definition: Functional.hpp:320
VectorBooleanBinaryFunctor< V1, V2 >::ValueType ValueType
Definition: Functional.hpp:323
VectorBooleanBinaryFunctor< V1, V2 >::SizeType SizeType
Definition: Functional.hpp:322
VectorBooleanBinaryFunctor< V1, V2 >::ResultType ResultType
Definition: Functional.hpp:324
static ResultType apply(const VectorExpression< V1 > &e1, const VectorExpression< V2 > &e2)
Definition: Functional.hpp:326
Definition: Functional.hpp:274
VectorScalarBinaryFunctor< V1, V2 >::ResultType ResultType
Definition: Functional.hpp:276
static ResultType apply(const VectorExpression< V1 > &e1, const VectorExpression< V2 > &e2)
Definition: Functional.hpp:278
Definition: Functional.hpp:893
MatrixVectorBinaryFunctor< M, V >::ResultType ResultType
Definition: Functional.hpp:897
MatrixVectorBinaryFunctor< M, V >::SizeType SizeType
Definition: Functional.hpp:896
static ResultType apply(const VectorExpression< E1 > &e1, const MatrixExpression< E2 > &e2, SizeType i)
Definition: Functional.hpp:900
MatrixVectorBinaryFunctor< M, V >::ValueType ValueType
Definition: Functional.hpp:895
Definition: Functional.hpp:776
V::ValueType ResultType
Definition: Functional.hpp:778
V::SizeType SizeType
Definition: Functional.hpp:779
Definition: Functional.hpp:449
static ResultType apply(const VectorExpression< V > &e)
Definition: Functional.hpp:455
VectorScalarRealUnaryFunctor< V >::RealType RealType
Definition: Functional.hpp:452
VectorScalarRealUnaryFunctor< V >::ValueType ValueType
Definition: Functional.hpp:451
VectorScalarRealUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:453
Definition: Functional.hpp:470
VectorScalarRealUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:474
VectorScalarRealUnaryFunctor< V >::RealType RealType
Definition: Functional.hpp:473
static ResultType apply(const VectorExpression< V > &e)
Definition: Functional.hpp:476
VectorScalarRealUnaryFunctor< V >::ValueType ValueType
Definition: Functional.hpp:472
Definition: Functional.hpp:528
VectorScalarIndexUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:532
VectorScalarIndexUnaryFunctor< V >::ValueType ValueType
Definition: Functional.hpp:530
VectorScalarIndexUnaryFunctor< V >::RealType RealType
Definition: Functional.hpp:531
static ResultType apply(const VectorExpression< V > &e)
Definition: Functional.hpp:534
Definition: Functional.hpp:494
static ResultType apply(const VectorExpression< V > &e)
Definition: Functional.hpp:500
VectorScalarRealUnaryFunctor< V >::ValueType ValueType
Definition: Functional.hpp:496
VectorScalarRealUnaryFunctor< V >::RealType RealType
Definition: Functional.hpp:497
VectorScalarRealUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:498
Definition: Functional.hpp:267
CommonType< typename V1::ValueType, typename V2::ValueType >::Type ResultType
Definition: Functional.hpp:269
Definition: Functional.hpp:519
TypeTraits< ValueType >::RealType RealType
Definition: Functional.hpp:522
V::ValueType ValueType
Definition: Functional.hpp:521
V::SizeType ResultType
Definition: Functional.hpp:523
Definition: Functional.hpp:440
RealType ResultType
Definition: Functional.hpp:444
TypeTraits< ValueType >::RealType RealType
Definition: Functional.hpp:443
V::ValueType ValueType
Definition: Functional.hpp:442
Definition: Functional.hpp:413
V::ValueType ResultType
Definition: Functional.hpp:415
V::SizeType SizeType
Definition: Functional.hpp:416
Definition: Functional.hpp:351
Scalar3VectorBooleanTernaryFunctor< V1, V2, T >::ValueType ValueType
Definition: Functional.hpp:354
Scalar3VectorBooleanTernaryFunctor< V1, V2, T >::SizeType SizeType
Definition: Functional.hpp:353
Scalar3VectorBooleanTernaryFunctor< V1, V2, T >::Argument3Type Argument3Type
Definition: Functional.hpp:356
Scalar3VectorBooleanTernaryFunctor< V1, V2, T >::ResultType ResultType
Definition: Functional.hpp:355
static ResultType apply(const VectorExpression< V1 > &e1, const VectorExpression< V2 > &e2, Argument3Type epsilon)
Definition: Functional.hpp:358