#ifndef ROOT_Math_FitMethodFunction
#define ROOT_Math_FitMethodFunction
#ifndef ROOT_Math_IFunction
#include "Math/IFunction.h"
#endif
namespace ROOT {
namespace Math {
template<class FunctionType>
class BasicFitMethodFunction : public FunctionType {
public:
typedef typename FunctionType::BaseFunc BaseFunction;
enum Type_t { kUndefined , kLeastSquare, kLogLikelihood };
BasicFitMethodFunction(int dim, int npoint) :
fNDim(dim),
fNPoints(npoint),
fNCalls(0)
{}
virtual ~BasicFitMethodFunction () {}
virtual unsigned int NDim() const { return fNDim; }
virtual double DataElement(const double *x, unsigned int i, double *g = 0) const = 0;
virtual unsigned int NPoints() const { return fNPoints; }
virtual Type_t Type() const { return kUndefined; }
virtual unsigned int NCalls() const { return fNCalls; }
virtual void UpdateNCalls() const { fNCalls++; }
virtual void ResetNCalls() { fNCalls = 0; }
public:
protected:
private:
unsigned int fNDim;
unsigned int fNPoints;
mutable unsigned int fNCalls;
};
typedef BasicFitMethodFunction<ROOT::Math::IMultiGenFunction> FitMethodFunction;
typedef BasicFitMethodFunction<ROOT::Math::IMultiGradFunction> FitMethodGradFunction;
}
}
#endif /* ROOT_Math_FitMethodFunction */
Last change: Mon Dec 1 17:06:09 2008
Last generated: 2008-12-01 17:06
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.