File indexing completed on 2025-01-18 10:10:14
0001
0002
0003 #ifndef ROOT_Math_BinaryOpPolicy
0004 #define ROOT_Math_BinaryOpPolicy 1
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include "Math/MatrixRepresentationsStatic.h"
0022
0023 namespace ROOT {
0024
0025 namespace Math {
0026
0027
0028
0029
0030 template <class T, class R1, class R2>
0031 struct MultPolicy
0032 {
0033 enum {
0034 N1 = R1::kRows,
0035 N2 = R2::kCols
0036 };
0037 typedef MatRepStd<T, N1, N2> RepType;
0038 };
0039
0040
0041
0042
0043 template <class T, unsigned int D1, unsigned int D2, class R1, class R2>
0044 struct AddPolicy
0045 {
0046 enum {
0047 N1 = R1::kRows,
0048 N2 = R1::kCols
0049 };
0050 typedef MatRepStd<typename R1::value_type, N1, N2 > RepType;
0051 };
0052
0053 template <class T, unsigned int D1, unsigned int D2>
0054 struct AddPolicy<T, D1, D2, MatRepSym<T,D1>, MatRepSym<T,D1> >
0055 {
0056 typedef MatRepSym<T,D1> RepType;
0057 };
0058
0059
0060
0061
0062 template <class T, unsigned int D1, unsigned int D2, class R>
0063 struct TranspPolicy
0064 {
0065 enum {
0066 N1 = R::kRows,
0067 N2 = R::kCols
0068 };
0069 typedef MatRepStd<T, N2, N1> RepType;
0070 };
0071
0072 template <class T, unsigned int D1, unsigned int D2>
0073 struct TranspPolicy<T, D1, D2, MatRepSym<T,D1> >
0074 {
0075 typedef MatRepSym<T, D1> RepType;
0076 };
0077 }
0078
0079 }
0080
0081 #endif