```
Parametric Function class describing polynomials of order n.

<em>P(x) = p[0] + p[1]*x + p[2]*x**2 + ....... + p[n]*x**n</em>

The class implements also the derivatives, \a dP(x)/dx and the \a dP(x)/dp[i].

The class provides also the method to find the roots of the polynomial.
It uses analytical methods up to quartic polynomials.

Implements both the Parameteric function interface and the gradient interface
since it provides the analytical gradient with respect to x

@ingroup ParamFunc

```

## Function Members (Methods)

public:
private:
 virtual double DoDerivative(double x) const virtual double DoEvalPar(double x, const double* p) const virtual double DoParameterDerivative(double x, const double* p, unsigned int ipar) const

## Data Members

protected:
private:
 vector fDerived_params unsigned int fOrder vector > fRoots

## Function documentation

Polynomial(unsigned int n = 0)
```      Construct a Polynomial function of order n.
The number of Parameters is n+1.

```
Polynomial(double a, double b)
```      Construct a Polynomial of degree  1 : a*x + b

```
Polynomial(double a, double b, double c)
```      Construct a Polynomial of degree  2 : a*x**2 + b*x + c

```
Polynomial(double a, double b, double c, double d)
```      Construct a Polynomial of degree  3 : a*x**3 + b*x**2 + c*x + d

```
Polynomial(double a, double b, double c, double d, double e)
```      Construct a Polynomial of degree  4 : a*x**4 + b*x**3 + c*x**2 + dx  + e

```
virtual ~Polynomial()
`{}`
const std::vector<std::complex <double> > & FindRoots()
``` use default copy-ctor and assignment operators
using ParamFunction::operator();

Find the polynomial roots.
For n <= 4, the roots are found analytically while for larger order an iterative numerical method is used
The numerical method used is from GSL (see <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_6.html#SEC53" )

```
std::vector<double > FindRealRoots()
```      Find the only the real polynomial roots.
For n <= 4, the roots are found analytically while for larger order an iterative numerical method is used
The numerical method used is from GSL (see <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_6.html#SEC53" )

```
const std::vector<std::complex <double> > & FindNumRoots()
```      Find the polynomial roots using always an iterative numerical methods
The numerical method used is from GSL (see <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_6.html#SEC53" )

```
unsigned int Order() const
```      Order of Polynomial

```
`{ return fOrder; }`
IGenFunction * Clone() const
double DoEvalPar(double x, const double* p) const
double DoDerivative(double x) const
double DoParameterDerivative(double x, const double* p, unsigned int ipar) const