4 #ifndef ROOT_Math_BinaryOperators 5 #define ROOT_Math_BinaryOperators 21 #ifndef ROOT_Math_BinaryOpPolicy 32 template <
class T,
unsigned int D>
class SVector;
33 template <
class T,
unsigned int D1,
unsigned int D2,
class R>
class SMatrix;
47 static inline T apply(
const T& lhs,
const T& rhs) {
62 template <
class T,
unsigned int D>
64 operator+(
const SVector<T,D>& lhs,
const SVector<T,D>& rhs) {
74 template <
class A,
class T,
unsigned int D>
75 inline VecExpr<BinaryOp<AddOp<T>,
VecExpr<A,T,D>, SVector<T,D>, T>,
T, D>
76 operator+(
const VecExpr<A,T,D>& lhs,
const SVector<T,D>& rhs) {
86 template <
class A,
class T,
unsigned int D>
87 inline VecExpr<BinaryOp<AddOp<T>, SVector<T,D>, VecExpr<A,T,D>, T>,
T, D>
88 operator+(
const SVector<T,D>& lhs,
const VecExpr<A,T,D>& rhs) {
98 template <
class A,
class B,
class T,
unsigned int D>
99 inline VecExpr<BinaryOp<AddOp<T>, VecExpr<A,T,D>,
VecExpr<B,T,D>, T>,
T, D>
100 operator+(
const VecExpr<A,T,D>& lhs,
const VecExpr<B,T,D>& rhs) {
116 template <
class A,
class T,
unsigned int D>
133 template <
class A,
class T,
unsigned int D>
145 template <
class A,
class B,
class T,
unsigned int D>
146 inline VecExpr<BinaryOpCopyR<AddOp<T>, VecExpr<B,T,D>, Constant<A>, T>,
T, D>
156 template <
class A,
class B,
class T,
unsigned int D>
157 inline VecExpr<BinaryOpCopyL<AddOp<T>, Constant<A>, VecExpr<B,T,D>, T>,
T, D>
174 template <
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
175 inline 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 >
176 operator+(
const SMatrix<T,D,D2,R1>& lhs,
const SMatrix<T,D,D2,R2>& rhs) {
177 typedef BinaryOp<AddOp<T>, SMatrix<T,D,D2,R1>, SMatrix<T,D,D2,R2>, T> AddOpBinOp;
179 return Expr<AddOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(AddOpBinOp(
AddOp<T>(),lhs,rhs));
186 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
187 inline 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>
188 operator+(
const Expr<A,T,D,D2,R1>& lhs,
const SMatrix<T,D,D2,R2>& rhs) {
189 typedef BinaryOp<AddOp<T>, Expr<A,T,D,D2,R1>, SMatrix<T,D,D2,R2>, T> AddOpBinOp;
191 return Expr<AddOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(AddOpBinOp(
AddOp<T>(),lhs,rhs));
198 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
199 inline 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>
200 operator+(
const SMatrix<T,D,D2,R1>& lhs,
const Expr<A,T,D,D2,R2>& rhs) {
201 typedef BinaryOp<AddOp<T>, SMatrix<T,D,D2,R1>, Expr<A,T,D,D2,R2>, T> AddOpBinOp;
203 return Expr<AddOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(AddOpBinOp(
AddOp<T>(),lhs,rhs));
210 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
211 inline 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 >
212 operator+(
const Expr<A,T,D,D2,R1>& lhs,
const Expr<B,T,D,D2,R2>& rhs) {
213 typedef BinaryOp<AddOp<T>, Expr<A,T,D,D2,R1>, Expr<B,T,D,D2,R2>, T> AddOpBinOp;
215 return Expr<AddOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(AddOpBinOp(
AddOp<T>(),lhs,rhs));
228 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
229 inline Expr<BinaryOpCopyR<AddOp<T>,
SMatrix<T,D,D2,R>, Constant<A>, T>,
T, D, D2,
R>
245 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
246 inline Expr<BinaryOpCopyL<AddOp<T>, Constant<A>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
251 Constant<A>(lhs),rhs));
258 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
259 inline Expr<BinaryOpCopyR<AddOp<T>,
Expr<B,T,D,D2,R>, Constant<A>, T>,
T, D, D2,
R>
264 lhs,Constant<A>(rhs)));
270 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
271 inline Expr<BinaryOpCopyL<AddOp<T>, Constant<A>, Expr<B,T,D,D2,R>, T>,
T, D, D2,
R>
276 Constant<A>(lhs),rhs));
291 static inline T
apply(
const T& lhs,
const T& rhs) {
306 template <
class T,
unsigned int D>
308 operator-(
const SVector<T,D>& lhs,
const SVector<T,D>& rhs) {
318 template <
class A,
class T,
unsigned int D>
319 inline VecExpr<BinaryOp<MinOp<T>, VecExpr<A,T,D>, SVector<T,D>, T>,
T, D>
320 operator-(
const VecExpr<A,T,D>& lhs,
const SVector<T,D>& rhs) {
330 template <
class A,
class T,
unsigned int D>
331 inline VecExpr<BinaryOp<MinOp<T>, SVector<T,D>, VecExpr<A,T,D>, T>,
T, D>
332 operator-(
const SVector<T,D>& lhs,
const VecExpr<A,T,D>& rhs) {
342 template <
class A,
class B,
class T,
unsigned int D>
343 inline VecExpr<BinaryOp<MinOp<T>, VecExpr<A,T,D>, VecExpr<B,T,D>, T>,
T, D>
344 operator-(
const VecExpr<A,T,D>& lhs,
const VecExpr<B,T,D>& rhs) {
360 template <
class A,
class T,
unsigned int D>
377 template <
class A,
class T,
unsigned int D>
389 template <
class A,
class B,
class T,
unsigned int D>
390 inline VecExpr<BinaryOpCopyR<MinOp<T>, VecExpr<B,T,D>, Constant<A>, T>,
T, D>
400 template <
class A,
class B,
class T,
unsigned int D>
401 inline VecExpr<BinaryOpCopyL<MinOp<T>, Constant<A>, VecExpr<B,T,D>, T>,
T, D>
418 template <
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
419 inline 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>
420 operator-(
const SMatrix<T,D,D2,R1>& lhs,
const SMatrix<T,D,D2,R2>& rhs) {
421 typedef BinaryOp<MinOp<T>, SMatrix<T,D,D2,R1>, SMatrix<T,D,D2,R2>, T> MinOpBinOp;
423 return Expr<MinOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(MinOpBinOp(
MinOp<T>(),lhs,rhs));
430 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
431 inline 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>
432 operator-(
const Expr<A,T,D,D2,R1>& lhs,
const SMatrix<T,D,D2,R2>& rhs) {
433 typedef BinaryOp<MinOp<T>, Expr<A,T,D,D2,R1>, SMatrix<T,D,D2,R2>, T> MinOpBinOp;
435 return Expr<MinOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(MinOpBinOp(
MinOp<T>(),lhs,rhs));
442 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
443 inline 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>
444 operator-(
const SMatrix<T,D,D2,R1>& lhs,
const Expr<A,T,D,D2,R2>& rhs) {
445 typedef BinaryOp<MinOp<T>, SMatrix<T,D,D2,R1>, Expr<A,T,D,D2,R2>, T> MinOpBinOp;
447 return Expr<MinOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(MinOpBinOp(
MinOp<T>(),lhs,rhs));
454 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
455 inline 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>
456 operator-(
const Expr<A,T,D,D2,R1>& lhs,
const Expr<B,T,D,D2,R2>& rhs) {
457 typedef BinaryOp<MinOp<T>, Expr<A,T,D,D2,R1>, Expr<B,T,D,D2,R2>, T> MinOpBinOp;
459 return Expr<MinOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(MinOpBinOp(
MinOp<T>(),lhs,rhs));
472 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
473 inline Expr<BinaryOpCopyR<MinOp<T>, SMatrix<T,D,D2,R>, Constant<A>, T>,
T, D, D2,
R>
478 lhs,Constant<A>(rhs)));
490 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
491 inline Expr<BinaryOpCopyL<MinOp<T>, Constant<A>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
501 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
502 inline Expr<BinaryOpCopyR<MinOp<T>, Expr<B,T,D,D2,R>, Constant<A>, T>,
T, D, D2,
R>
512 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
513 inline Expr<BinaryOpCopyL<MinOp<T>, Constant<A>, Expr<B,T,D,D2,R>, T>,
T, D, D2,
R>
518 Constant<A>(lhs),rhs));
533 static inline T
apply(
const T& lhs,
const T& rhs) {
548 template <
class T,
unsigned int D>
550 operator*(
const SVector<T,D>& lhs,
const SVector<T,D>& rhs) {
566 template <
class A,
class T,
unsigned int D>
567 inline VecExpr<BinaryOp<MulOp<T>,
Expr<A,T,D>, SVector<T,D>, T>,
T, D>
568 operator*(
const VecExpr<A,T,D>& lhs,
const SVector<T,D>& rhs) {
577 template <
class A,
class T,
unsigned int D>
578 inline VecExpr<BinaryOp<MulOp<T>, SVector<T,D>, VecExpr<A,T,D>, T>,
T, D>
579 operator*(
const SVector<T,D>& lhs,
const VecExpr<A,T,D>& rhs) {
588 template <
class A,
class B,
class T,
unsigned int D>
589 inline VecExpr<BinaryOp<MulOp<T>, VecExpr<A,T,D>, VecExpr<B,T,D>, T>,
T, D>
590 operator*(
const VecExpr<A,T,D>& lhs,
const VecExpr<B,T,D>& rhs) {
599 template <
class A,
class T,
unsigned int D>
610 template <
class A,
class T,
unsigned int D>
622 template <
class A,
class B,
class T,
unsigned int D>
623 inline VecExpr<BinaryOpCopyR<MulOp<T>, VecExpr<B,T,D>, Constant<A>, T>,
T, D>
633 template <
class A,
class B,
class T,
unsigned int D>
634 inline VecExpr<BinaryOpCopyL<MulOp<T>, Constant<A>, VecExpr<B,T,D>, T>,
T, D>
652 template <
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
653 inline 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>
654 Times(
const SMatrix<T,D,D2,R1>& lhs,
const SMatrix<T,D,D2,R2>& rhs) {
655 typedef BinaryOp<MulOp<T>, SMatrix<T,D,D2,R1>, SMatrix<T,D,D2,R2>, T> MulOpBinOp;
657 return Expr<MulOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(MulOpBinOp(
MulOp<T>(),lhs,rhs));
664 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
665 inline 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>
666 Times(
const Expr<A,T,D,D2,R1>& lhs,
const SMatrix<T,D,D2,R2>& rhs) {
667 typedef BinaryOp<MulOp<T>, Expr<A,T,D,D2,R1>, SMatrix<T,D,D2,R2>, T> MulOpBinOp;
669 return Expr<MulOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(MulOpBinOp(
MulOp<T>(),lhs,rhs));
676 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
677 inline 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>
678 Times(
const SMatrix<T,D,D2,R1>& lhs,
const Expr<A,T,D,D2,R2>& rhs) {
679 typedef BinaryOp<MulOp<T>, SMatrix<T,D,D2,R1>, Expr<A,T,D,D2,R2>, T> MulOpBinOp;
681 return Expr<MulOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(MulOpBinOp(
MulOp<T>(),lhs,rhs));
688 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
689 inline 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>
690 Times(
const Expr<A,T,D,D2,R1>& lhs,
const Expr<B,T,D,D2,R2>& rhs) {
691 typedef BinaryOp<MulOp<T>, Expr<A,T,D,D2,R1>, Expr<B,T,D,D2,R2>, T> MulOpBinOp;
693 return Expr<MulOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(MulOpBinOp(
MulOp<T>(),lhs,rhs));
706 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
707 inline Expr<BinaryOpCopyR<MulOp<T>, SMatrix<T,D,D2,R>, Constant<A>, T>,
T, D, D2,
R>
712 lhs,Constant<A>(rhs)));
724 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
725 inline Expr<BinaryOpCopyL<MulOp<T>, Constant<A>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
730 Constant<A>(lhs),rhs));
737 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
738 inline Expr<BinaryOpCopyR<MulOp<T>, Expr<B,T,D,D2,R>, Constant<A>, T>,
T, D, D2,
R>
743 lhs,Constant<A>(rhs)));
749 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
750 inline Expr<BinaryOpCopyL<MulOp<T>, Constant<A>, Expr<B,T,D,D2,R>, T>,
T, D, D2,
R>
755 Constant<A>(lhs),rhs));
770 static inline T
apply(
const T& lhs,
const T& rhs) {
784 template <
class T,
unsigned int D>
786 operator/(
const SVector<T,D>& lhs,
const SVector<T,D>& rhs) {
796 template <
class A,
class T,
unsigned int D>
797 inline VecExpr<BinaryOp<DivOp<T>, VecExpr<A,T,D>, SVector<T,D>, T>,
T, D>
798 operator/(
const VecExpr<A,T,D>& lhs,
const SVector<T,D>& rhs) {
807 template <
class A,
class T,
unsigned int D>
808 inline VecExpr<BinaryOp<DivOp<T>, SVector<T,D>, VecExpr<A,T,D>, T>,
T, D>
809 operator/(
const SVector<T,D>& lhs,
const VecExpr<A,T,D>& rhs) {
819 template <
class A,
class B,
class T,
unsigned int D>
820 inline VecExpr<BinaryOp<DivOp<T>, VecExpr<A,T,D>, VecExpr<B,T,D>, T>,
T, D>
821 operator/(
const VecExpr<A,T,D>& lhs,
const VecExpr<B,T,D>& rhs) {
837 template <
class A,
class T,
unsigned int D>
854 template <
class A,
class T,
unsigned int D>
866 template <
class A,
class B,
class T,
unsigned int D>
867 inline VecExpr<BinaryOpCopyR<DivOp<T>, VecExpr<B,T,D>, Constant<A>, T>,
T, D>
877 template <
class A,
class B,
class T,
unsigned int D>
878 inline VecExpr<BinaryOpCopyL<DivOp<T>, Constant<A>, VecExpr<B,T,D>, T>,
T, D>
895 template <
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
896 inline 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>
897 Div(
const SMatrix<T,D,D2,R1>& lhs,
const SMatrix<T,D,D2,R2>& rhs) {
898 typedef BinaryOp<DivOp<T>, SMatrix<T,D,D2,R1>, SMatrix<T,D,D2,R2>, T> DivOpBinOp;
900 return Expr<DivOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(DivOpBinOp(
DivOp<T>(),lhs,rhs));
907 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
908 inline 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>
909 Div(
const Expr<A,T,D,D2,R1>& lhs,
const SMatrix<T,D,D2,R2>& rhs) {
910 typedef BinaryOp<DivOp<T>, Expr<A,T,D,D2,R1>, SMatrix<T,D,D2,R2>, T> DivOpBinOp;
912 return Expr<DivOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(DivOpBinOp(
DivOp<T>(),lhs,rhs));
919 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
920 inline 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>
921 Div(
const SMatrix<T,D,D2,R1>& lhs,
const Expr<A,T,D,D2,R2>& rhs) {
922 typedef BinaryOp<DivOp<T>, SMatrix<T,D,D2,R1>, Expr<A,T,D,D2,R2>, T> DivOpBinOp;
924 return Expr<DivOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(DivOpBinOp(
DivOp<T>(),lhs,rhs));
931 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R1,
class R2>
932 inline 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>
933 Div(
const Expr<A,T,D,D2,R1>& lhs,
const Expr<B,T,D,D2,R2>& rhs) {
934 typedef BinaryOp<DivOp<T>, Expr<A,T,D,D2,R1>, Expr<B,T,D,D2,R2>, T> DivOpBinOp;
936 return Expr<DivOpBinOp,T,D,D2,typename AddPolicy<T,D,D2,R1,R2>::RepType>(DivOpBinOp(
DivOp<T>(),lhs,rhs));
949 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
950 inline Expr<BinaryOpCopyR<DivOp<T>, SMatrix<T,D,D2,R>, Constant<A>, T>,
T, D, D2,
R>
955 lhs,Constant<A>(rhs)));
967 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
968 inline Expr<BinaryOpCopyL<DivOp<T>, Constant<A>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
973 Constant<A>(lhs),rhs));
980 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
981 inline Expr<BinaryOpCopyR<DivOp<T>, Expr<B,T,D,D2,R>, Constant<A>, T>,
T, D, D2,
R>
986 lhs,Constant<A>(rhs)));
992 template <
class A,
class B,
class T,
unsigned int D,
unsigned int D2,
class R>
993 inline Expr<BinaryOpCopyL<DivOp<T>, Constant<A>, Expr<B,T,D,D2,R>, T>,
T, D, D2,
R>
Constant expression class A class representing constant expressions (literals) in the parse tree...
Multiplication (element-wise) Operation Class.
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Division (element-wise) Operation Class.
Binary Operation class with value storage for the left argument.
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...
Subtraction Operation Class.
DisplacementVector2D< CoordSystem1, U > operator+(DisplacementVector2D< CoordSystem1, U > v1, const DisplacementVector2D< CoordSystem2, U > &v2)
Addition of DisplacementVector2D vectors.
static T apply(const T &lhs, const T &rhs)
DisplacementVector2D< CoordSystem1, U > operator-(DisplacementVector2D< CoordSystem1, U > v1, DisplacementVector2D< CoordSystem2, U > const &v2)
Difference between two DisplacementVector2D vectors.
SMatrix: a generic fixed size D1 x D2 Matrix class.
Expression wrapper class for Matrix objects.
Binary Operation class with value storage for the right argument.
static T apply(const T &lhs, const T &rhs)
BinaryOperation class A class representing binary operators in the parse tree.
Addition Operation Class.
static T apply(const T &lhs, const T &rhs)
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 ...
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...
static T apply(const T &lhs, const T &rhs)
Namespace for new Math classes and functions.
Expression wrapper class for Vector objects.
AxisAngle operator*(RotationX const &r1, AxisAngle const &r2)
Multiplication of an axial rotation by an AxisAngle.
SVector: a generic fixed size Vector class.