4#ifndef ROOT_Math_BinaryOperators
5#define ROOT_Math_BinaryOperators
30template <
class T,
unsigned int D>
class SVector;
31template <
class T,
unsigned int D1,
unsigned int D2,
class R>
class SMatrix;
60template <
class T,
unsigned int D>
72template <
class A,
class T,
unsigned int D>
84template <
class A,
class T,
unsigned int D>
96template <
class A,
class B,
class T,
unsigned int D>
114template <
class A,
class T,
unsigned int D>
131template <
class A,
class T,
unsigned int D>
143template <
class A,
class B,
class T,
unsigned int D>
154template <
class A,
class B,
class T,
unsigned int D>
172template <
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
173inline Expr<BinaryOp<AddOp<T>,
SMatrix<T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType >
177 return Expr<AddOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
AddOpBinOp(
AddOp<T>(),
lhs,
rhs));
184template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
185inline Expr<BinaryOp<AddOp<T>,
Expr<A,T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
187 typedef BinaryOp<AddOp<T>,
Expr<A,T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>
AddOpBinOp;
189 return Expr<AddOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
AddOpBinOp(
AddOp<T>(),
lhs,
rhs));
196template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
197inline Expr<BinaryOp<AddOp<T>,
SMatrix<T,D,D2,R1>,
Expr<A,T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
199 typedef BinaryOp<AddOp<T>,
SMatrix<T,D,D2,R1>,
Expr<A,T,D,D2,R2>, T>
AddOpBinOp;
201 return Expr<AddOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
AddOpBinOp(
AddOp<T>(),
lhs,
rhs));
208template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
209inline Expr<BinaryOp<AddOp<T>,
Expr<A,T,D,D2,R1>,
Expr<B,T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType >
211 typedef BinaryOp<AddOp<T>,
Expr<A,T,D,D2,R1>,
Expr<B,T,D,D2,R2>, T>
AddOpBinOp;
213 return Expr<AddOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
AddOpBinOp(
AddOp<T>(),
lhs,
rhs));
226template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
227inline Expr<BinaryOpCopyR<AddOp<T>,
SMatrix<T,D,D2,R>,
Constant<A>, T>, T, D,
D2,
R>
243template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
244inline Expr<BinaryOpCopyL<AddOp<T>,
Constant<A>,
SMatrix<T,D,D2,R>, T>, T, D,
D2,
R>
256template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
257inline Expr<BinaryOpCopyR<AddOp<T>,
Expr<B,T,D,D2,R>,
Constant<A>, T>, T, D,
D2,
R>
268template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
269inline Expr<BinaryOpCopyL<AddOp<T>,
Constant<A>,
Expr<B,T,D,D2,R>, T>, T, D,
D2,
R>
304template <
class T,
unsigned int D>
316template <
class A,
class T,
unsigned int D>
328template <
class A,
class T,
unsigned int D>
340template <
class A,
class B,
class T,
unsigned int D>
358template <
class A,
class T,
unsigned int D>
375template <
class A,
class T,
unsigned int D>
387template <
class A,
class B,
class T,
unsigned int D>
398template <
class A,
class B,
class T,
unsigned int D>
416template <
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
417inline Expr<BinaryOp<MinOp<T>,
SMatrix<T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
421 return Expr<MinOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
MinOpBinOp(
MinOp<T>(),
lhs,
rhs));
428template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
429inline Expr<BinaryOp<MinOp<T>,
Expr<A,T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
431 typedef BinaryOp<MinOp<T>,
Expr<A,T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>
MinOpBinOp;
433 return Expr<MinOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
MinOpBinOp(
MinOp<T>(),
lhs,
rhs));
440template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
441inline Expr<BinaryOp<MinOp<T>,
SMatrix<T,D,D2,R1>,
Expr<A,T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
443 typedef BinaryOp<MinOp<T>,
SMatrix<T,D,D2,R1>,
Expr<A,T,D,D2,R2>, T>
MinOpBinOp;
445 return Expr<MinOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
MinOpBinOp(
MinOp<T>(),
lhs,
rhs));
452template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
453inline Expr<BinaryOp<MinOp<T>,
Expr<A,T,D,D2,R1>,
Expr<B,T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
455 typedef BinaryOp<MinOp<T>,
Expr<A,T,D,D2,R1>,
Expr<B,T,D,D2,R2>, T>
MinOpBinOp;
457 return Expr<MinOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
MinOpBinOp(
MinOp<T>(),
lhs,
rhs));
470template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
471inline Expr<BinaryOpCopyR<MinOp<T>,
SMatrix<T,D,D2,R>,
Constant<A>, T>, T, D,
D2,
R>
488template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
489inline Expr<BinaryOpCopyL<MinOp<T>,
Constant<A>,
SMatrix<T,D,D2,R>, T>, T, D,
D2,
R>
499template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
500inline Expr<BinaryOpCopyR<MinOp<T>,
Expr<B,T,D,D2,R>,
Constant<A>, T>, T, D,
D2,
R>
510template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
511inline Expr<BinaryOpCopyL<MinOp<T>,
Constant<A>,
Expr<B,T,D,D2,R>, T>, T, D,
D2,
R>
546template <
class T,
unsigned int D>
564template <
class A,
class T,
unsigned int D>
575template <
class A,
class T,
unsigned int D>
586template <
class A,
class B,
class T,
unsigned int D>
597template <
class A,
class T,
unsigned int D>
608template <
class A,
class T,
unsigned int D>
620template <
class A,
class B,
class T,
unsigned int D>
631template <
class A,
class B,
class T,
unsigned int D>
650template <
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
651inline Expr<BinaryOp<MulOp<T>,
SMatrix<T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
655 return Expr<MulOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
MulOpBinOp(
MulOp<T>(),
lhs,
rhs));
662template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
663inline Expr<BinaryOp<MulOp<T>,
Expr<A,T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
665 typedef BinaryOp<MulOp<T>,
Expr<A,T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>
MulOpBinOp;
667 return Expr<MulOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
MulOpBinOp(
MulOp<T>(),
lhs,
rhs));
674template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
675inline Expr<BinaryOp<MulOp<T>,
SMatrix<T,D,D2,R1>,
Expr<A,T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
677 typedef BinaryOp<MulOp<T>,
SMatrix<T,D,D2,R1>,
Expr<A,T,D,D2,R2>, T>
MulOpBinOp;
679 return Expr<MulOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
MulOpBinOp(
MulOp<T>(),
lhs,
rhs));
686template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
687inline Expr<BinaryOp<MulOp<T>,
Expr<A,T,D,D2,R1>,
Expr<B,T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
689 typedef BinaryOp<MulOp<T>,
Expr<A,T,D,D2,R1>,
Expr<B,T,D,D2,R2>, T>
MulOpBinOp;
691 return Expr<MulOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
MulOpBinOp(
MulOp<T>(),
lhs,
rhs));
704template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
705inline Expr<BinaryOpCopyR<MulOp<T>,
SMatrix<T,D,D2,R>,
Constant<A>, T>, T, D,
D2,
R>
722template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
723inline Expr<BinaryOpCopyL<MulOp<T>,
Constant<A>,
SMatrix<T,D,D2,R>, T>, T, D,
D2,
R>
735template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
736inline Expr<BinaryOpCopyR<MulOp<T>,
Expr<B,T,D,D2,R>,
Constant<A>, T>, T, D,
D2,
R>
747template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
748inline Expr<BinaryOpCopyL<MulOp<T>,
Constant<A>,
Expr<B,T,D,D2,R>, T>, T, D,
D2,
R>
782template <
class T,
unsigned int D>
794template <
class A,
class T,
unsigned int D>
805template <
class A,
class T,
unsigned int D>
817template <
class A,
class B,
class T,
unsigned int D>
835template <
class A,
class T,
unsigned int D>
852template <
class A,
class T,
unsigned int D>
864template <
class A,
class B,
class T,
unsigned int D>
875template <
class A,
class B,
class T,
unsigned int D>
893template <
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
894inline Expr<BinaryOp<DivOp<T>,
SMatrix<T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
898 return Expr<DivOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
DivOpBinOp(
DivOp<T>(),
lhs,
rhs));
905template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
906inline Expr<BinaryOp<DivOp<T>,
Expr<A,T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
908 typedef BinaryOp<DivOp<T>,
Expr<A,T,D,D2,R1>,
SMatrix<T,D,D2,R2>, T>
DivOpBinOp;
910 return Expr<DivOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
DivOpBinOp(
DivOp<T>(),
lhs,
rhs));
917template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
918inline Expr<BinaryOp<DivOp<T>,
SMatrix<T,D,D2,R1>,
Expr<A,T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
920 typedef BinaryOp<DivOp<T>,
SMatrix<T,D,D2,R1>,
Expr<A,T,D,D2,R2>, T>
DivOpBinOp;
922 return Expr<DivOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
DivOpBinOp(
DivOp<T>(),
lhs,
rhs));
929template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
930inline Expr<BinaryOp<DivOp<T>,
Expr<A,T,D,D2,R1>,
Expr<B,T,D,D2,R2>, T>, T, D,
D2,
typename AddPolicy<T,D,D2,R1,R2>::RepType>
932 typedef BinaryOp<DivOp<T>,
Expr<A,T,D,D2,R1>,
Expr<B,T,D,D2,R2>, T>
DivOpBinOp;
934 return Expr<DivOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(
DivOpBinOp(
DivOp<T>(),
lhs,
rhs));
947template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
948inline Expr<BinaryOpCopyR<DivOp<T>,
SMatrix<T,D,D2,R>,
Constant<A>, T>, T, D,
D2,
R>
965template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
966inline Expr<BinaryOpCopyL<DivOp<T>,
Constant<A>,
SMatrix<T,D,D2,R>, T>, T, D,
D2,
R>
978template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
979inline Expr<BinaryOpCopyR<DivOp<T>,
Expr<B,T,D,D2,R>,
Constant<A>, T>, T, D,
D2,
R>
990template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
991inline Expr<BinaryOpCopyL<DivOp<T>,
Constant<A>,
Expr<B,T,D,D2,R>, T>, T, D,
D2,
R>
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Addition Operation Class.
static T apply(const T &lhs, const T &rhs)
Division (element-wise) Operation Class.
static T apply(const T &lhs, const T &rhs)
Subtraction Operation Class.
static T apply(const T &lhs, const T &rhs)
Multiplication (element-wise) Operation Class.
static T apply(const T &lhs, const T &rhs)
Expr< BinaryOp< DivOp< T >, SMatrix< T, D, D2, R1 >, SMatrix< T, D, D2, R2 >, T >, T, D, D2, typename AddPolicy< T, D, D2, R1, R2 >::RepType > Div(const SMatrix< T, D, D2, R1 > &lhs, const SMatrix< T, D, D2, R2 > &rhs)
Division (element wise) of two matrices of the same dimensions: C(i,j) = A(i,j) / B(i,...
Expr< BinaryOp< MulOp< T >, SMatrix< T, D, D2, R1 >, SMatrix< T, D, D2, R2 >, T >, T, D, D2, typename AddPolicy< T, D, D2, R1, R2 >::RepType > Times(const SMatrix< T, D, D2, R1 > &lhs, const SMatrix< T, D, D2, R2 > &rhs)
Element by element matrix multiplication C(i,j) = A(i,j)*B(i,j) returning a matrix expression.
VecExpr< BinaryOp< DivOp< T >, SVector< T, D >, SVector< T, D >, T >, T, D > operator/(const SVector< T, D > &lhs, const SVector< T, D > &rhs)
Element by element division of vectors of the same dimension: v3(i) = v1(i)/v2(i) returning a vector ...
Namespace for new Math classes and functions.
DisplacementVector2D< CoordSystem1, U > operator+(DisplacementVector2D< CoordSystem1, U > v1, const DisplacementVector2D< CoordSystem2, U > &v2)
Addition of DisplacementVector2D vectors.
DisplacementVector2D< CoordSystem1, U > operator-(DisplacementVector2D< CoordSystem1, U > v1, DisplacementVector2D< CoordSystem2, U > const &v2)
Difference between two DisplacementVector2D vectors.
AxisAngle operator*(RotationX const &r1, AxisAngle const &r2)
Multiplication of an axial rotation by an AxisAngle.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
MatRepStd< typename R1::value_type, N1, N2 > RepType