Logo ROOT  
Reference Guide
FCNGradientBase.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_FCNGradientBase
11 #define ROOT_Minuit2_FCNGradientBase
12 
13 #include "Minuit2/FCNBase.h"
14 
15 #include <vector>
16 
17 namespace ROOT {
18 
19  namespace Minuit2 {
20 
21 //________________________________________________________________________
22 /** Extension of the FCNBase for providing the analytical Gradient of the
23  function. The user-Gradient is checked at the beginning of the
24  minimization against the Minuit internal numerical Gradient in order to
25  spot problems in the analytical Gradient calculation. This can be turned
26  off by overriding CheckGradient() to make it return "false".
27  The size of the output Gradient vector must be equal to the size of the
28  input Parameter vector.
29  Minuit does a check of the user Gradient at the beginning, if this is not
30  wanted the method "CheckGradient()" has to be overridden to return
31  "false".
32  */
33 
34 class FCNGradientBase : public FCNBase {
35 
36 public:
37 
38  virtual ~FCNGradientBase() {}
39 
40  virtual std::vector<double> Gradient(const std::vector<double>&) const = 0;
41 
42  virtual bool CheckGradient() const {return true;}
43 
44 };
45 
46  } // namespace Minuit2
47 
48 } // namespace ROOT
49 
50 #endif // ROOT_Minuit2_FCNGradientBase
ROOT::Minuit2::FCNGradientBase::CheckGradient
virtual bool CheckGradient() const
Definition: FCNGradientBase.h:54
ROOT::Minuit2::FCNGradientBase::Gradient
virtual std::vector< double > Gradient(const std::vector< double > &) const =0
FCNBase.h
ROOT::Minuit2::FCNGradientBase::~FCNGradientBase
virtual ~FCNGradientBase()
Definition: FCNGradientBase.h:50
ROOT
VSD Structures.
Definition: StringConv.hxx:21