Class Pzeros

java.lang.Object
rocks.palaiologos.maja.Pzeros

class Pzeros extends Object
Originally written by D. Bini in Fortran77.
  • Field Details

  • 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

      double z_abs(Pzeros.doublecomplex z)
    • pow_ii

      int pow_ii(int ap, int bp)
    • z_div

    • dc

    • dc

      Pzeros.doublecomplex dc(double r, double i)
    • 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_

      void aberth_(int n, int j, Pzeros.doublecomplex[] root, Pzeros.doublecomplex abcorr)
    • 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)