Logo ROOT  
Reference Guide
LaSum.h
Go to the documentation of this file.
1 // @(#)root/minuit2:$Id$
2 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3 
4 /**********************************************************************
5  * *
6  * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7  * *
8  **********************************************************************/
9 
10 #ifndef ROOT_Minuit2_LaSum
11 #define ROOT_Minuit2_LaSum
12 
13 #include "Minuit2/ABSum.h"
14 #include "Minuit2/LAVector.h"
15 #include "Minuit2/LASymMatrix.h"
16 
17 namespace ROOT {
18 
19 namespace Minuit2 {
20 
21 #define OP_ADD1(MT, MAT1, T) \
22  inline ABObj<MT, MAT1, T> operator-(const ABObj<MT, MAT1, T> &m) \
23  { \
24  return ABObj<MT, MAT1, T>(m.Obj(), T(-1.) * m.f()); \
25  } \
26  \
27  inline ABObj<MT, ABSum<ABObj<MT, MAT1, T>, ABObj<MT, MAT1, T>>, T> operator+(const ABObj<MT, MAT1, T> &a, \
28  const ABObj<MT, MAT1, T> &b) \
29  { \
30  return ABObj<MT, ABSum<ABObj<MT, MAT1, T>, ABObj<MT, MAT1, T>>, T>( \
31  ABSum<ABObj<MT, MAT1, T>, ABObj<MT, MAT1, T>>(a, b)); \
32  } \
33  inline ABObj<MT, ABSum<ABObj<MT, MAT1, T>, ABObj<MT, MAT1, T>>, T> operator-(const ABObj<MT, MAT1, T> &a, \
34  const ABObj<MT, MAT1, T> &b) \
35  { \
36  return ABObj<MT, ABSum<ABObj<MT, MAT1, T>, ABObj<MT, MAT1, T>>, T>( \
37  ABSum<ABObj<MT, MAT1, T>, ABObj<MT, MAT1, T>>(a, ABObj<MT, MAT1, T>(b.Obj(), T(-1.) * b.f()))); \
38  }
39 
40 OP_ADD1(vec, LAVector, double)
41 OP_ADD1(sym, LASymMatrix, double)
42 
43 #define OP_SCALE(MT, MAT1, T) \
44  inline ABObj<MT, MAT1, T> operator*(T f, const MAT1 &obj) { return ABObj<MT, MAT1, T>(obj, f); }
45 
46 OP_SCALE(sym, LASymMatrix, double)
47 OP_SCALE(vec, LAVector, double)
48 
49 #define OP_SCALE1(MT, MAT1, T) \
50  inline ABObj<MT, MAT1, T> operator/(const MAT1 &obj, T f) { return ABObj<MT, MAT1, T>(obj, 1. / f); }
51 
52 OP_SCALE1(sym, LASymMatrix, double)
53 OP_SCALE1(vec, LAVector, double)
54 
55 #define OP_MIN(MT, MAT1, T) \
56  inline ABObj<MT, MAT1, T> operator-(const MAT1 &obj) { return ABObj<MT, MAT1, T>(obj, T(-1.)); }
57 
58 OP_MIN(sym, LASymMatrix, double)
59 OP_MIN(vec, LAVector, double)
60 
61 } // namespace Minuit2
62 
63 } // namespace ROOT
64 
65 #endif // ROOT_Minuit2_LaSum
sym
#define sym(otri1, otri2)
Definition: triangle.c:932
LASymMatrix.h
OP_ADD1
#define OP_ADD1(MT, MAT1, T)
Definition: LaSum.h:21
ABSum.h
OP_MIN
#define OP_MIN(MT, MAT1, T)
Definition: LaSum.h:55
OP_SCALE1
#define OP_SCALE1(MT, MAT1, T)
Definition: LaSum.h:49
LAVector.h
OP_SCALE
#define OP_SCALE(MT, MAT1, T)
Definition: LaSum.h:43
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: EExecutionPolicy.hxx:4