00001
00002
00003 #ifndef ROOT_Math_BinaryOpPolicy
00004 #define ROOT_Math_BinaryOpPolicy 1
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef ROOT_Math_MatrixRepresentationsStatic
00022 #include "Math/MatrixRepresentationsStatic.h"
00023 #endif
00024
00025 namespace ROOT {
00026
00027 namespace Math {
00028
00029
00030
00031
00032 template <class T, class R1, class R2>
00033 struct MultPolicy
00034 {
00035 enum {
00036 N1 = R1::kRows,
00037 N2 = R2::kCols
00038 };
00039 typedef MatRepStd<T, N1, N2> RepType;
00040 };
00041
00042
00043
00044
00045 template <class T, unsigned int D1, unsigned int D2, class R1, class R2>
00046 struct AddPolicy
00047 {
00048 enum {
00049 N1 = R1::kRows,
00050 N2 = R1::kCols
00051 };
00052 typedef MatRepStd<typename R1::value_type, N1, N2 > RepType;
00053 };
00054
00055 template <class T, unsigned int D1, unsigned int D2>
00056 struct AddPolicy<T, D1, D2, MatRepSym<T,D1>, MatRepSym<T,D1> >
00057 {
00058 typedef MatRepSym<T,D1> RepType;
00059 };
00060
00061
00062
00063
00064 template <class T, unsigned int D1, unsigned int D2, class R>
00065 struct TranspPolicy
00066 {
00067 enum {
00068 N1 = R::kRows,
00069 N2 = R::kCols
00070 };
00071 typedef MatRepStd<T, N2, N1> RepType;
00072 };
00073
00074 template <class T, unsigned int D1, unsigned int D2>
00075 struct TranspPolicy<T, D1, D2, MatRepSym<T,D1> >
00076 {
00077 typedef MatRepSym<T, D1> RepType;
00078 };
00079 }
00080
00081 }
00082
00083 #endif // MATH_BINARYOPPOLICY_H