ROOT   Reference Guide
ABSum.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_ABSum
11#define ROOT_Minuit2_ABSum
12
13#include "Minuit2/ABObj.h"
14
15namespace ROOT {
16
17namespace Minuit2 {
18
19template <class M1, class M2>
20class ABSum {
21
22private:
23 ABSum() : fA(M1()), fB(M2()) {}
24
25 ABSum &operator=(const ABSum &) { return *this; }
26
27 template <class MI1, class MI2>
29 {
30 return *this;
31 }
32
33public:
34 ABSum(const M1 &a, const M2 &b) : fA(a), fB(b) {}
35
36 ~ABSum() {}
37
38 ABSum(const ABSum &sum) : fA(sum.fA), fB(sum.fB) {}
39
40 template <class MI1, class MI2>
41 ABSum(const ABSum<MI1, MI2> &sum) : fA(M1(sum.A())), fB(M2(sum.B()))
42 {
43 }
44
45 const M1 &A() const { return fA; }
46 const M2 &B() const { return fB; }
47
48private:
49 M1 fA;
50 M2 fB;
51};
52
53// ABObj + ABObj
54template <class atype, class A, class btype, class B, class T>
57{
58
61}
62
63// ABObj - ABObj
64template <class atype, class A, class btype, class B, class T>
65inline ABObj<typename AlgebraicSumType<atype, btype>::Type, ABSum<ABObj<atype, A, T>, ABObj<btype, B, T>>, T>
67{
68
71}
72
73} // namespace Minuit2
74
75} // namespace ROOT
76
77#endif // ROOT_Minuit2_ABSum
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
const M1 & A() const
Definition: ABSum.h:45
ABSum(const ABSum< MI1, MI2 > &sum)
Definition: ABSum.h:41
const M2 & B() const
Definition: ABSum.h:46
ABSum & operator=(const ABSum< MI1, MI2 > &)
Definition: ABSum.h:28
ABSum & operator=(const ABSum &)
Definition: ABSum.h:25
ABSum(const M1 &a, const M2 &b)
Definition: ABSum.h:34
ABSum(const ABSum &sum)
Definition: ABSum.h:38
double T(double x)
Definition: ChebyshevPol.h:34
ABObj< typename AlgebraicSumType< atype, btype >::Type, ABSum< ABObj< atype, A, T >, ABObj< btype, B, T > >, T > operator+(const ABObj< atype, A, T > &a, const ABObj< btype, B, T > &b)
Definition: ABSum.h:56
ABObj< mt, M, T > operator-(const M &obj)
Definition: ABObj.h:149
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
TArc a
Definition: textangle.C:12