Logo ROOT   6.16/01
Reference Guide
BinaryOpPolicy.h
Go to the documentation of this file.
1// @(#)root/smatrix:$Id$
2// Authors: J. Palacios 2006
3#ifndef ROOT_Math_BinaryOpPolicy
4#define ROOT_Math_BinaryOpPolicy 1
5
6// Include files
7
8/** @class BinaryOpPolicy BinaryOpPolicy.h Math/BinaryOpPolicy.h
9 *
10 *
11 * @author Juan PALACIOS
12 * @date 2006-01-10
13 *
14 * Classes to define matrix representation binary combination policy.
15 * At the moment deals with symmetric and generic representation, and
16 * establishes policies for multiplication (and division) and addition
17 * (and subtraction)
18 */
19
20
22
23namespace ROOT {
24
25 namespace Math {
26
27 /**
28 matrix-matrix multiplication policy
29 */
30 template <class T, class R1, class R2>
32 {
33 enum {
34 N1 = R1::kRows,
35 N2 = R2::kCols
36 };
38 };
39
40 /**
41 matrix addition policy
42 */
43 template <class T, unsigned int D1, unsigned int D2, class R1, class R2>
44 struct AddPolicy
45 {
46 enum {
47 N1 = R1::kRows,
48 N2 = R1::kCols
49 };
51 };
52
53 template <class T, unsigned int D1, unsigned int D2>
54 struct AddPolicy<T, D1, D2, MatRepSym<T,D1>, MatRepSym<T,D1> >
55 {
57 };
58
59 /**
60 matrix transpose policy
61 */
62 template <class T, unsigned int D1, unsigned int D2, class R>
64 {
65 enum {
66 N1 = R::kRows,
67 N2 = R::kCols
68 };
70 };
71 // specialized case of transpose of sym matrices
72 template <class T, unsigned int D1, unsigned int D2>
73 struct TranspPolicy<T, D1, D2, MatRepSym<T,D1> >
74 {
76 };
77 } // namespace Math
78
79} // namespace ROOT
80
81#endif // MATH_BINARYOPPOLICY_H
Expression wrapper class for Matrix objects.
MatRepSym Matrix storage representation for a symmetric matrix of dimension NxN This class is a templ...
Namespace for new Math classes and functions.
double T(double x)
Definition: ChebyshevPol.h:34
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
matrix addition policy
MatRepStd< typename R1::value_type, N1, N2 > RepType
matrix-matrix multiplication policy
MatRepStd< T, N1, N2 > RepType
matrix transpose policy
MatRepStd< T, N2, N1 > RepType