BasicFCN class: base class for the objective functions used in the fits It has a reference to the data and the model function used in the fit.
It cannot be instantiated but constructed from the derived classes
Definition at line 40 of file BasicFCN.h.
Public Member Functions | |
virtual const DataType & | Data () const |
access to const reference to the data | |
std::shared_ptr< DataType > | DataPtr () const |
access to data pointer | |
virtual bool | HasHessian () const |
flag to indicate if can compute Hessian | |
virtual const IModelFunction & | ModelFunction () const |
access to const reference to the model function | |
std::shared_ptr< IModelFunction > | ModelFunctionPtr () const |
access to function pointer | |
Public Member Functions inherited from ROOT::Math::BasicFitMethodFunction< DerivFunType > | |
BasicFitMethodFunction (int dim, int npoint) | |
~BasicFitMethodFunction () override | |
Virtual Destructor (no operations) | |
virtual double | DataElement (const double *x, unsigned int i, double *g=nullptr, double *h=nullptr, bool fullHessian=false) 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. | |
virtual bool | G2 (const double *, double *) const |
Computes the Second derivatives. | |
virtual bool | Hessian (const double *x, double *hess) const |
Computes the full Hessian. | |
bool | IsAGradFCN () |
virtual unsigned int | NCalls () const |
return the total number of function calls (override if needed) | |
unsigned int | NDim () const override |
Number of dimension (parameters) . | |
virtual unsigned int | NPoints () const |
return the number of data points used in evaluating the function | |
virtual void | ResetNCalls () |
reset number of function calls | |
virtual Type_t | Type () const |
return the type of method, override if needed | |
virtual void | UpdateNCalls () const |
update number of calls | |
Protected Types | |
typedef BaseObjFunction::BaseFunction | BaseFunction |
typedef ::ROOT::Math::BasicFitMethodFunction< DerivFunType > | BaseObjFunction |
typedef ::ROOT::Math::IParametricGradFunctionMultiDimTempl< T > | IGradModelFunction |
typedef ::ROOT::Math::IParamMultiFunctionTempl< T > | IModelFunction |
typedef ModelFunType::BackendType | T |
Protected Member Functions | |
BasicFCN (const std::shared_ptr< DataType > &data, const std::shared_ptr< IModelFunction > &func) | |
Constructor from data set and model function. | |
virtual | ~BasicFCN () |
Destructor (no operations) | |
void | SetData (const std::shared_ptr< DataType > &data) |
Set the data pointer. | |
void | SetModelFunction (const std::shared_ptr< IModelFunction > &func) |
Set the function pointer. | |
Protected Attributes | |
std::shared_ptr< DataType > | fData |
std::shared_ptr< IModelFunction > | fFunc |
Additional Inherited Members | |
Public Types inherited from ROOT::Math::BasicFitMethodFunction< DerivFunType > | |
typedef FunctionType::BaseFunc | BaseFunction |
enum | Type_t |
enumeration specifying the possible fit method types More... | |
Static Public Member Functions inherited from ROOT::Math::BasicFitMethodFunction< DerivFunType > | |
static bool | IsAGradFCN () |
Static function to indicate if a function is supporting gradient. | |
#include <Fit/BasicFCN.h>
|
protected |
Definition at line 47 of file BasicFCN.h.
|
protected |
Definition at line 46 of file BasicFCN.h.
|
protected |
Definition at line 50 of file BasicFCN.h.
|
protected |
Definition at line 49 of file BasicFCN.h.
|
protected |
Definition at line 44 of file BasicFCN.h.
|
inlineprotected |
Constructor from data set and model function.
Definition at line 55 of file BasicFCN.h.
|
inlineprotectedvirtual |
Destructor (no operations)
Definition at line 66 of file BasicFCN.h.
|
inlinevirtual |
access to const reference to the data
Definition at line 72 of file BasicFCN.h.
|
inline |
access to data pointer
Definition at line 75 of file BasicFCN.h.
|
inlinevirtual |
flag to indicate if can compute Hessian
Reimplemented from ROOT::Math::BasicFitMethodFunction< DerivFunType >.
Definition at line 84 of file BasicFCN.h.
|
inlinevirtual |
access to const reference to the model function
Definition at line 78 of file BasicFCN.h.
|
inline |
access to function pointer
Definition at line 81 of file BasicFCN.h.
|
inlineprotected |
Set the data pointer.
Definition at line 98 of file BasicFCN.h.
|
inlineprotected |
Set the function pointer.
Definition at line 101 of file BasicFCN.h.
|
protected |
Definition at line 104 of file BasicFCN.h.
|
protected |
Definition at line 105 of file BasicFCN.h.