Logo ROOT  
Reference Guide
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 36 of file FitMethodFunction.h.

Public Types

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

Public Member Functions

 BasicFitMethodFunction (int dim, int npoint)
 
virtual ~BasicFitMethodFunction ()
 Virtual Destructor (no operations) 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 NCalls () const
 return the total number of function calls (overrided if needed) More...
 
virtual unsigned int NDim () const
 Number of dimension (parameters) . More...
 
virtual unsigned int NPoints () const
 return the number of data points used in evaluating the function More...
 
virtual void ResetNCalls ()
 reset number of function calls More...
 
virtual Type_t Type () const
 return the type of method, override if needed More...
 
virtual void UpdateNCalls () const
 update number of calls More...
 

Private Attributes

unsigned int fNCalls
 
unsigned int fNDim
 
unsigned int fNPoints
 

#include <Math/FitMethodFunction.h>

Inheritance diagram for ROOT::Math::BasicFitMethodFunction< FunctionType >:
[legend]

Member Typedef Documentation

◆ BaseFunction

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

Definition at line 41 of file FitMethodFunction.h.

Member Enumeration Documentation

◆ Type_t

enumeration specyfing the possible fit method types

Enumerator
kUndefined 
kLeastSquare 
kLogLikelihood 

Definition at line 44 of file FitMethodFunction.h.

Constructor & Destructor Documentation

◆ BasicFitMethodFunction()

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

Definition at line 47 of file FitMethodFunction.h.

◆ ~BasicFitMethodFunction()

Virtual Destructor (no operations)

Definition at line 56 of file FitMethodFunction.h.

Member Function Documentation

◆ DataElement()

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< DerivFunType, ModelFunType >, ROOT::Fit::LogLikelihoodFCN< DerivFunType, ModelFunType >, and ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >.

◆ NCalls()

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 85 of file FitMethodFunction.h.

◆ NDim()

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

Number of dimension (parameters) .

From IGenMultiFunction interface

Definition at line 61 of file FitMethodFunction.h.

◆ NPoints()

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 75 of file FitMethodFunction.h.

◆ ResetNCalls()

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

reset number of function calls

Definition at line 95 of file FitMethodFunction.h.

◆ Type()

◆ UpdateNCalls()

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

update number of calls

Definition at line 90 of file FitMethodFunction.h.

Member Data Documentation

◆ fNCalls

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

Definition at line 109 of file FitMethodFunction.h.

◆ fNDim

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

Definition at line 107 of file FitMethodFunction.h.

◆ fNPoints

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

Definition at line 108 of file FitMethodFunction.h.


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