31#ifndef ROOT_Math_Polynomial
32#define ROOT_Math_Polynomial
119 std::vector<std::complex<double>>
FindRoots()
const;
147 void FdF (
double x,
double &
f,
double & df)
const override {
155 double DoEvalPar (
double x,
const double *
p )
const override ;
winID h TVirtualViewer3D TVirtualGLPainter p
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
double Derivative(double x) const
Return the derivative of the function at a point x Use the private method DoDerivative.
Interface (abstract class) for one-dimensional functions providing a gradient calculation.
Base template class for all Parametric Functions.
Parametric Function class describing polynomials of order n.
std::vector< std::complex< double > > FindRoots() const
Find the polynomial roots.
Polynomial(unsigned int n=0)
Construct a Polynomial function of order n.
std::vector< std::complex< double > > FindNumRoots() const
Find the polynomial roots using always an iterative numerical methods The numerical method used is fr...
double DoEvalPar(double x, const double *p) const override
Implementation of the evaluation function using the x value and the parameters.
ParamFunction< IParamGradFunction > ParFunc
unsigned int Order() const
Order of Polynomial.
IGenFunction * Clone() const override
Clone a function.
double DoParameterDerivative(double x, const double *p, unsigned int ipar) const override
Evaluate the gradient, to be implemented by the derived classes.
double DoDerivative(double x) const override
Function to evaluate the derivative with respect each coordinate. To be implemented by the derived cl...
std::vector< double > FindRealRoots() const
Find the only the real polynomial roots.
std::vector< double > fDerived_params
void FdF(double x, double &f, double &df) const override
Optimized method to evaluate at the same time the function value and derivative at a point x.
Namespace for new Math classes and functions.