BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ROOT::Minuit2::FCNGradientBase Class Referenceabstract

Description

Extension of the FCNBase for providing the analytical Gradient of the function. The user-Gradient is checked at the beginning of the minimization against the Minuit internal numerical Gradient in order to spot problems in the analytical Gradient calculation. This can be turned off by overriding CheckGradient() to make it return "false". The size of the output Gradient vector must be equal to the size of the input Parameter vector. Minuit does a check of the user Gradient at the beginning, if this is not wanted the method "CheckGradient()" has to be overridden to return "false".

Definition at line 32 of file FCNGradientBase.h.

Inheritance diagram for ROOT::Minuit2::FCNGradientBase:
[legend]
Collaboration diagram for ROOT::Minuit2::FCNGradientBase:
[legend]

Public Member Functions

virtual ~FCNGradientBase ()
 
virtual bool CheckGradient () const
 
virtual double ErrorDef () const
 
virtual std::vector< double > Gradient (const std::vector< double > &) const =0
 
virtual double operator() (const std::vector< double > &x) const =0
 
virtual void SetErrorDef (double)
 
virtual double Up () const =0
 

Constructor & Destructor Documentation

◆ ~FCNGradientBase()

virtual ROOT::Minuit2::FCNGradientBase::~FCNGradientBase ( )
inlinevirtual

Definition at line 36 of file FCNGradientBase.h.

36 {}

Member Function Documentation

◆ CheckGradient()

virtual bool ROOT::Minuit2::FCNGradientBase::CheckGradient ( ) const
inlinevirtual

Reimplemented in ROOT::Minuit2::FCNGradAdapter< Function >.

Definition at line 40 of file FCNGradientBase.h.

40 {return true;}

◆ ErrorDef()

virtual double ROOT::Minuit2::FCNBase::ErrorDef ( ) const
inlinevirtualinherited

Error definition of the function. MINUIT defines Parameter errors as the change in Parameter Value required to change the function Value by up. Normally, for chisquared fits it is 1, and for negative log likelihood, its Value is 0.5. If the user wants instead the 2-sigma errors for chisquared fits, it becomes 4, as Chi2(x+n*sigma) = Chi2(x) + n*n.

Comment a little bit better with links!!!!!!!!!!!!!!!!!

Definition at line 93 of file FCNBase.h.

93 {return Up();}
virtual double Up() const =0

References ROOT::Minuit2::FCNBase::Up().

Here is the call graph for this function:

◆ Gradient()

virtual std::vector<double> ROOT::Minuit2::FCNGradientBase::Gradient ( const std::vector< double > &  ) const
pure virtual

◆ operator()()

virtual double ROOT::Minuit2::FCNBase::operator() ( const std::vector< double > &  x) const
pure virtualinherited

The meaning of the vector of parameters is of course defined by the user, who uses the values of those parameters to calculate their function Value. The order and the position of these parameters is strictly the one specified by the user when supplying the starting values for minimization. The starting values must be specified by the user, either via an std::vector<double> or the MnUserParameters supplied as input to the MINUIT minimizers such as VariableMetricMinimizer or MnMigrad. Later values are determined by MINUIT as it searches for the Minimum or performs whatever analysis is requested by the user.

Parameters
parfunction parameters as defined by the user.
Returns
the Value of the function.
See also
MnUserParameters
VariableMetricMinimizer
MnMigrad

Implements ROOT::Minuit2::GenericFunction.

Implemented in ROOT::Minuit2::ParametricFunction, ROOT::Minuit2::FumiliFCNAdapter< Function >, ROOT::Minuit2::FCNGradAdapter< Function >, ROOT::Minuit2::FCNAdapter< Function >, ROOT::Minuit2::FumiliMaximumLikelihoodFCN, and ROOT::Minuit2::FumiliChi2FCN.

◆ SetErrorDef()

virtual void ROOT::Minuit2::FCNBase::SetErrorDef ( double  )
inlinevirtualinherited

add interface to set dynamically a new error definition Re-implement this function if needed.

Reimplemented in ROOT::Minuit2::FumiliFCNAdapter< Function >, and ROOT::Minuit2::FCNAdapter< Function >.

Definition at line 114 of file FCNBase.h.

114 {};

◆ Up()

virtual double ROOT::Minuit2::FCNBase::Up ( ) const
pure virtualinherited

Error definition of the function. MINUIT defines Parameter errors as the change in Parameter Value required to change the function Value by up. Normally, for chisquared fits it is 1, and for negative log likelihood, its Value is 0.5. If the user wants instead the 2-sigma errors for chisquared fits, it becomes 4, as Chi2(x+n*sigma) = Chi2(x) + n*n.

Todo:
Comment a little bit better with links!!!!!!!!!!!!!!!!! Idem for ErrorDef()

Implemented in ROOT::Minuit2::FumiliMaximumLikelihoodFCN, ROOT::Minuit2::FumiliFCNAdapter< Function >, ROOT::Minuit2::FumiliChi2FCN, ROOT::Minuit2::FCNGradAdapter< Function >, and ROOT::Minuit2::FCNAdapter< Function >.

Referenced by ROOT::Minuit2::FCNBase::ErrorDef().


The documentation for this class was generated from the following file: