Marine systems simulation
|
Class representing a general polynomial with complex coefficients. More...
#include <PolynomialTools.h>
Public Member Functions | |
void | Evaluate (ComplexDouble x, ComplexDouble &fx, ComplexDouble &dfx, ComplexDouble &ddfx, double &err) |
void | ExtractRoot (ComplexDouble root, ComplexPolynomial< N-1 > &Factor) |
ComplexDouble | LaguerreIteration (const ComplexDouble &FX, const ComplexDouble &DFX, const ComplexDouble &DDFX) |
int | FindRoots (ComplexDouble X0, ComplexDouble *roots) |
int | FindRootsHQ (ComplexDouble X0, ComplexDouble *roots) |
Public Attributes | |
ComplexDouble | C [N+1] |
The main purpose of the class is polynomial root finding. A fairly robust and accurate numerical root finder (Laguerre's method) is implemented. The method finds all complex and real roots.
|
inline |
Evaluates the polynomial and its first two derivatives in the point 'x' Also makes an estimate of the numerical roundoff error bound
|
inline |
Factors out the given root from the polynomial, and writes the result to 'Factor' The 'root' is assumed to be a true root of the polynomial. If this is not the case, results are undefined.
|
inline |
Finds all complex roots of the polynomial. 'X0' is the suggested starting iteration value.
|
inline |
Finds all complex roots of the polynomial. 'X0' is the suggested starting iteration value. Performs backwards adjustments of roots found by lower order polynomials. Recommended for high order polynomials with very strict accuracy requirements.
|
inline |
Computes the step from one iteration of Laguerre's method of polynomial root finding.