// @(#)root/smatrix:$Id$ // Authors: J. Palacios 2006 #ifndef ROOT_Math_BinaryOpPolicy #define ROOT_Math_BinaryOpPolicy 1 // Include files /** @class BinaryOpPolicy BinaryOpPolicy.h Math/BinaryOpPolicy.h * * * @author Juan PALACIOS * @date 2006-01-10 * * Classes to define matrix representation binary combination policy. * At the moment deals with symmetric and generic representation, and * establishes policies for multiplication (and division) and addition * (and subtraction) */ #ifndef ROOT_Math_MatrixRepresentationsStatic #include "Math/MatrixRepresentationsStatic.h" #endif namespace ROOT { namespace Math { /** matrix-matrix multiplication policy */ template struct MultPolicy { enum { N1 = R1::kRows, N2 = R2::kCols }; typedef MatRepStd RepType; }; /** matrix addition policy */ template struct AddPolicy { enum { N1 = R1::kRows, N2 = R1::kCols }; typedef MatRepStd RepType; }; template struct AddPolicy, MatRepSym > { typedef MatRepSym RepType; }; /** matrix transpose policy */ template struct TranspPolicy { enum { N1 = R::kRows, N2 = R::kCols }; typedef MatRepStd RepType; }; // specialized case of transpose of sym matrices template struct TranspPolicy > { typedef MatRepSym RepType; }; } // namespace Math } // namespace ROOT #endif // MATH_BINARYOPPOLICY_H