BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Chi2FCN class for binnned fits using the least square methods
Public Types | |
typedef BasicFCN< DerivFunType, ModelFunType, BinData > | BaseFCN |
typedef BaseObjFunction::BaseFunction | BaseFunction |
typedef ::ROOT::Math::BasicFitMethodFunction< DerivFunType > | BaseObjFunction |
typedef ::ROOT::Math::IParamMultiFunctionTempl< T > | IModelFunction |
typedef ModelFunType::BackendType | T |
typedef BaseObjFunction::Type_t | Type_t |
Public Member Functions | |
Chi2FCN (const BinData &data, const IModelFunction &func, const ::ROOT::Fit::ExecutionPolicy &executionPolicy=::ROOT::Fit::ExecutionPolicy::kSerial) | |
Chi2FCN (const Chi2FCN &f) | |
Chi2FCN (const std::shared_ptr< BinData > &data, const std::shared_ptr< IModelFunction > &func, const ::ROOT::Fit::ExecutionPolicy &executionPolicy=::ROOT::Fit::ExecutionPolicy::kSerial) | |
virtual | ~Chi2FCN () |
virtual BaseFunction * | Clone () const |
virtual double | DataElement (const double *x, unsigned int i, double *g) const |
i-th chi-square residual More... | |
virtual void | Gradient (const double *x, double *g) const |
Chi2FCN & | operator= (const Chi2FCN &rhs) |
virtual BaseObjFunction::Type_t | Type () const |
get type of fit method function More... | |
Protected Member Functions | |
virtual void | SetNFitPoints (unsigned int n) const |
set number of fit points (need to be called in const methods, make it const) More... | |
Private Member Functions | |
virtual double | DoDerivative (const double *x, unsigned int icoord) const |
virtual double | DoEval (const double *x) const |
Private Attributes | |
::ROOT::Fit::ExecutionPolicy | fExecutionPolicy |
std::vector< double > | fGrad |
unsigned int | fNEffPoints |
typedef BasicFCN<DerivFunType, ModelFunType, BinData> ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::BaseFCN |
typedef BaseObjFunction::BaseFunction ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::BaseFunction |
typedef ::ROOT::Math::BasicFitMethodFunction<DerivFunType> ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::BaseObjFunction |
typedef ::ROOT::Math::IParamMultiFunctionTempl<T> ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::IModelFunction |
typedef ModelFunType::BackendType ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::T |
typedef BaseObjFunction::Type_t ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::Type_t |
|
inline |
Constructor from data set (binned ) and model function
Definition at line 66 of file Chi2FCN.h.
Referenced by ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::Clone().
|
inline |
Same Constructor from data set (binned ) and model function but now managed by the user we clone the function but not the data
Definition at line 77 of file Chi2FCN.h.
|
inlinevirtual |
|
inline |
|
inlinevirtual |
Definition at line 111 of file Chi2FCN.h.
References ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::Chi2FCN().
|
inlinevirtual |
i-th chi-square residual
Definition at line 121 of file Chi2FCN.h.
References ROOT::Fit::FitUtil::Evaluate< T >::EvalChi2Residual().
|
inlineprivatevirtual |
Definition at line 156 of file Chi2FCN.h.
References ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::fGrad, and ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::Gradient().
|
inlineprivatevirtual |
Evaluation of the function (required by interface)
Definition at line 147 of file Chi2FCN.h.
References ROOT::Fit::FitUtil::Evaluate< T >::EvalChi2(), ROOT::Fit::FitUtil::Evaluate< T >::EvalChi2Effective(), ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::fExecutionPolicy, and ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::fNEffPoints.
|
inlinevirtual |
Definition at line 127 of file Chi2FCN.h.
References ROOT::Fit::FitUtil::Evaluate< T >::EvalChi2Gradient(), ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::fExecutionPolicy, and ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::fNEffPoints.
Referenced by ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::DoDerivative().
|
inline |
Assignment operator
Definition at line 101 of file Chi2FCN.h.
References ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::fGrad, and ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::fNEffPoints.
|
inlineprotectedvirtual |
set number of fit points (need to be called in const methods, make it const)
Definition at line 140 of file Chi2FCN.h.
References ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::fNEffPoints.
|
inlinevirtual |
get type of fit method function
Definition at line 134 of file Chi2FCN.h.
References ROOT::Math::BasicFitMethodFunction< FunctionType >::kLeastSquare.
|
private |
Definition at line 165 of file Chi2FCN.h.
Referenced by ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::DoEval(), and ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::Gradient().
|
mutableprivate |
Definition at line 164 of file Chi2FCN.h.
Referenced by ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::DoDerivative(), and ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::operator=().
|
mutableprivate |
Definition at line 162 of file Chi2FCN.h.
Referenced by ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::DoEval(), ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::Gradient(), ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::operator=(), and ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::SetNFitPoints().