Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Functions
MathPoly::detail Namespace Reference

Functions

void EvaluatePolynomialWithDerivatives (const double *theCoeffs, int theDegree, std::complex< double > theX, std::complex< double > &theP, std::complex< double > &theDP, std::complex< double > &theD2P)
 Evaluate polynomial and its first two derivatives at x (complex version). Polynomial: c[n]*x^n + c[n-1]*x^(n-1) + ... + c[1]*x + c[0].
 
std::complex< doubleLaguerreIteration (const double *theCoeffs, int theDegree, std::complex< double > theX0, double theTol, int theMaxIter)
 Laguerre iteration to find one root of polynomial.
 
void DeflateReal (double *theCoeffs, int &theDegree, double theRoot)
 Deflate polynomial by removing a real root. Divides p(x) by (x - root) to get q(x).
 
void DeflateComplex (double *theCoeffs, int &theDegree, std::complex< double > theRoot)
 Deflate polynomial by removing a complex conjugate pair. Divides p(x) by (x^2 + b*x + c) where b = -2*Re(root), c = |root|^2.
 
double RefineRealRoot (const double *theOrigCoeffs, int theOrigDegree, double theRoot)
 Refine a real root using Newton-Raphson.
 

Function Documentation

◆ DeflateComplex()

void MathPoly::detail::DeflateComplex ( double * theCoeffs,
int & theDegree,
std::complex< double > theRoot )
inline

Deflate polynomial by removing a complex conjugate pair. Divides p(x) by (x^2 + b*x + c) where b = -2*Re(root), c = |root|^2.

Parameters
theCoeffsinput coefficients, output deflated coefficients
theDegreepolynomial degree (will be decremented by 2)
theRootcomplex root (its conjugate is also removed)

◆ DeflateReal()

void MathPoly::detail::DeflateReal ( double * theCoeffs,
int & theDegree,
double theRoot )
inline

Deflate polynomial by removing a real root. Divides p(x) by (x - root) to get q(x).

Parameters
theCoeffsinput coefficients, output deflated coefficients
theDegreepolynomial degree (will be decremented)
theRootroot to remove

◆ EvaluatePolynomialWithDerivatives()

void MathPoly::detail::EvaluatePolynomialWithDerivatives ( const double * theCoeffs,
int theDegree,
std::complex< double > theX,
std::complex< double > & theP,
std::complex< double > & theDP,
std::complex< double > & theD2P )
inline

Evaluate polynomial and its first two derivatives at x (complex version). Polynomial: c[n]*x^n + c[n-1]*x^(n-1) + ... + c[1]*x + c[0].

Parameters
theCoeffscoefficients array (c[0] = constant term)
theDegreepolynomial degree
theXevaluation point
thePoutput: polynomial value P(x)
theDPoutput: first derivative P'(x)
theD2Poutput: second derivative P''(x)

◆ LaguerreIteration()

std::complex< double > MathPoly::detail::LaguerreIteration ( const double * theCoeffs,
int theDegree,
std::complex< double > theX0,
double theTol,
int theMaxIter )
inline

Laguerre iteration to find one root of polynomial.

Parameters
theCoeffscoefficients array
theDegreepolynomial degree
theX0initial guess
theTolconvergence tolerance
theMaxItermaximum iterations
Returns
refined root estimate

◆ RefineRealRoot()

double MathPoly::detail::RefineRealRoot ( const double * theOrigCoeffs,
int theOrigDegree,
double theRoot )
inline

Refine a real root using Newton-Raphson.