#include <Polynomial.h>


Public Member Functions | |
| Polynomial (unsigned int n=0) | |
| Construct a Polynomial function of order n. | |
| 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 () |
| double | operator() (double x, const double *p) |
| Copy constructor. | |
| const std::vector < std::complex < double > > & | FindRoots () |
| Find the polynomial roots. | |
| std::vector< double > | FindRealRoots () |
| Find the only the real polynomial roots. | |
| 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. | |
| IGenFunction * | Clone () const |
| Clone a function. | |
P(x) = p[0] + p[1]*x + p[2]*x**2 + ....... + p[n]*x**n
The class implements also the derivatives, dP(x)/dx and the 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.
Definition at line 56 of file Polynomial.h.
| ROOT::Math::Polynomial::Polynomial | ( | unsigned int | n = 0 |
) |
Construct a Polynomial function of order n.
The number of Parameters is n+1.
Definition at line 50 of file Polynomial.cxx.
Referenced by Clone().
| ROOT::Math::Polynomial::Polynomial | ( | double | a, | |
| double | b | |||
| ) |
Construct a Polynomial of degree 1 : a*x + b.
Definition at line 59 of file Polynomial.cxx.
References ROOT::Math::ParamFunction::fParams.
| ROOT::Math::Polynomial::Polynomial | ( | double | a, | |
| double | b, | |||
| double | c | |||
| ) |
Construct a Polynomial of degree 2 : a*x**2 + b*x + c.
Definition at line 69 of file Polynomial.cxx.
References ROOT::Math::ParamFunction::fParams.
| ROOT::Math::Polynomial::Polynomial | ( | double | a, | |
| double | b, | |||
| double | c, | |||
| double | d | |||
| ) |
Construct a Polynomial of degree 3 : a*x**3 + b*x**2 + c*x + d.
Definition at line 80 of file Polynomial.cxx.
References ROOT::Math::ParamFunction::fParams.
| ROOT::Math::Polynomial::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.
Definition at line 93 of file Polynomial.cxx.
References ROOT::Math::ParamFunction::fParams.
| virtual ROOT::Math::Polynomial::~Polynomial | ( | ) | [inline, virtual] |
Definition at line 88 of file Polynomial.h.
| double ROOT::Math::Polynomial::operator() | ( | double | x, | |
| const double * | p | |||
| ) | [virtual] |
Copy constructor.
Copy operator
Reimplemented from ROOT::Math::IParametricFunctionOneDim.
Definition at line 127 of file Polynomial.cxx.
| const std::vector< std::complex< double > > & ROOT::Math::Polynomial::FindRoots | ( | ) |
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" )
Definition at line 162 of file Polynomial.cxx.
References FindNumRoots(), gsl_poly_complex_solve_quartic(), and ROOT::Math::ParamFunction::Parameters().
Referenced by FindRealRoots().
| std::vector< double > ROOT::Math::Polynomial::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" )
Definition at line 248 of file Polynomial.cxx.
References FindRoots().
| const std::vector< std::complex< double > > & ROOT::Math::Polynomial::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" ).
Definition at line 258 of file Polynomial.cxx.
References ROOT::Math::ParamFunction::Parameters().
Referenced by FindRoots().
| unsigned int ROOT::Math::Polynomial::Order | ( | ) | const [inline] |
| IGenFunction * ROOT::Math::Polynomial::Clone | ( | ) | const [virtual] |
Clone a function.
Each derived class will implement his version of the provate DoClone method
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 154 of file Polynomial.cxx.
References fDerived_params, ROOT::Math::ParamFunction::Parameters(), Polynomial(), and ROOT::Math::ParamFunction::SetParameters().
1.5.3