ROOT logo
ROOT » HIST » HIST » ROOT::Math::WrappedMultiTF1

class ROOT::Math::WrappedMultiTF1: public ROOT::Math::IParametricGradFunctionMultiDim

Function Members (Methods)

public:
virtual~WrappedMultiTF1()
virtual ROOT::Math::IMultiGenFunction*Clone() const
static doubleGetDerivPrecision()
virtual unsigned intNDim() const
virtual unsigned intNPar() const
doubleROOT::Math::IParametricFunctionMultiDim::operator()(const double* x, const double* p) const
ROOT::Math::WrappedMultiTF1&operator=(const ROOT::Math::WrappedMultiTF1& rhs)
doubleROOT::Math::IParametricGradFunctionMultiDim::ParameterDerivative(const double* x, unsigned int ipar = 0) const
doubleROOT::Math::IParametricGradFunctionMultiDim::ParameterDerivative(const double* x, const double* p, unsigned int ipar = 0) const
virtual voidParameterGradient(const double* x, const double* par, double* grad) const
virtual stringParameterName(unsigned int i) const
virtual const double*Parameters() const
static voidSetDerivPrecision(double eps)
virtual voidSetParameters(const double* p)
ROOT::Math::WrappedMultiTF1WrappedMultiTF1(const ROOT::Math::WrappedMultiTF1& rhs)
ROOT::Math::WrappedMultiTF1WrappedMultiTF1(TF1& f, unsigned int dim = 0)
private:
virtual doubleDoEvalPar(const double* x, const double* p) const
virtual doubleDoParameterDerivative(const double* x, const double* p, unsigned int ipar) const

Data Members

private:
unsigned intfDimcached value of dimension
TF1*fFuncpointer to ROOT function
boolfLinearflag for linear functions
vector<double>fParamscached vector with parameter values
boolfPolynomialflag for polynomial functions
static doublefgEpsepsilon used in derivative calculation h ~ eps |p|

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

WrappedMultiTF1(TF1& f, unsigned int dim = 0)
      constructor from a function pointer to a TF1
      If dim = 0 dimension is taken from TF1::GetNdim().
      IN case of multi-dimensional function created using directly TF1 object the dimension
      returned by TF1::GetNdim is always 1. The user must then pass the correct value of dim

virtual ~WrappedMultiTF1()
      Destructor (no operations). Function pointer is not owned

{}
WrappedMultiTF1(const ROOT::Math::WrappedMultiTF1& rhs)
      Copy constructor

IMultiGenFunction * Clone() const
 @name interface inherited from IFunction 

       Clone the wrapper but not the original function

unsigned int NDim() const
 function dimension
const double * Parameters() const
 @name interface inherited from IParamFunction 
 get the parameter values (return values cached inside, those inside TF1 might be different)
void SetParameters(const double* p)
 set parameter values (only the cached one in this class,leave unchanges those of TF1)
unsigned int NPar() const
 return number of parameters
std::string ParameterName(unsigned int i) const
 return parameter name (from TF1)
void ParameterGradient(const double* x, const double* par, double* grad) const
 evaluate the derivative of the function with respect to the parameters
void SetDerivPrecision(double eps)
 precision value used for calculating the derivative step-size
 h = eps * |x|. The default is 0.001, give a smaller in case function changes rapidly
double GetDerivPrecision()
 get precision value used for calculating the derivative step-size
double DoEvalPar(const double* x, const double* p) const
 evaluate function passing coordinates x and vector of parameters
double DoParameterDerivative(const double* x, const double* p, unsigned int ipar) const
 evaluate the partial derivative with respect to the parameter