ROOT   Reference Guide
Searching...
No Matches
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
17namespace ROOT {
18
19namespace 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
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
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
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
60
61} // namespace Minuit2
62
63} // namespace ROOT
64
65#endif // ROOT_Minuit2_LaSum
#define OP_MIN(MT, MAT1, T)
Definition LaSum.h:55
#define OP_ADD1(MT, MAT1, T)
Definition LaSum.h:21
#define OP_SCALE1(MT, MAT1, T)
Definition LaSum.h:49
#define OP_SCALE(MT, MAT1, T)
Definition LaSum.h:43
Class describing a symmetric matrix of size n.
Definition LASymMatrix.h:45
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...