Package rocks.palaiologos.maja
Class Pzeros
java.lang.Object
rocks.palaiologos.maja.Pzeros
Originally written by D. Bini in Fortran77.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) Pzeros.doublecomplex(package private) static Pzeros -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaberth(double[] ar, double[] ai, boolean[] err) Calculates the roots of polynomial functions y=a[0]+a[1]*x+a[2]*x^2+a[3]*x^3+...+a[n]*x^n of any degree n having arbitrary complex coefficients a[i].(package private) voidaberth_(int n, int j, Pzeros.doublecomplex[] root, Pzeros.doublecomplex abcorr) (package private) intcmerge_(int n, double[] a, int i, int m, boolean[] h) (package private) intcnvex_(int n, double[] a, boolean[] h) (package private) booleanctest_(int n, double[] a, int il, int i, int ir) (package private) Pzeros.doublecomplexdc()(package private) Pzeros.doublecomplexdc(double r, double i) (package private) intleft_(int n, boolean[] h, int i, int[] il) (package private) voidnewton_(int n, Pzeros.doublecomplex[] poly, double[] apoly, double[] apolyr, Pzeros.doublecomplex z, double theSmall, double[] radius, Pzeros.doublecomplex corr, boolean[] again, int ik) (package private) voidpolzeros_(int n, Pzeros.doublecomplex[] poly, double eps, double big, double theSmall, int nitmax, Pzeros.doublecomplex[] root, double[] radius, boolean[] err, int[] iter, double[] apoly, double[] apolyr) (package private) intpow_ii(int ap, int bp) (package private) intright_(int n, boolean[] h, int i, int[] ir) (package private) intstart_(int n, double[] a, Pzeros.doublecomplex[] y, double[] radius, int[] nz, double theSmall, double big, boolean[] h) (package private) double(package private) void
-
Field Details
-
pz
-
c_b35
Pzeros.doublecomplex c_b35
-
-
Constructor Details
-
Pzeros
Pzeros()
-
-
Method Details
-
aberth
public static void aberth(double[] ar, double[] ai, boolean[] err) Calculates the roots of polynomial functions y=a[0]+a[1]*x+a[2]*x^2+a[3]*x^3+...+a[n]*x^n of any degree n having arbitrary complex coefficients a[i]. The method is derived from pzeros.f.The real and imaginary parts of the coefficients are passed in two double arrays. The roots are returned in the same arrays. There are (n+1) coefficients and n roots. The coefficient a[n] must not be zero. Errors are returned in a boolean array separately for each root. Success is indicated by false, i.e. no error. On return each root should be checked against its flag.
All three arrays must be equal sized. This is a conveniance method which sets most accessible parameters to reasonable defaults. It also transparently deflates the polynomial in case the constant coefficient is zero. See the sources for a description of the method.
- Parameters:
ar- realpart of polynomial coefficients a.ai- imaginary part of polynomial coefficients a.err- error flag for each root.
-
z_abs
-
pow_ii
int pow_ii(int ap, int bp) -
z_div
-
dc
Pzeros.doublecomplex dc() -
dc
-
polzeros_
void polzeros_(int n, Pzeros.doublecomplex[] poly, double eps, double big, double theSmall, int nitmax, Pzeros.doublecomplex[] root, double[] radius, boolean[] err, int[] iter, double[] apoly, double[] apolyr) -
newton_
void newton_(int n, Pzeros.doublecomplex[] poly, double[] apoly, double[] apolyr, Pzeros.doublecomplex z, double theSmall, double[] radius, Pzeros.doublecomplex corr, boolean[] again, int ik) -
aberth_
-
start_
int start_(int n, double[] a, Pzeros.doublecomplex[] y, double[] radius, int[] nz, double theSmall, double big, boolean[] h) -
cnvex_
int cnvex_(int n, double[] a, boolean[] h) -
left_
int left_(int n, boolean[] h, int i, int[] il) -
right_
int right_(int n, boolean[] h, int i, int[] ir) -
cmerge_
int cmerge_(int n, double[] a, int i, int m, boolean[] h) -
ctest_
boolean ctest_(int n, double[] a, int il, int i, int ir)
-