Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
MnFcn.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_MnFcn
11#define ROOT_Minuit2_MnFcn
12
13#include "Minuit2/MnConfig.h"
14#include "Minuit2/MnMatrix.h"
15
16namespace ROOT {
17
18namespace Minuit2 {
19
20class FCNBase;
21/**
22 Wrapper class to FCNBase interface used internally by Minuit.
23 Apply conversion from calling the function from a Minuit Vector (MnAlgebraicVector) to a std::vector for
24 the function coordinates.
25 The class counts also the number of function calls. By default counter start from zero, but a different value
26 might be given if the class is instantiated later on, for example for a set of different minimizaitons
27 Normally the derived class MnUserFCN should be instantiated with performs in addition the transformatiopn
28 internal-> external parameters
29 */
30class MnFcn {
31
32public:
33 /// constructor of
34 explicit MnFcn(const FCNBase &fcn, int ncall = 0) : fFCN(fcn), fNumCall(ncall) {}
35
36 virtual ~MnFcn();
37
38 virtual double operator()(const MnAlgebraicVector &) const;
39 unsigned int NumOfCalls() const { return fNumCall; }
40
41 //
42 // forward interface
43 //
44 double ErrorDef() const;
45 double Up() const;
46
47 const FCNBase &Fcn() const { return fFCN; }
48
49private:
50 const FCNBase &fFCN;
51
52protected:
53 mutable int fNumCall;
54};
55
56} // namespace Minuit2
57
58} // namespace ROOT
59
60#endif // ROOT_Minuit2_MnFcn
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition FCNBase.h:51
Wrapper class to FCNBase interface used internally by Minuit.
Definition MnFcn.h:30
const FCNBase & fFCN
Definition MnFcn.h:50
double Up() const
Definition MnFcn.cxx:39
virtual ~MnFcn()
Definition MnFcn.cxx:18
virtual double operator()(const MnAlgebraicVector &) const
Definition MnFcn.cxx:23
MnFcn(const FCNBase &fcn, int ncall=0)
constructor of
Definition MnFcn.h:34
const FCNBase & Fcn() const
Definition MnFcn.h:47
double ErrorDef() const
Definition MnFcn.cxx:34
unsigned int NumOfCalls() const
Definition MnFcn.h:39
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...