Logo ROOT  
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 
23 namespace ROOT {
24 
25  namespace Math {
26 
27  /**
28  matrix-matrix multiplication policy
29  */
30  template <class T, class R1, class R2>
31  struct MultPolicy
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>
63  struct TranspPolicy
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
MatrixRepresentationsStatic.h
ROOT::Math::MatRepSym
MatRepSym Matrix storage representation for a symmetric matrix of dimension NxN This class is a templ...
Definition: HelperOps.h:35
ROOT::Math::MultPolicy
matrix-matrix multiplication policy
Definition: BinaryOpPolicy.h:31
ROOT::Math::MultPolicy::RepType
MatRepStd< T, N1, N2 > RepType
Definition: BinaryOpPolicy.h:37
ROOT::Math::TranspPolicy::N2
@ N2
Definition: BinaryOpPolicy.h:67
ROOT::Math::AddPolicy::N2
@ N2
Definition: BinaryOpPolicy.h:48
ROOT::Math::AddPolicy::N1
@ N1
Definition: BinaryOpPolicy.h:47
ROOT::Math::TranspPolicy< T, D1, D2, MatRepSym< T, D1 > >::RepType
MatRepSym< T, D1 > RepType
Definition: BinaryOpPolicy.h:75
ROOT::Math::MatRepStd
Expression wrapper class for Matrix objects.
Definition: Expression.h:134
ROOT::Math::AddPolicy::RepType
MatRepStd< typename R1::value_type, N1, N2 > RepType
Definition: BinaryOpPolicy.h:50
ROOT::Math::TranspPolicy
matrix transpose policy
Definition: BinaryOpPolicy.h:63
ROOT::Math::MultPolicy::N1
@ N1
Definition: BinaryOpPolicy.h:34
ROOT::Math::TranspPolicy::N1
@ N1
Definition: BinaryOpPolicy.h:66
ROOT::Math::TranspPolicy::RepType
MatRepStd< T, N2, N1 > RepType
Definition: BinaryOpPolicy.h:69
ROOT::Math::Chebyshev::T
double T(double x)
Definition: ChebyshevPol.h:52
ROOT::Math::AddPolicy
matrix addition policy
Definition: BinaryOpPolicy.h:44
ROOT::Math::MultPolicy::N2
@ N2
Definition: BinaryOpPolicy.h:35
ROOT::Math::AddPolicy< T, D1, D2, MatRepSym< T, D1 >, MatRepSym< T, D1 > >::RepType
MatRepSym< T, D1 > RepType
Definition: BinaryOpPolicy.h:56
ROOT
VSD Structures.
Definition: StringConv.hxx:21
Math