![]() |
complex root finder for univariate polynomials based on laguers algorithm More...
#include <mpr_numeric.h>
Public Types | |
enum | rootType { none, cspecial, cspecialmu, det, onepoly } |
Public Member Functions | |
rootContainer () | |
~rootContainer () | |
void | fillContainer (number *_coeffs, number *_ievpoint, const int _var, const int _tdg, const rootType _rt, const int _anz) |
bool | solver (const int polishmode=PM_NONE) |
poly | getPoly () |
gmp_complex & | operator[] (const int i) |
gmp_complex & | evPointCoord (const int i) |
gmp_complex * | getRoot (const int i) |
bool | swapRoots (const int from, const int to) |
int | getAnzElems () |
int | getLDim () |
int | getAnzRoots () |
Private Member Functions | |
rootContainer (const rootContainer &v) | |
bool | laguer_driver (gmp_complex **a, gmp_complex **roots, bool polish=true) |
Given the degree tdg and the tdg+1 complex coefficients ad0..tdg of the polynomial this routine successively calls "laguer" and finds all m complex roots in roots[0..tdg]. More... | |
bool | isfloat (gmp_complex **a) |
void | divlin (gmp_complex **a, gmp_complex x, int j) |
void | divquad (gmp_complex **a, gmp_complex x, int j) |
void | solvequad (gmp_complex **a, gmp_complex **r, int &k, int &j) |
void | sortroots (gmp_complex **roots, int r, int c, bool isf) |
void | sortre (gmp_complex **r, int l, int u, int inc) |
void | laguer (gmp_complex **a, int m, gmp_complex *x, int *its, bool type) |
Given the degree m and the m+1 complex coefficients a[0..m] of the polynomial, and given the complex value x, this routine improves x by Laguerre's method until it converges, within the achievable roundoff limit, to a root of the given polynomial. More... | |
void | computefx (gmp_complex **a, gmp_complex x, int m, gmp_complex &f0, gmp_complex &f1, gmp_complex &f2, gmp_float &ex, gmp_float &ef) |
void | computegx (gmp_complex **a, gmp_complex x, int m, gmp_complex &f0, gmp_complex &f1, gmp_complex &f2, gmp_float &ex, gmp_float &ef) |
void | checkimag (gmp_complex *x, gmp_float &e) |
Private Attributes | |
int | var |
int | tdg |
number * | coeffs |
number * | ievpoint |
rootType | rt |
gmp_complex ** | theroots |
int | anz |
bool | found_roots |
complex root finder for univariate polynomials based on laguers algorithm
Definition at line 65 of file mpr_numeric.h.
Enumerator | |
---|---|
none | |
cspecial | |
cspecialmu | |
det | |
onepoly |
Definition at line 68 of file mpr_numeric.h.
rootContainer::rootContainer | ( | ) |
Definition at line 278 of file mpr_numeric.cc.
rootContainer::~rootContainer | ( | ) |
Definition at line 291 of file mpr_numeric.cc.
|
private |
|
private |
Definition at line 630 of file mpr_numeric.cc.
|
private |
Definition at line 814 of file mpr_numeric.cc.
|
private |
Definition at line 835 of file mpr_numeric.cc.
|
private |
Definition at line 651 of file mpr_numeric.cc.
|
private |
Definition at line 671 of file mpr_numeric.cc.
gmp_complex & rootContainer::evPointCoord | ( | const int | i | ) |
Definition at line 401 of file mpr_numeric.cc.
void rootContainer::fillContainer | ( | number * | _coeffs, |
number * | _ievpoint, | ||
const int | _var, | ||
const int | _tdg, | ||
const rootType | _rt, | ||
const int | _anz | ||
) |
Definition at line 313 of file mpr_numeric.cc.
|
inline |
Definition at line 95 of file mpr_numeric.h.
|
inline |
Definition at line 97 of file mpr_numeric.h.
|
inline |
Definition at line 96 of file mpr_numeric.h.
poly rootContainer::getPoly | ( | ) |
Definition at line 347 of file mpr_numeric.cc.
|
inline |
Definition at line 88 of file mpr_numeric.h.
|
private |
Definition at line 638 of file mpr_numeric.cc.
|
private |
Given the degree m and the m+1 complex coefficients a[0..m] of the polynomial, and given the complex value x, this routine improves x by Laguerre's method until it converges, within the achievable roundoff limit, to a root of the given polynomial.
The number of iterations taken is returned at its.
Definition at line 563 of file mpr_numeric.cc.
|
private |
Given the degree tdg and the tdg+1 complex coefficients ad0..tdg of the polynomial this routine successively calls "laguer" and finds all m complex roots in roots[0..tdg].
The bool var "polish" should be input as "true" if polishing (also by "laguer") is desired, "false" if the roots will be subsequently polished by other means.
Definition at line 480 of file mpr_numeric.cc.
|
inline |
Definition at line 82 of file mpr_numeric.h.
|
private |
Definition at line 695 of file mpr_numeric.cc.
Definition at line 450 of file mpr_numeric.cc.
|
private |
Definition at line 767 of file mpr_numeric.cc.
|
private |
Definition at line 748 of file mpr_numeric.cc.
Definition at line 430 of file mpr_numeric.cc.
|
private |
Definition at line 141 of file mpr_numeric.h.
|
private |
Definition at line 135 of file mpr_numeric.h.
|
private |
Definition at line 142 of file mpr_numeric.h.
|
private |
Definition at line 136 of file mpr_numeric.h.
|
private |
Definition at line 137 of file mpr_numeric.h.
|
private |
Definition at line 133 of file mpr_numeric.h.
|
private |
Definition at line 139 of file mpr_numeric.h.
|
private |
Definition at line 132 of file mpr_numeric.h.