My Project
|
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 ad[0..tdg] (generated from the number coefficients coeffs[0..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.
rootContainer::rootContainer | ( | ) |
Definition at line 264 of file mpr_numeric.cc.
rootContainer::~rootContainer | ( | ) |
Definition at line 277 of file mpr_numeric.cc.
|
private |
|
private |
Definition at line 617 of file mpr_numeric.cc.
|
private |
Definition at line 801 of file mpr_numeric.cc.
|
private |
Definition at line 822 of file mpr_numeric.cc.
|
private |
Definition at line 638 of file mpr_numeric.cc.
|
private |
Definition at line 658 of file mpr_numeric.cc.
gmp_complex & rootContainer::evPointCoord | ( | const int | i | ) |
Definition at line 388 of file mpr_numeric.cc.
void rootContainer::fillContainer | ( | number * | _coeffs, |
number * | _ievpoint, | ||
const int | _var, | ||
const int | _tdg, | ||
const rootType | _rt, | ||
const int | _anz | ||
) |
|
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 334 of file mpr_numeric.cc.
|
inline |
Definition at line 88 of file mpr_numeric.h.
|
private |
Definition at line 625 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 550 of file mpr_numeric.cc.
|
private |
Given the degree tdg and the tdg+1 complex coefficients ad[0..tdg] (generated from the number coefficients coeffs[0..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 467 of file mpr_numeric.cc.
|
inline |
Definition at line 82 of file mpr_numeric.h.
|
private |
Definition at line 682 of file mpr_numeric.cc.
Definition at line 437 of file mpr_numeric.cc.
|
private |
|
private |
Definition at line 735 of file mpr_numeric.cc.
Definition at line 417 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.