BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
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
namespace
ROOT
{
16
17
namespace
Minuit2 {
18
19
//________________________________________________________________________
20
/** Extension of the FCNBase for providing the analytical Gradient of the
21
function. The user-Gradient is checked at the beginning of the
22
minimization against the Minuit internal numerical Gradient in order to
23
spot problems in the analytical Gradient calculation. This can be turned
24
off by overriding CheckGradient() to make it return "false".
25
The size of the output Gradient vector must be equal to the size of the
26
input Parameter vector.
27
Minuit does a check of the user Gradient at the beginning, if this is not
28
wanted the method "CheckGradient()" has to be overridden to return
29
"false".
30
*/
31
32
class
FCNGradientBase
:
public
FCNBase
{
33
34
public
:
35
36
virtual
~FCNGradientBase
() {}
37
38
virtual
std::vector<double>
Gradient
(
const
std::vector<double>&)
const
= 0;
39
40
virtual
bool
CheckGradient
()
const
{
return
true
;}
41
42
};
43
44
}
// namespace Minuit2
45
46
}
// namespace ROOT
47
48
#endif
// ROOT_Minuit2_FCNGradientBase
FCNBase.h
ROOT::Minuit2::FCNBase
Definition:
FCNBase.h:47
ROOT::Minuit2::FCNGradientBase
Definition:
FCNGradientBase.h:32
ROOT::Minuit2::FCNGradientBase::Gradient
virtual std::vector< double > Gradient(const std::vector< double > &) const =0
ROOT::Minuit2::FCNGradientBase::~FCNGradientBase
virtual ~FCNGradientBase()
Definition:
FCNGradientBase.h:36
ROOT::Minuit2::FCNGradientBase::CheckGradient
virtual bool CheckGradient() const
Definition:
FCNGradientBase.h:40
ROOT
Definition:
TUUID.h:7
Fit
3rdparty
RootMinimizers
Minuit2
FCNGradientBase.h
Generated by
1.9.1