27 #ifndef CDPL_MATH_VECTOREXPRESSION_HPP
28 #define CDPL_MATH_VECTOREXPRESSION_HPP
30 #include <type_traits>
51 template <
typename E,
typename F>
56 typedef F FunctorType;
58 typedef typename E::ConstClosureType ExpressionClosureType;
109 return expr.getSize();
119 return FunctorType::apply(expr(i));
129 return FunctorType::apply(expr[i]);
133 ExpressionClosureType expr;
141 template <
typename E,
typename F>
162 template <
typename E1,
typename E2,
typename F>
167 typedef F FunctorType;
168 typedef E1 Expression1Type;
169 typedef E2 Expression2Type;
170 typedef typename E1::ConstClosureType Expression1ClosureType;
171 typedef typename E2::ConstClosureType Expression2ClosureType;
215 expr1(e1), expr2(e2) {}
234 return FunctorType::apply(expr1(i), expr2(i));
244 return FunctorType::apply(expr1[i], expr2[i]);
248 Expression1ClosureType expr1;
249 Expression2ClosureType expr2;
258 template <
typename E1,
typename E2,
typename F>
284 template <
typename E1,
typename E2,
typename F>
289 typedef F FunctorType;
290 typedef E1 Expression1Type;
291 typedef E2 Expression2Type;
292 typedef typename E1::ConstClosureType Expression1ClosureType;
293 typedef typename E2::ConstClosureType Expression2ClosureType;
337 expr1(e1), expr2(e2) {}
356 return FunctorType::apply(expr1, expr2, i);
366 return FunctorType::apply(expr1, expr2, i);
370 Expression1ClosureType expr1;
371 Expression2ClosureType expr2;
380 template <
typename E1,
typename E2,
typename F>
401 template <
typename E1,
typename E2,
typename F>
406 typedef F FunctorType;
407 typedef E1 Expression1Type;
408 typedef E2 Expression2Type;
409 typedef const E1 Expression1ClosureType;
410 typedef typename E2::ConstClosureType Expression2ClosureType;
454 expr1(e1), expr2(e2) {}
462 return expr2.getSize();
472 return FunctorType::apply(expr1, expr2(i));
482 return FunctorType::apply(expr1, expr2[i]);
486 Expression1ClosureType expr1;
487 Expression2ClosureType expr2;
496 template <
typename E1,
typename E2,
typename F>
517 template <
typename E1,
typename E2,
typename F>
522 typedef F FunctorType;
523 typedef E1 Expression1Type;
524 typedef E2 Expression2Type;
525 typedef typename E1::ConstClosureType Expression1ClosureType;
526 typedef const E2 Expression2ClosureType;
570 expr1(e1), expr2(e2) {}
578 return expr1.getSize();
588 return FunctorType::apply(expr1(i), expr2);
598 return FunctorType::apply(expr1[i], expr2);
602 Expression1ClosureType expr1;
603 Expression2ClosureType expr2;
612 template <
typename E1,
typename E2,
typename F>
634 template <
typename E1,
typename E2,
typename F>
639 typedef F FunctorType;
640 typedef E1 Expression1Type;
641 typedef E2 Expression2Type;
642 typedef typename E1::ConstClosureType Expression1ClosureType;
643 typedef typename E2::ConstClosureType Expression2ClosureType;
687 expr1(e1), expr2(e2) {}
695 return expr2.getSize();
705 return FunctorType::apply(expr1, expr2, i);
715 return FunctorType::apply(expr1, expr2, i);
719 Expression1ClosureType expr1;
720 Expression2ClosureType expr2;
729 template <
typename E1,
typename E2,
typename F>
750 template <
typename E>
756 return ExpressionType(e());
765 template <
typename E>
780 template <
typename E1,
typename E2>
781 typename VectorBinary1Traits<E1, E2, ScalarAddition<typename E1::ValueType, typename E2::ValueType> >::ResultType
787 return ExpressionType(e1(), e2());
798 template <
typename E1,
typename E2>
799 typename VectorBinary1Traits<E1, E2, ScalarSubtraction<typename E1::ValueType, typename E2::ValueType> >::ResultType
805 return ExpressionType(e1(), e2());
816 template <
typename E,
typename T>
817 typename std::enable_if<IsScalar<T>::value,
typename Scalar2VectorBinaryTraits<E, T, ScalarMultiplication<typename E::ValueType, T> >::ResultType>::type
823 return ExpressionType(e(), t);
834 template <
typename T,
typename E>
835 typename std::enable_if<IsScalar<T>::value,
typename Scalar1VectorBinaryTraits<T, E, ScalarMultiplication<T, typename E::ValueType> >::ResultType>::type
841 return ExpressionType(t, e());
852 template <
typename E,
typename T>
853 typename std::enable_if<IsScalar<T>::value,
typename Scalar2VectorBinaryTraits<E, T, ScalarDivision<typename E::ValueType, T> >::ResultType>::type
859 return ExpressionType(e(), t);
870 template <
typename E1,
typename E2>
885 template <
typename E1,
typename E2>
902 template <
typename E1,
typename E2,
typename T>
915 template <
typename E>
916 typename VectorUnaryTraits<E, ScalarConjugation<typename E::ValueType> >::ResultType
921 return ExpressionType(e());
930 template <
typename E>
931 typename VectorUnaryTraits<E, ScalarConjugation<typename E::ValueType> >::ResultType
936 return ExpressionType(e());
945 template <
typename E>
946 typename VectorUnaryTraits<E, ScalarReal<typename E::ValueType> >::ResultType
951 return ExpressionType(e());
960 template <
typename E>
961 typename VectorUnaryTraits<E, ScalarImaginary<typename E::ValueType> >::ResultType
966 return ExpressionType(e());
977 template <
typename E1,
typename E2>
978 typename VectorBinary1Traits<E1, E2, ScalarDivision<typename E1::ValueType, typename E2::ValueType> >::ResultType
984 return ExpressionType(e1(), e2());
995 template <
typename E1,
typename E2>
996 typename VectorBinary1Traits<E1, E2, ScalarMultiplication<typename E1::ValueType, typename E2::ValueType> >::ResultType
1002 return ExpressionType(e1(), e2());
1013 template <
typename E1,
typename E2>
1014 typename VectorBinary2Traits<E1, E2, VectorCrossProduct<E1, E2> >::ResultType
1020 return ExpressionType(e1(), e2());
1031 template <
typename E1,
typename E2>
1049 template <
typename E1,
typename E2,
typename T>
1062 template <
typename E>
1075 template <
typename E>
1088 template <
typename E>
1101 template <
typename E>
1114 template <
typename E>
1127 template <
typename E>
1140 template <
typename E>
1153 template <
typename E>
1168 template <
typename E1,
typename E2>
1169 typename QuaternionVectorBinaryTraits<E1, E2, QuaternionVectorRotation<E1, E2> >::ResultType
1174 return ExpressionType(e1(), e2());
Definition of exception classes.
Definition of various preprocessor macros for error checking.
#define CDPL_MATH_CHECK_SIZE_EQUALITY(size1, size2, e)
Throws the exception e if size1 differs from size2, otherwise returns std::min(size1,...
Definition: Check.hpp:84
Definition of basic expression types.
Definition of various functors.
Definition of type traits.
Thrown to indicate that the size of a (multidimensional) array is not correct.
Definition: Base/Exceptions.hpp:133
E ExpressionType
The derived expression type.
Definition: Expression.hpp:49
CRTP base class of all quaternion expression types.
Definition: Expression.hpp:148
Expression template node combining a quaternion expression E1 and a vector expression E2 into a vecto...
Definition: VectorExpression.hpp:636
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:669
SizeType getSize() const
Returns the wrapped vector expression's size.
Definition: VectorExpression.hpp:693
ConstReference operator()(SizeType i) const
Invokes the functor with the quaternion expression, the vector expression, and the index i.
Definition: VectorExpression.hpp:703
E2::SizeType SizeType
The size type inherited from the wrapped vector expression.
Definition: VectorExpression.hpp:674
E2::DifferenceType DifferenceType
The signed difference type inherited from the wrapped vector expression.
Definition: VectorExpression.hpp:679
QuaternionVectorBinary(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node combining the quaternion expression e1 and the vector express...
Definition: VectorExpression.hpp:686
const ValueType Reference
Mutable element reference type (degrades to const for expression template results).
Definition: VectorExpression.hpp:659
const ValueType ConstReference
Constant element reference type.
Definition: VectorExpression.hpp:654
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:664
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: VectorExpression.hpp:649
ConstReference operator[](SizeType i) const
Alias for operator() — invokes the functor with both wrapped expressions and the index i.
Definition: VectorExpression.hpp:713
Expression template node combining a scalar E1 (lhs) and a vector expression E2 (rhs) element-wise vi...
Definition: VectorExpression.hpp:403
Scalar1VectorBinary(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node combining the scalar e1 and the vector expression e2.
Definition: VectorExpression.hpp:453
const ValueType ConstReference
Constant element reference type.
Definition: VectorExpression.hpp:421
ConstReference operator[](SizeType i) const
Alias for operator() — applies the binary functor to the scalar and element i of the wrapped expressi...
Definition: VectorExpression.hpp:480
E2::DifferenceType DifferenceType
The signed difference type inherited from the wrapped vector expression.
Definition: VectorExpression.hpp:446
const ValueType Reference
Mutable element reference type (degrades to const for expression template results).
Definition: VectorExpression.hpp:426
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:436
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:431
E2::SizeType SizeType
The size type inherited from the wrapped vector expression.
Definition: VectorExpression.hpp:441
ConstReference operator()(SizeType i) const
Applies the binary functor to the scalar and element i of the wrapped vector expression and returns t...
Definition: VectorExpression.hpp:470
SizeType getSize() const
Returns the wrapped vector expression's size.
Definition: VectorExpression.hpp:460
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: VectorExpression.hpp:416
Expression template node combining a vector expression E1 (lhs) and a scalar E2 (rhs) element-wise vi...
Definition: VectorExpression.hpp:519
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:547
E1::DifferenceType DifferenceType
The signed difference type inherited from the wrapped vector expression.
Definition: VectorExpression.hpp:562
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: VectorExpression.hpp:532
const ValueType ConstReference
Constant element reference type.
Definition: VectorExpression.hpp:537
Scalar2VectorBinary(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node combining the vector expression e1 and the scalar e2.
Definition: VectorExpression.hpp:569
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:552
SizeType getSize() const
Returns the wrapped vector expression's size.
Definition: VectorExpression.hpp:576
ConstReference operator[](SizeType i) const
Alias for operator() — applies the binary functor to element i of the wrapped expression and the scal...
Definition: VectorExpression.hpp:596
E1::SizeType SizeType
The size type inherited from the wrapped vector expression.
Definition: VectorExpression.hpp:557
ConstReference operator()(SizeType i) const
Applies the binary functor to element i of the wrapped vector expression and the scalar and returns t...
Definition: VectorExpression.hpp:586
const ValueType Reference
Mutable element reference type (degrades to const for expression template results).
Definition: VectorExpression.hpp:542
Expression template node combining two vector expressions E1 and E2 element-wise via the binary funct...
Definition: VectorExpression.hpp:164
ConstReference operator()(SizeType i) const
Applies the binary functor element-wise at index i of the two wrapped expressions and returns the res...
Definition: VectorExpression.hpp:232
ConstReference operator[](SizeType i) const
Alias for operator() — applies the binary functor element-wise at index i.
Definition: VectorExpression.hpp:242
const ValueType Reference
Mutable element reference type (degrades to const for expression template results).
Definition: VectorExpression.hpp:187
CommonType< typename E1::DifferenceType, typename E2::DifferenceType >::Type DifferenceType
The common signed difference type of the two wrapped expressions.
Definition: VectorExpression.hpp:207
VectorBinary1(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node wrapping e1 and e2.
Definition: VectorExpression.hpp:214
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: VectorExpression.hpp:177
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:192
SizeType getSize() const
Returns the element count after verifying that both wrapped expressions agree on it.
Definition: VectorExpression.hpp:222
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:197
const ValueType ConstReference
Constant element reference type.
Definition: VectorExpression.hpp:182
CommonType< typename E1::SizeType, typename E2::SizeType >::Type SizeType
The common size type of the two wrapped expressions.
Definition: VectorExpression.hpp:202
Expression template node combining two vector expressions E1 and E2 via a binary functor F invoked wi...
Definition: VectorExpression.hpp:286
SizeType getSize() const
Returns the element count after verifying that both wrapped expressions agree on it.
Definition: VectorExpression.hpp:344
ConstReference operator()(SizeType i) const
Invokes the functor with both wrapped expressions and the index i and returns the result.
Definition: VectorExpression.hpp:354
CommonType< typename E1::SizeType, typename E2::SizeType >::Type SizeType
The common size type of the two wrapped expressions.
Definition: VectorExpression.hpp:324
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: VectorExpression.hpp:299
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:314
const ValueType Reference
Mutable element reference type (degrades to const for expression template results).
Definition: VectorExpression.hpp:309
VectorBinary2(const Expression1Type &e1, const Expression2Type &e2)
Constructs the expression template node wrapping e1 and e2.
Definition: VectorExpression.hpp:336
ConstReference operator[](SizeType i) const
Alias for operator() — invokes the functor with both wrapped expressions and the index i.
Definition: VectorExpression.hpp:364
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:319
const ValueType ConstReference
Constant element reference type.
Definition: VectorExpression.hpp:304
CommonType< typename E1::DifferenceType, typename E2::DifferenceType >::Type DifferenceType
The common signed difference type of the two wrapped expressions.
Definition: VectorExpression.hpp:329
CRTP base class of all vector expression types.
Definition: Expression.hpp:68
Expression template node applying a unary functor F element-wise to a vector expression E.
Definition: VectorExpression.hpp:53
E::SizeType SizeType
The size type inherited from the wrapped expression.
Definition: VectorExpression.hpp:89
SelfType ClosureType
Closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:84
const SelfType ConstClosureType
Constant closure type used when this expression appears inside another expression.
Definition: VectorExpression.hpp:79
E::DifferenceType DifferenceType
The signed difference type inherited from the wrapped expression.
Definition: VectorExpression.hpp:94
VectorUnary(const ExpressionType &e)
Constructs the expression template node wrapping e.
Definition: VectorExpression.hpp:100
F::ResultType ValueType
The element value type of the expression (the functor's result type).
Definition: VectorExpression.hpp:64
const ValueType Reference
Mutable element reference type (degrades to const for expression template results).
Definition: VectorExpression.hpp:74
ConstReference operator[](SizeType i) const
Alias for operator() — applies the unary functor to element i of the wrapped expression.
Definition: VectorExpression.hpp:127
const ValueType ConstReference
Constant element reference type.
Definition: VectorExpression.hpp:69
ConstReference operator()(SizeType i) const
Applies the unary functor to element i of the wrapped expression and returns the result.
Definition: VectorExpression.hpp:117
SizeType getSize() const
Returns the wrapped expression's size.
Definition: VectorExpression.hpp:107
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
VectorBinary2Traits< E1, E2, VectorCrossProduct< E1, E2 > >::ResultType crossProd(const VectorExpression< E1 > &e1, const VectorExpression< E2 > &e2)
Returns the 3D vector cross product as an expression template node.
Definition: VectorExpression.hpp:1015
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
MatrixTranspose< E > trans(MatrixExpression< E > &e)
Returns a mutable Math::MatrixTranspose view of the matrix expression e.
Definition: MatrixExpression.hpp:1943
GridUnaryTraits< E, ScalarConjugation< typename E::ValueType > >::ResultType herm(const GridExpression< E > &e)
Returns the Hermitian conjugate of the grid expression e (alias of conj() for grids).
Definition: GridExpression.hpp:737
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
VectorNormInfinityIndex< E >::ResultType normInfIndex(const VectorExpression< E > &e)
Returns the (first) index at which the vector expression e attains its L∞ norm.
Definition: VectorExpression.hpp:1116
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
VectorInnerProduct< E1, E2 >::ResultType innerProd(const VectorExpression< E1 > &e1, const VectorExpression< E2 > &e2)
Returns the inner (dot) product of the vector expressions e1 and e2.
Definition: VectorExpression.hpp:1033
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
VectorAngleCosine< E1, E2, T >::ResultType angleCos(const VectorExpression< E1 > &e1, const VectorExpression< E2 > &e2, const T &sd, bool clamp=true)
Returns the cosine of the angle between the vector expressions e1 and e2 (optionally clamped to [-1,...
Definition: VectorExpression.hpp:1051
VectorNorm2< E >::ResultType length(const VectorExpression< E > &e)
Returns the length (L2 norm) of the vector expression e (alias of norm2()).
Definition: VectorExpression.hpp:1129
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, ScalarImaginary< typename E::ValueType > >::ResultType imag(const GridExpression< E > &e)
Returns the element-wise imaginary part of the grid expression e.
Definition: GridExpression.hpp:767
MatrixNormInfinity< E >::ResultType normInf(const MatrixExpression< E > &e)
Returns the L∞ (maximum absolute row sum) norm of the matrix expression e.
Definition: MatrixExpression.hpp:1901
QuaternionVectorBinaryTraits< E1, E2, QuaternionVectorRotation< E1, E2 > >::ResultType rotate(const QuaternionExpression< E1 > &e1, const VectorExpression< E2 > &e2)
Rotates the vector expression e2 by the quaternion expression e1.
Definition: VectorExpression.hpp:1170
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
MatrixNorm1< E >::ResultType norm1(const MatrixExpression< E > &e)
Returns the L1 (maximum absolute column sum) norm of the matrix expression e.
Definition: MatrixExpression.hpp:1875
const E & operator+(const GridExpression< E > &e)
Returns the grid expression e unchanged (unary +).
Definition: GridExpression.hpp:572
The namespace of the Chemical Data Processing Library.
std::common_type< T1, T2 >::type Type
The common type.
Definition: CommonType.hpp:51
Traits selecting the expression template node and its result type for the Math::QuaternionVectorBinar...
Definition: VectorExpression.hpp:731
QuaternionVectorBinary< E1, E2, F > ExpressionType
The expression template node type.
Definition: VectorExpression.hpp:736
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: VectorExpression.hpp:741
Traits selecting the expression template node and its result type for the Math::Scalar1VectorBinary i...
Definition: VectorExpression.hpp:498
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: VectorExpression.hpp:508
Scalar1VectorBinary< E1, E2, F > ExpressionType
The expression template node type.
Definition: VectorExpression.hpp:503
Traits selecting the expression template node and its result type for the Math::Scalar2VectorBinary i...
Definition: VectorExpression.hpp:614
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: VectorExpression.hpp:624
Scalar2VectorBinary< E1, E2, F > ExpressionType
The expression template node type.
Definition: VectorExpression.hpp:619
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
Scalar binary subtraction functor: apply(t1, t2) returns t1 - t2.
Definition: Functional.hpp:398
static ResultType apply(const VectorExpression< V1 > &e1, const VectorExpression< V2 > &e2, const T &sd, bool clamp)
Returns the cosine of the angle between e1 and e2.
Definition: Functional.hpp:533
CommonType< typename VectorInnerProduct< V1, V2 >::ResultType, T >::Type ResultType
Definition: Functional.hpp:523
Traits selecting the expression template node and its result type for the Math::VectorBinary1 instant...
Definition: VectorExpression.hpp:260
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: VectorExpression.hpp:270
VectorBinary1< E1, E2, F > ExpressionType
The expression template node type.
Definition: VectorExpression.hpp:265
Traits selecting the expression template node and its result type for the Math::VectorBinary2 instant...
Definition: VectorExpression.hpp:382
VectorBinary2< E1, E2, F > ExpressionType
The expression template node type.
Definition: VectorExpression.hpp:387
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: VectorExpression.hpp:392
Vector cross-product functor: apply(e1, e2, i) returns the i-th component of the 3D vector cross prod...
Definition: Functional.hpp:693
VectorScalarUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:758
static ResultType apply(const VectorExpression< V > &e)
Returns the sum of all elements of e.
Definition: Functional.hpp:765
VectorBooleanBinaryFunctor< V1, V2 >::ResultType ResultType
Definition: Functional.hpp:580
static ResultType apply(const VectorExpression< V1 > &e1, const VectorExpression< V2 > &e2)
Tells whether the vector expressions e1 and e2 are element-wise equal.
Definition: Functional.hpp:588
VectorScalarBinaryFunctor< V1, V2 >::ResultType ResultType
Definition: Functional.hpp:490
static ResultType apply(const VectorExpression< V1 > &e1, const VectorExpression< V2 > &e2)
Returns the inner product of e1 and e2.
Definition: Functional.hpp:499
static ResultType apply(const VectorExpression< V > &e)
Returns the L1 norm of e.
Definition: Functional.hpp:819
VectorScalarRealUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:812
VectorScalarRealUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:842
static ResultType apply(const VectorExpression< V > &e)
Returns the L2 norm of e.
Definition: Functional.hpp:849
VectorScalarIndexUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:933
static ResultType apply(const VectorExpression< V > &e)
Returns the index of the element of e with the largest L∞ norm.
Definition: Functional.hpp:940
static ResultType apply(const VectorExpression< V > &e)
Returns the L∞ norm of e.
Definition: Functional.hpp:882
VectorScalarRealUnaryFunctor< V >::ResultType ResultType
Definition: Functional.hpp:875
Scalar3VectorBooleanTernaryFunctor< V1, V2, T >::ResultType ResultType
Definition: Functional.hpp:644
static ResultType apply(const VectorExpression< V1 > &e1, const VectorExpression< V2 > &e2, Argument3Type epsilon)
Tells whether the vector expressions e1 and e2 are element-wise equal within an absolute tolerance ep...
Definition: Functional.hpp:654
Traits selecting the expression template node and its result type for the Math::VectorUnary instantia...
Definition: VectorExpression.hpp:143
ExpressionType ResultType
The expression template result type returned by free-function operators.
Definition: VectorExpression.hpp:153
VectorUnary< E, F > ExpressionType
The expression template node type.
Definition: VectorExpression.hpp:148