ROOT  6.06/09
Reference Guide
Public Types | Public Member Functions | Private Attributes | List of all members
ROOT::Math::BasicFitMethodFunction< FunctionType > Class Template Referenceabstract

template<class FunctionType>
class ROOT::Math::BasicFitMethodFunction< FunctionType >

FitMethodFunction class Interface for objective functions (like chi2 and likelihood used in the fit) In addition to normal function interface provide interface for calculating each data contrinution to the function which is required by some algorithm (like Fumili)

Definition at line 57 of file Fitter.h.

Public Types

enum  Type_t { kUndefined, kLeastSquare, kLogLikelihood }
 enumeration specyfing the possible fit method types More...
 
typedef FunctionType::BaseFunc BaseFunction
 

Public Member Functions

 BasicFitMethodFunction (int dim, int npoint)
 
virtual ~BasicFitMethodFunction ()
 Virtual Destructor (no operations) More...
 
virtual unsigned int NDim () const
 Number of dimension (parameters) . More...
 
virtual double DataElement (const double *x, unsigned int i, double *g=0) const =0
 method returning the data i-th contribution to the fit objective function For example the residual for the least square functions or the pdf element for the likelihood functions. More...
 
virtual unsigned int NPoints () const
 return the number of data points used in evaluating the function More...
 
virtual Type_t Type () const
 return the type of method, override if needed More...
 
virtual unsigned int NCalls () const
 return the total number of function calls (overrided if needed) More...
 
virtual void UpdateNCalls () const
 update number of calls More...
 
virtual void ResetNCalls ()
 reset number of function calls More...
 

Private Attributes

unsigned int fNDim
 
unsigned int fNPoints
 
unsigned int fNCalls
 

#include <Fit/Fitter.h>

+ Inheritance diagram for ROOT::Math::BasicFitMethodFunction< FunctionType >:
+ Collaboration diagram for ROOT::Math::BasicFitMethodFunction< FunctionType >:

Member Typedef Documentation

template<class FunctionType>
typedef FunctionType::BaseFunc ROOT::Math::BasicFitMethodFunction< FunctionType >::BaseFunction

Definition at line 43 of file FitMethodFunction.h.

Constructor & Destructor Documentation

template<class FunctionType>
ROOT::Math::BasicFitMethodFunction< FunctionType >::BasicFitMethodFunction ( int  dim,
int  npoint 
)
inline

Definition at line 49 of file FitMethodFunction.h.

template<class FunctionType>
virtual ROOT::Math::BasicFitMethodFunction< FunctionType >::~BasicFitMethodFunction ( )
inlinevirtual

Virtual Destructor (no operations)

Definition at line 58 of file FitMethodFunction.h.

Member Function Documentation

template<class FunctionType>
virtual double ROOT::Math::BasicFitMethodFunction< FunctionType >::DataElement ( const double x,
unsigned int  i,
double g = 0 
) const
pure virtual

method returning the data i-th contribution to the fit objective function For example the residual for the least square functions or the pdf element for the likelihood functions.

Estimating eventually also the gradient of the data element if the passed pointer is not null

Implemented in ROOT::Fit::Chi2FCN< FunType >, ROOT::Fit::LogLikelihoodFCN< FunType >, and ROOT::Fit::PoissonLikelihoodFCN< FunType >.

Referenced by ROOT::Math::LSResidualFunc::DoEval(), and TFumiliMinimizer::EvaluateFCN().

template<class FunctionType>
virtual unsigned int ROOT::Math::BasicFitMethodFunction< FunctionType >::NCalls ( ) const
inlinevirtual

return the total number of function calls (overrided if needed)

Definition at line 87 of file FitMethodFunction.h.

Referenced by ROOT::Fit::Fitter::GetNCallsFromFCN(), ROOT::Math::GSLNLSMinimizer::Minimize(), ROOT::Math::GSLMinimizer::NCalls(), and ROOT::Math::GSLNLSMinimizer::NCalls().

template<class FunctionType>
virtual unsigned int ROOT::Math::BasicFitMethodFunction< FunctionType >::NDim ( ) const
inlinevirtual

Number of dimension (parameters) .

From IGenMultiFunction interface

Definition at line 63 of file FitMethodFunction.h.

Referenced by TFumiliMinimizer::EvaluateFCN(), and ROOT::Math::LSResidualFunc::NDim().

template<class FunctionType>
virtual unsigned int ROOT::Math::BasicFitMethodFunction< FunctionType >::NPoints ( ) const
inlinevirtual

return the number of data points used in evaluating the function

Definition at line 77 of file FitMethodFunction.h.

Referenced by TFumiliMinimizer::EvaluateFCN(), ROOT::Fit::Fitter::SetFCN(), and ROOT::Math::GSLNLSMinimizer::SetFunction().

template<class FunctionType>
virtual void ROOT::Math::BasicFitMethodFunction< FunctionType >::ResetNCalls ( )
inlinevirtual

reset number of function calls

Definition at line 97 of file FitMethodFunction.h.

template<class FunctionType>
virtual Type_t ROOT::Math::BasicFitMethodFunction< FunctionType >::Type ( ) const
inlinevirtual
template<class FunctionType>
virtual void ROOT::Math::BasicFitMethodFunction< FunctionType >::UpdateNCalls ( ) const
inlinevirtual

update number of calls

Definition at line 92 of file FitMethodFunction.h.

Referenced by TFumiliMinimizer::EvaluateFCN().

Member Data Documentation

template<class FunctionType>
unsigned int ROOT::Math::BasicFitMethodFunction< FunctionType >::fNCalls
mutableprivate
template<class FunctionType>
unsigned int ROOT::Math::BasicFitMethodFunction< FunctionType >::fNDim
private
template<class FunctionType>
unsigned int ROOT::Math::BasicFitMethodFunction< FunctionType >::fNPoints
private

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