Class ComplexLinearEquations

  • All Implemented Interfaces:
    java.io.Serializable

    public class ComplexLinearEquations
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ComplexLinearEquations()
      Creates a new ComplexLinearEquations object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private double abs1​(double[] ff)  
      private double abssq​(double[] ff)  
      double dznrm2​(int n, double[][] x, int incx)
      BLAS level1 routine version 3.7.0 December, 2016 This is a port of the 10/14/93 DZNRM2 function Original code written by Sven Hammarling, Nag Ltd. dznrm2 returns the euclidean norm of a vector via the function sqrt(x**H*x)
      private void printHeader()  
      private void printsvHeader()  
      void xlaenv​(int ispec, int nvalue)
      This is a port of version 3.1 LAPACK auxiliary routine XLAENV.
      private double zabs​(double zr, double zi)
      zabs computes the absolute value or magnitude of a double precision complex variable zr + j*zi.
      void zaxpy​(int n, double[] za, double[][] zx, int incx, double[][] zy, int incy)
      BLAS level1 routine version 3.7.0 December, 2016 Port of 12/3/93 linpack routine zaxpy Original version written by Jack Dongarra vector dy = vector dy + da * vector dx.
      void zchkaa()  
      private void zchkge​(boolean[] dotype, int nm, int[] mval, int nn, int[] nval, int nnb, int[] nbval, int nns, int[] nsval, double thresh, int nmax, double[][][] A, double[][][] AFAC, double[][][] AINV, double[][][] B, double[][][] X, double[][][] XACT, double[][][] WORK, double[] rwork, int[] iwork)  
      private void zdiv​(double ar, double ai, double br, double bi, double[] cr, double[] ci)
      complex divide c = a/b.
      double[] zdotc​(int n, double[][] zx, int incx, double[][] zy, int incy)
      BLAS level1 routine version 3.7.0 December, 2016 Port of 12/3/93 linpack zdotc routine Original version created by Jack Dongarra Forms the dot product of two complex vectors x**H * Y.
      private double[] zdotu​(int n, double[][] zx, int incx, double[][] zy, int incy)
      This is a a port of BLAS level1 routine ZDOTU version 3.7.0.
      private void zdrscl​(int n, double sa, double[][] sx, int incx)
      This is a port of LAPACK version auxiliary routine 3.7.0 December, 2016 ZDRSCL.
      private void zdrvge​(boolean[] dotype, int nn, int[] nval, int nrhs, double thresh, int nmax, double[][][] A, double[][][] AFAC, double[][][] ASAV, double[][][] B, double[][][] BSAV, double[][][] X, double[][][] XACT, double[] s, double[][][] WORK, double[] rwork, int[] iwork)  
      private void zdscal​(int n, double da, double[][] zx, int incx)
      This is a port of the BLAS level1 routine ZDSCAL version 3.7.0 December, 2016.
      void zgecon​(char norm, int n, double[][][] A, int lda, double anorm, double[] rcond, double[][] work, double[] rwork, int[] info)  
      private void zgeequ​(int m, int n, double[][][] A, int lda, double[] r, double[] c, double[] rowcnd, double[] colcnd, double[] amax, int[] info)  
      void zgemm​(char transa, char transb, int m, int n, int k, double[] alpha, double[][][] A, int lda, double[][][] B, int ldb, double[] beta, double[][][] C, int ldc)
      This is a port of the 2/8/89 Blas routine Original version written by: Jack Dongarra, Argonne National Laboratory Iain Duff, AERE Harwell.
      void zgemv​(char trans, int m, int n, double[] alpha, double[][][] A, int lda, double[][] x, int incx, double[] beta, double[][] y, int incy)
      From LAPACK 3.7.0 December 2106 Routine ported from 10/22/86 blas zgemv subroutine Original version written by: Jack Dongarra, Argonne National Lab.
      void zgerc​(int m, int n, double[] alpha, double[][] x, int incx, double[][] y, int incy, double[][][] A, int lda)
      This is a port of the 10/22/86 Blas routine ZGERC Original version written by: Jack Dongarra, Argonne National Lab.
      private void zgerfs​(char trans, int n, int nrhs, double[][][] A, int lda, double[][][] AF, int ldaf, int[] ipiv, double[][][] B, int ldb, double[][][] X, int ldx, double[] ferr, double[] berr, double[][] work, double[] rwork, int[] info)  
      void zgesv​(int n, int nrhs, double[][][] A, int lda, int[] ipiv, double[][][] B, int ldb, int[] info)  
      void zgesvx​(char fact, char trans, int n, int nrhs, double[][][] A, int lda, double[][][] AF, int ldaf, int[] ipiv, char[] equed, double[] r, double[] c, double[][][] B, int ldb, double[][][] X, int ldx, double[] rcond, double[] ferr, double[] berr, double[][] work, double[] rwork, int[] info)  
      private void zget01​(int m, int n, double[][][] A, int lda, double[][][] AFAC, int ldafac, int[] ipiv, double[] rwork, double[] resid)  
      void zget02​(char trans, int m, int n, int nrhs, double[][][] A, int lda, double[][][] X, int ldx, double[][][] B, int ldb, double[] rwork, double[] resid)
      This is a port of version 3.7.0 LAPACK test routine ZGET02.
      private void zget03​(int n, double[][][] A, int lda, double[][][] AINV, int ldainv, double[][][] WORK, int ldwork, double[] rwork, double[] rcond, double[] resid)  
      void zget04​(int n, int nrhs, double[][][] X, int ldx, double[][][] XACT, int ldxact, double rcond, double[] resid)
      This is a port of LAPACK version test routine 3.7.0 ZGET04.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016.
      private void zget07​(char trans, int n, int nrhs, double[][][] A, int lda, double[][][] B, int ldb, double[][][] X, int ldx, double[][][] XACT, int ldxact, double[] ferr, boolean chkferr, double[] berr, double[] reslts)  
      void zgetrf​(int m, int n, double[][][] A, int lda, int[] ipiv, int[] info)  
      private void zgetrf2​(int m, int n, double[][][] A, int lda, int[] ipiv, int[] info)  
      void zgetri​(int n, double[][][] A, int lda, int[] ipiv, double[][] work, int lwork, int[] info)  
      void zgetrs​(char trans, int n, int nrhs, double[][][] A, int lda, int[] ipiv, double[][][] B, int ldb, int[] info)  
      private void zhemv​(char uplo, int n, double[] alpha, double[][][] A, int lda, double[][] x, int incx, double[] beta, double[][] y, int incy)
      This is a port of version 3.7.0 BLAS level2 routine ZHEMV proivded by Univ. of Tennessee, Univ. of California Berkeley, University of Colorado Denver and NAG Ltd., December, 2016 Originally written 22-October-1986 by Jack Dongarra, Argonne National Lab, Jeremy Du Croz, Nag Central Office, Sven Hammarling, Nag Central Office, and Richard Hanson, Sandia National Labs.
      private void zher2​(char uplo, int n, double[] alpha, double[][] x, int incx, double[][] y, int incy, double[][][] A, int lda)
      This is a port of version 3.7.0 BLAS level2 routine ZHER2 proivded by Univ. of Tennessee, Univ. of California Berkeley, University of Colorado Denver and NAG Ltd., December, 2016 Originally written 22-October-1986 by Jack Dongarra, Argonne National Lab, Jeremy Du Croz, Nag Central Office, Sven Hammarling, Nag Central Office, and Richard Hanson, Sandia National Labs.
      void zlacn2​(int n, double[][] v, double[][] x, double[] est, int[] kase, int[] isave)
      This is a port of LAPACK version auxiliary routine 3.7.0 ZLACN2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016.
      void zlacpy​(char uplo, int m, int n, double[][][] A, int lda, double[][][] B, int ldb)
      This is a port of LAPACK version 3.7.0 auxiliary routine DLACPY.
      void zlagge​(int m, int n, int kl, int ku, double[] D, double[][][] A, int lda, int[] iseed, double[][] work, int[] info)
      This is a port of version 3.7.0 LAPACK auxiliary test routine ZLAGGE Original ZLAGGE created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., December, 2016 zlagge generates a complex general m by n matrix A, by pre- and post- multiplying a real diagonal matrix D with random unitary matrices: A = U*D*V.
      private void zlaghe​(int n, int k, double[] d, double[][][] A, int lda, int[] iseed, double[][] work, int[] info)
      This is a port of LAPACK auxiliary routine ZLAGHE version 3.7.0.
      void zlagsy​(int n, int k, double[] D, double[][][] A, int lda, int[] iseed, double[][] work, int[] info)
      This is a port of version 3.7.0 LAPACK auxiliary test routine zlagsy Original ZLAGSY created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., December, 2016 zlagsy generates a complex symmetric matrix A, by pre- and post- multiplying a real diagonal matrix D with a random unitary matrix: A = U*D*U**T.
      double zlange​(char norm, int m, int n, double[][][] A, int lda, double[] work)
      This is a port of the version 3.7.0 LAPACK auxiliary routine ZLANGE Original ZLANGE created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlange returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the largest absolute value of any element of a complex rectangular matrix.
      private double zlantr​(char norm, char uplo, char diag, int m, int n, double[][][] A, int lda, double[] work)  
      private void zlaqge​(int m, int n, double[][][] A, int lda, double[] r, double[] c, double rowcnd, double colcnd, double amax, char[] equed)  
      private double[] zlarnd​(int idist, int[] iseed)
      This is a port of the LAPACK routine ZLARND.f version 3.7.0 LAPACK is a software package provided by University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December, 2016 zlarnd returns a random complex number from a uniform or normal distribution.
      void zlarnv​(int idist, int[] iseed, int n, double[][] x)
      This is a port of version 3.7.0 LAPACK auxiliary routine ZLARNV Original ZLARNV created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlarnv returns a vector of n random complex numbers from a uniform or normal distribution
      void zlarot​(boolean lrows, boolean lleft, boolean lright, int nl, double[] c, double[] s, double[][] A, int lda, double[] xleft, double[] xright)
      This is a port of version 3.7.0 LAPACK auxiliary test routine ZLAROT Original ZLAROT created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., December, 2016 zlarot applies a (Givens) rotation to two adjacent rows or columns, where one element of the first and/or last collumn/row for use on matrices stored in some format other than GE, so that elements of the matrix may be used or modified for which no array element is provided.
      void zlartg​(double[] f, double[] g, double[] cs, double[] sn, double[] r)
      This is a port of version 3.7.0 LAPACK auxiliary routine ZLARTG Original ZLARTG created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlartg generates a plane rotation with real cosine and complex sine.
      void zlaset​(char uplo, int m, int n, double[] alpha, double[] beta, double[][][] A, int lda)
      This is a port of version 3.7.0 auxiliary routine ZLASET.
      void zlassq​(int n, double[][] x, int incx, double[] scale, double[] sumsq)
      This is a port of version 3.7.0 LAPACK auxiliary routine ZLASSQ Original ZLASSQ created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlassq returns the values scl and smsq such that (scl**2)*smsq = x[0]**2 + x[incx]**2 + ... + x[(n-1)*incx]**2 + (scale**2)*sumsq The value of sumsq is assumed to be non-negative and scl returns the value scl = max(scale,abs(real(x[i])),abs(imag(x[i))). scale and sumsq refer to the original supplied values in scale[] and sumsq[]. scl and smsq are the returned values in scale[] and sumsq[] that overwrite the orginal values.
      private void zlaswp​(int n, double[][][] A, int lda, int k1, int k2, int[] ipiv, int incx)  
      void zlatb4​(java.lang.String path, int imat, int m, int n, char[] type, int[] kl, int[] ku, double[] anorm, int[] mode, double[] cndnum, char[] dist)
      This is a port of version 3.7.0 LAPACK test routine DLATB4.
      void zlatms​(int m, int n, char dist, int[] iseed, char sym, double[] D, int mode, double cond, double dmax, int kl, int ku, char pack, double[][][] A, int lda, double[][] work, int[] info)
      This is a port of version 3.7.0 LAPACK test routine ZLATMS Original ZLATMS created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., December, 2016 zlatms generates random matrices with specified singular values (or hermitian with specified eigenvalues) for testing LAPACK programs.
      private void zlatrs​(char uplo, char trans, char diag, char normin, int n, double[][][] A, int lda, double[][] x, double[] scale, double[] cnorm, int[] info)
      This is a port of LAPACK version auxiliary routine 3.7.0 ZLATRS.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016.
      private void zmlt​(double ar, double ai, double br, double bi, double[] cr, double[] ci)
      complex multiply c = a * b.
      void zscal​(int n, double[] za, double[][] zx, int incx)
      Routine ported from 12/3/93 linpack dscal Original version written by Jack Dongarra Scales a vector by a constant zscal scales a vector by a constant.
      void zsymv​(char uplo, int n, double[] alpha, double[][][] A, int lda, double[][] x, int incx, double[] beta, double[][] y, int incy)
      LAPACK auxiliary routine version 3.7.0 December, 2016 This is a port of the 10/22/86 Blas routine ZSYMV Original code written by: Jack Dongarra, Argonne Nationa Lab.
      void ztrmm​(char side, char uplo, char transa, char diag, int m, int n, double[] alpha, double[][][] A, int lda, double[][][] B, int ldb)
      This is a port of the 2/8/89 Blas level 3 routine ZTRMM Original code written by: Jack Dongarra, Argonne National Laboratory Iain Duff, AERE Harwell.
      void ztrmv​(char uplo, char trans, char diag, int n, double[][][] A, int lda, double[][] x, int incx)
      This is a port of the 10/22/86 blas routine ZTRMV Original version written by: Jack Dongarra, Argonne National Lab.
      void ztrsm​(char side, char uplo, char transa, char diag, int m, int n, double[] alpha, double[][][] A, int lda, double[][][] B, int ldb)
      This is a port of the 2/8/89 Blas routine ZTRSM Original code written by: Jack Dongarra, Argonne National Laboratory Iain Duff, AERE Harwell.
      void ztrsv​(char uplo, char trans, char diag, int n, double[][][] A, int lda, double[][] x, int incx)
      This is a port of the 10/22/86 Blas routine ZTRSV Original version written by: Jack Dongarra, Argonne National Lab.
      private void ztrti2​(char uplo, char diag, int n, double[][][] A, int lda, int[] info)
      This is a port of LAPACK version routine 3.7.0 ZTRTI2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016.
      void ztrtri​(char uplo, char diag, int n, double[][][] A, int lda, int[] info)
      This is a port of LAPACK version routine 3.7.0 ZTRTRI.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • iparms

        private int[] iparms
      • first_zlatb4

        private boolean first_zlatb4
        Found in routine zlatb4
      • eps_zlatb4

        private double eps_zlatb4
      • small_zlatb4

        private final double[] small_zlatb4
      • large_zlatb4

        private final double[] large_zlatb4
      • badc1_zlatb4

        private double badc1_zlatb4
      • badc2_zlatb4

        private double badc2_zlatb4
      • first_zlartg

        private boolean first_zlartg
        Double precision machine variables found in routine zlartg.
      • safmin

        private double safmin
        DOCUMENT ME!
      • safmn2

        private double safmn2
        DOCUMENT ME!
      • safmx2

        private double safmx2
        DOCUMENT ME!
    • Constructor Detail

      • ComplexLinearEquations

        public ComplexLinearEquations()
        Creates a new ComplexLinearEquations object.
    • Method Detail

      • zchkaa

        public void zchkaa()
      • zchkge

        private void zchkge​(boolean[] dotype,
                            int nm,
                            int[] mval,
                            int nn,
                            int[] nval,
                            int nnb,
                            int[] nbval,
                            int nns,
                            int[] nsval,
                            double thresh,
                            int nmax,
                            double[][][] A,
                            double[][][] AFAC,
                            double[][][] AINV,
                            double[][][] B,
                            double[][][] X,
                            double[][][] XACT,
                            double[][][] WORK,
                            double[] rwork,
                            int[] iwork)
      • printHeader

        private void printHeader()
      • zdrvge

        private void zdrvge​(boolean[] dotype,
                            int nn,
                            int[] nval,
                            int nrhs,
                            double thresh,
                            int nmax,
                            double[][][] A,
                            double[][][] AFAC,
                            double[][][] ASAV,
                            double[][][] B,
                            double[][][] BSAV,
                            double[][][] X,
                            double[][][] XACT,
                            double[] s,
                            double[][][] WORK,
                            double[] rwork,
                            int[] iwork)
      • printsvHeader

        private void printsvHeader()
      • xlaenv

        public void xlaenv​(int ispec,
                           int nvalue)
        This is a port of version 3.1 LAPACK auxiliary routine XLAENV. Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. November 2006 .. Scalar Arguments .. INTEGER ISPEC, NVALUE .. Purpose ======= XLAENV sets certain machine- and problem-dependent quantities which will later be retrieved by ILAENV. Arguments ========= ISPEC (input) INTEGER Specifies the parameter to be set in the COMMON array IPARMS. = 1: the optimal blocksize; if this value is 1, an unblocked algorithm will give the best performance. = 2: the minimum block size for which the block routine should be used; if the usable block size is less than this value, an unblocked routine should be used. = 3: the crossover point (in a block routine, for N less than this value, an unblocked routine should be used) = 4: the number of shifts, used in the nonsymmetric eigenvalue routines = 5: the minimum column dimension for blocking to be used; rectangular blocks must have dimension at least k by m, where k is given by ILAENV(2,...) and m by ILAENV(5,...) = 6: the crossover point for the SVD (when reducing an m by n matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds this value, a QR factorization is used first to reduce the matrix to a triangular form) = 7: the number of processors = 8: another crossover point, for the multishift QR and QZ methods for nonsymmetric eigenvalue problems. = 9: maximum size of the subproblems at the bottom of the computation tree in the divide-and-conquer algorithm (used by xGELSD and xGESDD) =10: ieee NaN arithmetic can be trusted not to trap =11: infinity arithmetic can be trusted not to trap NVALUE (input) INTEGER The value of the parameter specified by ISPEC.
      • zlatb4

        public void zlatb4​(java.lang.String path,
                           int imat,
                           int m,
                           int n,
                           char[] type,
                           int[] kl,
                           int[] ku,
                           double[] anorm,
                           int[] mode,
                           double[] cndnum,
                           char[] dist)
        This is a port of version 3.7.0 LAPACK test routine DLATB4. Univ. of Tennessee, Univ. of California Berkeley, University of Colorado and NAG Ltd.. December 2106 .. Scalar Arguments .. CHARACTER DIST, TYPE CHARACTER*3 PATH INTEGER IMAT, KL, KU, M, MODE, N DOUBLE PRECISION ANORM, CNDNUM .. Purpose ======= ZLATB4 sets parameters for the matrix generator based on the type of matrix to be generated. Arguments ========= PATH (input) String The LAPACK path name. IMAT (input) INTEGER An integer key describing which matrix to generate for this path. M (input) INTEGER The number of rows in the matrix to be generated. N (input) INTEGER The number of columns in the matrix to be generated. TYPE (output) CHARACTER*1 The type of the matrix to be generated: = 'S': symmetric matrix, = 'H': Hermetian = 'P': Hermitian symmetric positive (semi)definite matrix = 'N': nonsymmetric matrix KL (output) INTEGER The lower band width of the matrix to be generated. KU (output) INTEGER The upper band width of the matrix to be generated. ANORM (output) DOUBLE PRECISION The desired norm of the matrix to be generated. The diagonal matrix of singular values or eigenvalues is scaled by this value. MODE (output) INTEGER A key indicating how to choose the vector of eigenvalues. CNDNUM (output) DOUBLE PRECISION The desired condition number. DIST (output) CHARACTER*1 The type of distribution to be used by the random number generator.
      • zlatms

        public void zlatms​(int m,
                           int n,
                           char dist,
                           int[] iseed,
                           char sym,
                           double[] D,
                           int mode,
                           double cond,
                           double dmax,
                           int kl,
                           int ku,
                           char pack,
                           double[][][] A,
                           int lda,
                           double[][] work,
                           int[] info)
        This is a port of version 3.7.0 LAPACK test routine ZLATMS Original ZLATMS created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., December, 2016 zlatms generates random matrices with specified singular values (or hermitian with specified eigenvalues) for testing LAPACK programs.

        zlatms operates by applying the following sequence of operations:

        Set the diagonal to D, where D may be input or computed according to mode, cond, dmax, and sym as described below.

        Generate a matrix with appropriate band structure, by one of two methods:

        Method A: Generate a dense m by n matrix by multiplying D on the left and the right by random unitary matrices, then:

        Reduce the bandwidth according to kl and ku, using Householder transformations.

        Method B: Convert the bandwidth-0 (i.e., diagonal) matrix to a bandwidth-1 matrix using Givens rotations, "chasing" out-of-band elements back, much as in QR; then convert the bandwidth-1 to a bandwidth-2 matrix, etc. Note that for reasonably samll bandwidths (relative to m and n) this requires less storage, as a dense matrix is not generated. Also, for hermitian or symmetric matrices, only, one triangle is generated.

        Method A is chosen if the bandwidth is a large fraction of the order of the matrix, and lda is at least m (so a dense matrix can be stored.) Method B is chosen if the bandwidth is small (

        Pack the matrix if desired. Options specified by pack are: no packing, zero out upper half (if hermitian), zero out lower half (if hermitian), store the upper half columnwise (if hermitian or upper triangular), store the lower half columnwise (if hermitian or lower triangular), store the lower triangle in banded format (if hermitian or lower triangular), store the upper triangle in banded format (if hermitian or upper triangular), and store the entire matrix in banded format If method B is chosen, and band format is specified, then the matrix will be generated in the band format, so no repacking will be necessary.

        Parameters:
        m - input int The number of rows of A.
        n - input int The number of columns of A. n must equal m if the matrix is symmetric or hermitian (i.e., if sym is not 'N').
        dist - input char On entry, dist specifies the type of distribution to be used to generate the random eigen-/singular values. 'U' => uniform(0,1) ('U' for uniform) 'S' => uniform(-1,1) ('S' for symmetric) 'N' => normal(0,1) ('N' for normal)
        iseed - input/output int[] of dimension 4 On entry iseed specifies the seed of the random number generator. They should lie between 0 and 4095 inclusive, and iseed[3] should be odd. The random number generator uses a linear congruential sequence limited to small integers, and so should produce machine independent random numbers. The values of iseed are changed on exit, and can be used in the next call to zlatms to continue the same random number sequence. Changed on exit.
        sym - input char SYM is CHARACTER*1 If SYM='H', the generated matrix is hermitian, with eigenvalues specified by D, COND, MODE, and DMAX; they may be positive, negative, or zero. If SYM='P', the generated matrix is hermitian, with eigenvalues (= singular values) specified by D, COND, MODE, and DMAX; they will not be negative. If SYM='N', the generated matrix is nonsymmetric, with singular values specified by D, COND, MODE, and DMAX; they will not be negative. If SYM='S', the generated matrix is (complex) symmetric, with singular values specified by D, COND, MODE, and DMAX; they will not be negative. Not modified.
        D - input/output double[] of dimension (min(m,n)) This array is used to specify the singular values or eigenvalues of A (see sym, above.) If mode = 0, then D is assumed to contain the singular/eigenvalues, otherwise they will be computed according to mode, cond, and dmax, and placed in D. Modified if mode is nonzero.
        mode - input int On entry this describes how the singular/ eigenvalues are to be specified: = 0 means use D as input = 1 sets D[0] = 1 and D[1:n-1] = 1.0/cond = 2 sets D[0:n-2] = 1 and D[n-1] = 1.0/cond = 3 sets D[i] = cond**(-(i)/(n-1)) = 4 sets D[i] = 1 - (i)/(n-1)*(1 - 1/cond) = 5 sets D to random numbers in the range (1/cond, 1) such that their logarithms are uniformly distributed = 6 sets D to random numbers from same distribution as the rest of the matrix mode
        cond - input double On entry, this is used as described under mode above. If used, it must be >= 1.
        dmax - input double If mode is neither -6, 0, nor 6, the contents of D, as computed according to mode and cond, will be scaled by dmax/max(abs(D[i])); thus the maximum absolute eigen- or singular value (which is to say the norm) will be abs(dmax). Note that dmax need not be positive: if dmax is negative (or zero), D will be scaled by a negative number (or zero).
        kl - input int This specifies the lower bandwidth of the matrix. For example, kl = 0 implies upper triangular, kl = 1 implies upper Hessenberg, and kl being at least m-1 means that the matrix has full lower bandwidth. kl must equal ku if the matrix is symmetric or hermitian.
        ku - input int This specifies the upper bandwidth of the matrix. For example, ku = 0 implies lower triangular, ku = 1 implies lower Hessenberg, and ku being at least n-1 means that the matrix has full upper bandwidth. kl must equal ku if the matrix is symmetric or hermitian.
        pack - input char This specifies packing of the matrix as follows: 'N' => no packing 'U' => zero out all subdiagonal entries (if symmetric) 'L' => zero out all superdiagonal entries (if symmetric) 'C' => store the upper triangle columnwise (only if the matrix is symmetric,hermitian, or upper triangular) 'R' => store the lower triangle columnwise (only if the matrix is symmetric, hermitian, or lower triangular) 'B' => store the lower triangle in band storage scheme (only if matrix symmetric, hermitian, or lower triangular) 'Q' => store the upper triangle in band storage scheme (only if matrix symmetric, hermitian, or upper triangular) 'Z' => store the entire matrix in band storage scheme (pivoting can be provided for by using this option to store A in the trailing rows of the allocated storage) Using these options, the various LAPACK packed and banded storage schemes can be obtained: GB - use 'Z' PB, SB, HB, or TB - use 'B' or 'Q' PP, SP, HB, or TP - use 'C' or 'R' If two calls to zlatms differ only in the pack parameter, they will generate mathematically equivalent matrices
        A - input/output double[][][2] complex of dimension (lda,n) On exit A is the desired test matrix. A is first generated in full (unpacked) form, and then packed, if so specified by pack. Thus, the first m elements of the first n columns will always be modified. If pack specifies a packed or banded storage scheme, all lda elements of the first n columns will be modified; the elements of the array which do not correspond to elements of the generated matrix are set to zero.
        lda - input int lda specifies the first dimension of A as declared in the calling program. If pack = 'N', 'U', 'L', 'C', or 'R', then lda must be at least m. If pack = 'B' or 'Q', then lda must be at least min(kl,m-1) (which is equal to min(ku,n-1)). If pack = 'Z', lda must be large enough to hold the packed array: min(ku,n-1) + min(kl,m-1) + 1.
        work - workspace double[][2] complex of dimension (3*max(n,m))
        info - output int[] Error code. On exit, info[0] will be set to one of the following values: 0 => normal return -1 => m negative or unequal to n and sym = 'S', 'H', or 'P' -2 => n negative -3 => dist illegal string -5 => sym illegal string -7 => mode not in range -6 to 6 -8 => cond less than 1.0, and mode neither -6, 0, nor 6 -10 => kl negative -11 => ku negative, or sym is not 'N' and ku not equal to kl -12 => pack illegal string, or pack = 'U' or 'L', and sym = 'N'; or pack = 'C' or 'Q' and sym = 'N' and kl is not zero; or pack = 'R' or 'B' and sym = 'N' and ku is not zero; or pack = 'U', 'L', 'C', 'R', 'B', or 'Q' and m != n. -14 => lda is less than m, or pack = 'Z' and lda is less than min(ku,n-1) + min(kl,m-1) + 1. 1 => Error return from dlatm1 2 => Cannot scale to dmax (maximum singular value is 0) 3 => Error return from zlagge or dlagsy
      • zgecon

        public void zgecon​(char norm,
                           int n,
                           double[][][] A,
                           int lda,
                           double anorm,
                           double[] rcond,
                           double[][] work,
                           double[] rwork,
                           int[] info)
      • zlatrs

        private void zlatrs​(char uplo,
                            char trans,
                            char diag,
                            char normin,
                            int n,
                            double[][][] A,
                            int lda,
                            double[][] x,
                            double[] scale,
                            double[] cnorm,
                            int[] info)
        This is a port of LAPACK version auxiliary routine 3.7.0 ZLATRS.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016. zlatrs solves a triangular system of equations with the scale factor set to prevent overflow. zlatrs solves one of the triangular systems A *x = s*b, A**T *x = s*b, or A**H * x = s*b with scaling to prevent overflow. Here A is an upper or lower triangular matrix, A**T denotes the transpose of A, A**H denotes the conjugate transpose of A, x and b are n-element vectors, and s is a scaling factor, usually less than or equal to 1, chosen so that the components of x will be less than the overflow threshold. If the unscaled problem will not cause overflow, the Level 2 BLAS routine ZTRSV is called. If the matrix A is singular (A[j][j] = 0 for some j), then s is set to 0 and a non-trivial solution to A*x = 0 is returned. A rough bound on x is computed; if that is less than overflow, ztrsv is called, otherwise, specific code is used which checks for possible overflow or divide-by-zero at every operation. A columnwise scheme is used for solving A*x = b. The basic algorithm if A is lower triangular is x[1:n] := b[1:n] for j = 1, ..., n x(j) := x(j) / A(j,j) x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j] end Define bounds on the components of x after j iterations of the loop: M(j) = bound on x[1:j] G(j) = bound on x[j+1:n] Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}. Then for iteration j+1 we have M(j+1) = G(j-1) and M(j) >= M(j-1) for j >= 1. Then the bound on x(j) is M(j)
        Parameters:
        input - char uplo Specifies whether the matrix A is upper or lower triangular. = 'U': Upper triangular = 'L': Lower triangular
        input - char trans Specifies the operation applied to A. = 'N': Solve A * x = s*b (No transpose) = 'T': Solve A**T* x = s*b (Transpose) = 'C': Solve A**H* x = s*b (Conjugate transpose)
        input - char diag Specifies whether or not the matrix A is unit triangular. = 'N': Non-unit triangular = 'U': Unit triangular
        input - char normin Specifies whether cnorm has been set or not. = 'Y': cnorm contains the column norms on entry = 'N': cnorm is not set on entry. On exit, the norms will be computed and stored in cnorm.
        input - int n The order of the matrix A. n >= 0.
        input - double[][][2] complex A of dimension (lda, n) The triangular matrix A. If uplo = 'U', the leading n by n upper triangular part of the array A contains the upper triangular matrix, and the strictly lower triangular part of A is not referenced. If uplo = 'L', the leading n by n lower triangular part of the array A contains the lower triangular matrix, and the strictly upper triangular part of A is not referenced. If diag = 'U', the diagonal elements of A are also not referenced and are assumed to be 1.
        input - int lda The leading dimension of the array A. lda >= max (1,n).
        output - double[] scale of dimension (1) The scaling factor s for the triangular system A * x = s*b , A**T* x = s*b, or A**H * x = s*b. If scale[0] = 0, the matrix A is singular or badly scaled, and the vector x is an exact or approximate solution to A*x = 0.
        output - int[] info of dimension (1) = 0: successful exit
        • ztrsv

          public void ztrsv​(char uplo,
                            char trans,
                            char diag,
                            int n,
                            double[][][] A,
                            int lda,
                            double[][] x,
                            int incx)
          This is a port of the 10/22/86 Blas routine ZTRSV Original version written by: Jack Dongarra, Argonne National Lab. Jeremy Du Croz, Nag Central Office Sven Hammarling, Nag Central Office. Richard Hanson, Sandia National Labs. dtrsv solves one of the systems of equations A*x = b or A**T*x = b or A**H*X = b where b and x are n element vectors and A is an n by n unit, or non-unit, upper or lower triangular matrix. Veresion 3.7.0 December, 2016.

          No test for singularity or near-singularity is included in this routine. Such test must be performed before calling this routine.

          Parameters:
          uplo - input char On entry, uplo specifies whether the matrix is an upper or lower triangular matrix as follows = 'U' or 'u' A is an upper triangular matrix. = 'L' or 'l' A is a lower triangular matrix.
          trans - input char On entry, trans specifies the equations to be solved as follows: = 'N' or 'n' A*x = b = 'T' or 't' A**T*x = b = 'C' or 'c' A**H*x = b
          diag - input char On entry, diag specifies whether or not A is unit triangular as follows: = 'U' or 'u' A is assumed to be unit triangular. = 'N' or 'n' A is not assumed to be unit triangular.
          n - input int On entry, n specifies the order of matrix A. n must be at least zero.
          A - input double[][][2] complex of dimension lda by n Before entry with uplo = 'U' or 'u', the leading n by n upper triangular part of the array A must contain the upper triangular matrix and the strictly lower triangular part of A is not referenced. Before entry with uplo = 'L' or 'l', the leading n by n lower triangular part of the array A must contain the lower triangular matrix and the strictly upper triangular part of A is not referenced. Note that when diag = 'U' or 'u', the diagonal elements of A are not referenced either, but are assumed to be unity.
          lda - input int On entry, lda specifies the first dimension of A as declared in the calling (sub) program. lda must be at least max(1,n).
          x - input/output double[][2] complex of dimension at least (1 + (n-1)*abs(incx)). Before entry, the incremented array x must contain the n element right-hand side vector b. On exit, array x is overwritten with the solution vector x.
          incx - input int On entry, incx specifies the increment for the elements of x. incx must not be zero.
        • zdrscl

          private void zdrscl​(int n,
                              double sa,
                              double[][] sx,
                              int incx)
          This is a port of LAPACK version auxiliary routine 3.7.0 December, 2016 ZDRSCL. LAPACK is a software package provided by by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd. zdrslc multiplies a vector by the reciprocal of a real scalar. zdrscl multiplies an n-element complex vector x by the real scalar 1/a. This is done without overflow or underflow as long as the final result x/a does not overflow or underflow.
          Parameters:
          n - input integer The number of components of the vector x.
          sa - input double. The scalar which is used to divide each component. sa must be > 0, or the subroutine will divide by zero
          sx - input/output double[][2] complex array dimension (1 + (n-1)*abs(incx)) The n-element vector x
          incx - input integer The increment between successive values of the vector
        • zdscal

          private void zdscal​(int n,
                              double da,
                              double[][] zx,
                              int incx)
          This is a port of the BLAS level1 routine ZDSCAL version 3.7.0 December, 2016. BLAS is a software package provided by by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd. zdscal scales a vector by a constant
          Parameters:
          n - input integer Number of elements in input vector
          da - input double
          zx - input/output double[][2] complex array, dimension (1 + (n-1)*abs(incx))
          incx - storage spacing between elements of zx
        • zlacn2

          public void zlacn2​(int n,
                             double[][] v,
                             double[][] x,
                             double[] est,
                             int[] kase,
                             int[] isave)
          This is a port of LAPACK version auxiliary routine 3.7.0 ZLACN2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016. Contributor: Nick Higham, University of Manchester Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of a real or complex matrix, with applications to condition estimation", ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988. zlacn2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products. zlacn2 estimates the 1-norm of a square, complex matrix A. Reverse communication is used for evaluating matrix-vector products.
          Parameters:
          input - int n The order of the matrix. n >= 1.
          output - double[][2] complex v of dimension (n). On the final return, V = A*W, where EST = norm(V)/norm(W) (W is not returned).
        • zget01

          private void zget01​(int m,
                              int n,
                              double[][][] A,
                              int lda,
                              double[][][] AFAC,
                              int ldafac,
                              int[] ipiv,
                              double[] rwork,
                              double[] resid)
        • zget02

          public void zget02​(char trans,
                             int m,
                             int n,
                             int nrhs,
                             double[][][] A,
                             int lda,
                             double[][][] X,
                             int ldx,
                             double[][][] B,
                             int ldb,
                             double[] rwork,
                             double[] resid)
          This is a port of version 3.7.0 LAPACK test routine ZGET02. Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. December 2016 .. Scalar Arguments .. CHARACTER TRANS INTEGER LDA, LDB, LDX, M, N, NRHS DOUBLE PRECISION RESID .. .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), B( LDB, * ), RWORK( * ), $ X( LDX, * ) .. Purpose ======= ZGET02 computes the residual for a solution of a system of linear equations A*x = b or A'*x = b: RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ), where EPS is the machine epsilon. Arguments ========= TRANS (input) CHARACTER*1 Specifies the form of the system of equations: = 'N': A *x = b = 'T': A^T*x = b, where A^T is the transpose of A = 'C': A^H*x = b, where A' is the conjugate transpose of A M (input) INTEGER The number of rows of the matrix A. M >= 0. N (input) INTEGER The number of columns of the matrix A. N >= 0. NRHS (input) INTEGER The number of columns of B, the matrix of right hand sides. NRHS >= 0. A (input) DOUBLE PRECISION [][][2] complex array, dimension (LDA,N) The original M x N matrix A. LDA (input) INTEGER The leading dimension of the array A. LDA >= max(1,M). X (input) DOUBLE PRECISION [][][2] complex array, dimension (LDX,NRHS) The computed solution vectors for the system of linear equations. LDX (input) INTEGER The leading dimension of the array X. If TRANS = 'N', LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M). B (input/output) DOUBLE PRECISION [][][2] complex array, dimension (LDB,NRHS) On entry, the right hand side vectors for the system of linear equations. On exit, B is overwritten with the difference B - A*X. LDB (input) INTEGER The leading dimension of the array B. IF TRANS = 'N', LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N). RWORK (workspace) DOUBLE PRECISION array, dimension (M) RESID (output) DOUBLE PRECISION The maximum over the number of right hand sides of norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
        • zget03

          private void zget03​(int n,
                              double[][][] A,
                              int lda,
                              double[][][] AINV,
                              int ldainv,
                              double[][][] WORK,
                              int ldwork,
                              double[] rwork,
                              double[] rcond,
                              double[] resid)
        • zget04

          public void zget04​(int n,
                             int nrhs,
                             double[][][] X,
                             int ldx,
                             double[][][] XACT,
                             int ldxact,
                             double rcond,
                             double[] resid)
          This is a port of LAPACK version test routine 3.7.0 ZGET04.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016. zget04 computes the difference between a computed solution and the true solution to a system of linear equations. resid[0] = ( norm(X-XACT) * rcond) / ( norm(XACT) * eps), where rcond is the reciprocal of the condition number and eps is the machine epsilon.
          Parameters:
          input - int n The number of rows of the matrices X and XACT. n >= 0.
          input - int nrhs The number of columns of the matrices X and XACT. nrhs >= 0.
          input - double[][][2] complex X of dimension (ldx, nrhs) The computed solution vectors. Each vector is stored as a column of the matrix X.
          input - int ldx The leading dimension of the array X. ldx >= max(1, n).
          input - double[][][2] complex XACT of dimension (ldx, nrhs) The exact solution vectors. Each vector is stored as a column of the matrix XACT.
          input - int ldxact The leading dimension of the array XACT. ldxact >= max(1, n).
          input - double rcond The reciprocal of the condition number of the coefficient matrix in the system of equations.
          output - double[] of dimension 1 The maximum over the NRHS solution vectors of ( norm(X-XACT) * rcond) / ( norm(XACT) * eps)
        • zget07

          private void zget07​(char trans,
                              int n,
                              int nrhs,
                              double[][][] A,
                              int lda,
                              double[][][] B,
                              int ldb,
                              double[][][] X,
                              int ldx,
                              double[][][] XACT,
                              int ldxact,
                              double[] ferr,
                              boolean chkferr,
                              double[] berr,
                              double[] reslts)
        • zlantr

          private double zlantr​(char norm,
                                char uplo,
                                char diag,
                                int m,
                                int n,
                                double[][][] A,
                                int lda,
                                double[] work)
        • zgeequ

          private void zgeequ​(int m,
                              int n,
                              double[][][] A,
                              int lda,
                              double[] r,
                              double[] c,
                              double[] rowcnd,
                              double[] colcnd,
                              double[] amax,
                              int[] info)
        • zgesv

          public void zgesv​(int n,
                            int nrhs,
                            double[][][] A,
                            int lda,
                            int[] ipiv,
                            double[][][] B,
                            int ldb,
                            int[] info)
        • zgesvx

          public void zgesvx​(char fact,
                             char trans,
                             int n,
                             int nrhs,
                             double[][][] A,
                             int lda,
                             double[][][] AF,
                             int ldaf,
                             int[] ipiv,
                             char[] equed,
                             double[] r,
                             double[] c,
                             double[][][] B,
                             int ldb,
                             double[][][] X,
                             int ldx,
                             double[] rcond,
                             double[] ferr,
                             double[] berr,
                             double[][] work,
                             double[] rwork,
                             int[] info)
        • zlaqge

          private void zlaqge​(int m,
                              int n,
                              double[][][] A,
                              int lda,
                              double[] r,
                              double[] c,
                              double rowcnd,
                              double colcnd,
                              double amax,
                              char[] equed)
        • zlaghe

          private void zlaghe​(int n,
                              int k,
                              double[] d,
                              double[][][] A,
                              int lda,
                              int[] iseed,
                              double[][] work,
                              int[] info)
          This is a port of LAPACK auxiliary routine ZLAGHE version 3.7.0. Provided by the Univ. of Tennessee, Univ. of California Berkeley, Univ.of Colorado Denver and NAG Ltd. Decmeber 2016. zlaghe generates a complex hermitian matrix A, by pre- and post- multiplying a real diagonal matrix D with a random unitary matrix: A = U*D*U'. The semi-bandwith may then be reduced to k by additional unitary transformations.
          Parameters:
          n - input integer The order of the matrix A. n >= 0.
          k - input integer The number of nonzero subdiagonals within the band of A. 0
          d - input double[] array, dimension n. The diagonal elements of tghe diaognla matrix D.
          A - output double [][]][2] complex array dimension (lda,n) The generated n by n hermitian matrix A (the full matrix is stored).
          lda - input integer The leading dimension of the array A. lda >= n.
          iseed - input/output integer[] array, dimension (4). On entryh, the seed of the random number generator; the array elements must be betewen 0 and 4095, and iseed(3) must be odd. On exit, the seed is updated.
          work - output double [][2] complex array, dimension (2*n)
        • zhemv

          private void zhemv​(char uplo,
                             int n,
                             double[] alpha,
                             double[][][] A,
                             int lda,
                             double[][] x,
                             int incx,
                             double[] beta,
                             double[][] y,
                             int incy)
          This is a port of version 3.7.0 BLAS level2 routine ZHEMV proivded by Univ. of Tennessee, Univ. of California Berkeley, University of Colorado Denver and NAG Ltd., December, 2016 Originally written 22-October-1986 by Jack Dongarra, Argonne National Lab, Jeremy Du Croz, Nag Central Office, Sven Hammarling, Nag Central Office, and Richard Hanson, Sandia National Labs. zhemv performs the matrix-vector operation y := alpha*A*x + beta*y where alpha and beta are scalars, x and y are n element vectors and A is an n by n hermitian matrix.
          Parameters:
          uplo - input char On entry, uplo specifies whther the upper or lower triangular part of the array A is to be referenced as follows: uplo = 'U' or 'u' Only the upper triangular part of A is to be referenced. uplo = 'L' or 'l' Only the lower triangular part of A is to be referenced.
          n - input integer On entry, n specifies the order of the matrix A. n must be at least zero.
          alpha - input double[2] complex scalar
          A - input double[][][2] complex array, of dimension (lda, n) Before entry with uplo = 'U' or 'u', the leading n by n upper triangular part of the array A must contain the upper triangular part of the hermitian matrix and the strictly lower part of A is not referenced. Before entry with uplo = 'L' or 'l', the leading n by n lower triangular part of the array A must contain the lower triangular part of the hermitian matrix and the strictly upper triangular part of A is not referenced. Note that the imaginary parts of the diagonal elements need not be set and are assumed to be zero.
          lda - input integer On entry, lda specifies the first dimension of A in tbe calling (sub) program. lda must be at least max(1,n).
          x - input double[][2] complex array, dimension at least (1 + (n-1)*abs(incx)).
          incx - input integer On entry, incx specifies the increment for the elements of x. incx must not be zero.
          beta - input double[2] complex scalar. When beta is supplied as zero, y need not be set on input.
          y - input/output double[][2] complex array, dimension at least (1 + (n-1)*abs(incy))
          incy - input integer incy specifies the increment for the elements of y. incy must not be zero.
        • zher2

          private void zher2​(char uplo,
                             int n,
                             double[] alpha,
                             double[][] x,
                             int incx,
                             double[][] y,
                             int incy,
                             double[][][] A,
                             int lda)
          This is a port of version 3.7.0 BLAS level2 routine ZHER2 proivded by Univ. of Tennessee, Univ. of California Berkeley, University of Colorado Denver and NAG Ltd., December, 2016 Originally written 22-October-1986 by Jack Dongarra, Argonne National Lab, Jeremy Du Croz, Nag Central Office, Sven Hammarling, Nag Central Office, and Richard Hanson, Sandia National Labs. zher2 performs the hermitian rank 2 operation A := alpha*x*y**H + conj(alpha)*y*x**H + A, where alpha is a scalar, x and y are n element vectors, and A is an n by n hermitian matrix.
          Parameters:
          uplo - input char On entry, uplo specifies whether the upper or lower triangular part of the array A is to be referenced as follows: uplo = 'U' or 'u' Only the upper triangular part of A is to be referenced. uplo = 'L' or 'l' Only the lower triangular part of A is to be referenced.
          n - input integer On entry, n specifies the order of the matrix A. n must be at least zero.
          alpha - input double[2] complex scalar
          x - input double[][2] complex array, dimension at least (1 + (n-1)*abs(incx)).
          incx - input integer On entry, incx specifies the increment for the elements of x. incx must not be zero.
          y - input double[][2] complex array, dimension at least (1 + (n-1)*abs(incy)).
          A - input/output double[][][2] complex array, dimension (lda, n) Before entry with uplo = 'U' or 'u', the leading n by n upper triangular part of the array A must contain the upper triangular part of the hermitian matrix and the strictly lower part of A is not referenced. On exit, the upper triangular part of A is overwritten by the upper triangular part of the updated matrix. Before entry iwth uplo = 'L' or 'l', the leading n by n lower triangular part of the array A must contain the lower triangular part of the hermitian matrix and the strictly upper part of A is not referenced. On exit, the lower triangular part of the array A is overwritten by the lower triangular part of the updated matrix. Note that the imaginary parts of the diagonal elements need not be set, they are assumed to be zero, and on exit they are set to zero.
          lda - input integer On entry, lda specifies the first dimension of A as declared in the calling (sub) program. lda must be at least max(1,n).
        • zlagge

          public void zlagge​(int m,
                             int n,
                             int kl,
                             int ku,
                             double[] D,
                             double[][][] A,
                             int lda,
                             int[] iseed,
                             double[][] work,
                             int[] info)
          This is a port of version 3.7.0 LAPACK auxiliary test routine ZLAGGE Original ZLAGGE created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., December, 2016 zlagge generates a complex general m by n matrix A, by pre- and post- multiplying a real diagonal matrix D with random unitary matrices: A = U*D*V. The lower and upper bandwidths may then be reduced to kl and ku by additional unitary transformations.
          Parameters:
          m - input int The number of rows of the matrix A. m >= 0.
          n - input int The number of columns of the matrix A. n >= 0.
          kl - input int The number of nonzero subdiagonals within the band of A. 0
          ku - input int The number of nonzero superdiagonals within the band of A. 0
          D - input double[] of dimension (min(m,n)) The diagonal elements of the diagonal matrix D
          A - output double[][][2] complex of dimension (lda,n) The generated m by n matrix A.
          lda - input int The leading dimension of the array A. lda >= m.
          iseed - input/output int[] of dimension 4 On entry, the seed of the random number generator; the array elements must be between 0 and 4095, and iseed[3] must be odd. On exit, the seed is updated.
          work - workspace double[][2] complex of dimension (m+n)
          info - output int[] = 0: successful exit
        • zlarnv

          public void zlarnv​(int idist,
                             int[] iseed,
                             int n,
                             double[][] x)
          This is a port of version 3.7.0 LAPACK auxiliary routine ZLARNV Original ZLARNV created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlarnv returns a vector of n random complex numbers from a uniform or normal distribution
          Parameters:
          idist - input int Specifies the distribution of the random numbers: = 1: real and imaginary parts each uniform (0,1) = 2: real and imaginary parts each uniform (-1,1) = 3: real and imaginary parts each normal (0,1) = 4: uniformly distributed on the disc abs(z)
          iseed - input/output int[] of dimension 4. On entry, the seed of the random number generator; the array elements must be between 0 and 4095, and iseed[3] must be odd. On exit, the seed is updated
          n - input int The number of random numbers to be generated.
          x - output double[][2] complex of dimension n. The random generated numbers. The routine calls the auxiliary routine dlaruv to generate random real numbers from a uniform (0,1) distribution, in batches of up to 128 using vectorizable code. The Box-Muller method is used to transform numbers from a uniform to a normal distribution.
        • dznrm2

          public double dznrm2​(int n,
                               double[][] x,
                               int incx)
          BLAS level1 routine version 3.7.0 December, 2016 This is a port of the 10/14/93 DZNRM2 function Original code written by Sven Hammarling, Nag Ltd. dznrm2 returns the euclidean norm of a vector via the function sqrt(x**H*x)
          Parameters:
          n - int
          x - double[][2] complex vector
          incx - int
          Returns:
          double
        • zgemv

          public void zgemv​(char trans,
                            int m,
                            int n,
                            double[] alpha,
                            double[][][] A,
                            int lda,
                            double[][] x,
                            int incx,
                            double[] beta,
                            double[][] y,
                            int incy)
          From LAPACK 3.7.0 December 2106 Routine ported from 10/22/86 blas zgemv subroutine Original version written by: Jack Dongarra, Argonne National Lab. Jeremy Du Croz, Nag Central Office Sven Hammarling, Nag Central Office. Richard Hanson, Sandia National Labs. dgemv performs one of the matrix-vector operations y = alpha*A*x + beta*y, or y = alpha*A**T*x + beta*y, or y = alpha*A**H*x + beta*y where alpha and beta are scalars, x and y are vectors, and A is an m by n matrix
          Parameters:
          trans - input char On entry, trans specifies the operation to be performed as follows: = 'N' or 'n' y = alpha*A*x + beta*y = 'T' or 't' y = alpha*A**T*x + beta*y = 'C' or 'c' y = alpha*A**H*x + beta*y
          m - input int On entry, m specifies the mumber of rows of matrix A. m must be at least zero.
          n - input int On entry, n specifies the number of columns of matrix A. n must be at least zero.
          alpha - input double[2] complex specified scalar
          A - input double[][][2] complex dimension lda by n Before entry, the leading m by n part of the array A must contain the matrix of coefficients.
          lda - input int On entry, lda specifies the first dimension of A as declared in the calling (sub) program. lda must be at least max(1, m).
          x - input double[][2] complex array of dimension at least (1 + (n-1)*abs(incx)) when trans = 'N' or 'n' and at least (1 + (m-1)*abs(incx)) otherwise. Before entry, the incremented array x must contain the vector x.
          incx - input int On entry, incx specifies the increment for the elements of x. incx must not be zero.
          beta - input double[2] complex specified scalar When beta is supplied as zero, then y need not be set on input.
          y - input/output double[][2] complex array of dimension at least (1 + (m-1)*abs(incy)) when trans = 'N' or 'n' and at least (1 + (n-1)*abs(incy)) otherwise. Before entry with beta non-zero, the incremented array y must contain the vector y. On exit, array y is overwritten with the updated vector y.
          incy - input int On entry, incy specifies the increment for the elements of y. incy must not be zero.
        • zgerc

          public void zgerc​(int m,
                            int n,
                            double[] alpha,
                            double[][] x,
                            int incx,
                            double[][] y,
                            int incy,
                            double[][][] A,
                            int lda)
          This is a port of the 10/22/86 Blas routine ZGERC Original version written by: Jack Dongarra, Argonne National Lab. Jeremy Du Croz, Nag Central Office. Sven Hammarling, Nag Central Office. Richard Hanson, Sandia National Labs. zgerc performs the rank 1 operation A = alpha*x*y**H + A, where alpha is a scalar, x is an m element vector, y is an n element vector, and A is an m by n matrix.
          Parameters:
          m - input int On entry, m specifies the number of rows of the matrix A. m must be at least zero.
          n - input int On entry, n specifies the number of columns of the matrix A. n must be at least zero.
          alpha - input double[2] Specified complex scalar
          x - input double[][2] complex of dimension at least (1 + (m-1)*abs(incx)). Before entry, the incremented array x must contain the m element vector x.
          incx - input int On entry, incx specifies the increment for the elements of x. incx must not be zero.
          y - input double[][2] complex of dimension at least (1 + (n-1)*abs(incy)). Before entry, the incremented array y must contain the n element vector y.
          incy - input int On entry, incy specifies the increment for the elements of y. incy must not be zero.
          A - input/output double[][][2] complex of dimension lda by n. Before entry, the leading m by n part of the array A must contain the matrix of coefficients. On exit, A is overwritten by the updated matrix.
          lda - input int On entry, lda specifies the first dimension of A as declared in the calling (sub) program. lda must be at least max(1,m).
        • zlange

          public double zlange​(char norm,
                               int m,
                               int n,
                               double[][][] A,
                               int lda,
                               double[] work)
          This is a port of the version 3.7.0 LAPACK auxiliary routine ZLANGE Original ZLANGE created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlange returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the largest absolute value of any element of a complex rectangular matrix.
          Parameters:
          norm - input char Specifies the value to be returned from zlange as: = 'M' or 'm' returns max(abs(A[i][j])). Note that this is not a matrix norm. = '1', 'O' or 'o' returns norm1(A), where norm1 denotes the one norm of a matrix (maximum column sum) = 'I' or 'i' returns normI(A), where normI denotes the infinity norm of a matrix (maximum row sum) = 'F', 'f', 'E', or 'e' returns normF(A), where normF denotes the Frobenius norm of a matrix (square root of sum of squares).
          m - input int The number of rows of the matrix A. m >= 0. When m = 0, dlange returns zero.
          n - input int The number of columns of the matrix A. n >= 0. When n = 0, dlange returns zero.
          A - input double[][][2] complex array of dimension (lda,n). Contains the m by n matrix A.
          lda - input int The leading dimension of the array A. lda >= max(1,m).
          work - workspace double[] of dimension max(1, lwork), where lwork >= m when norm = 'I'; otherwise, work is not referenced.
          Returns:
          double
        • zlassq

          public void zlassq​(int n,
                             double[][] x,
                             int incx,
                             double[] scale,
                             double[] sumsq)
          This is a port of version 3.7.0 LAPACK auxiliary routine ZLASSQ Original ZLASSQ created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlassq returns the values scl and smsq such that (scl**2)*smsq = x[0]**2 + x[incx]**2 + ... + x[(n-1)*incx]**2 + (scale**2)*sumsq The value of sumsq is assumed to be non-negative and scl returns the value scl = max(scale,abs(real(x[i])),abs(imag(x[i))). scale and sumsq refer to the original supplied values in scale[] and sumsq[]. scl and smsq are the returned values in scale[] and sumsq[] that overwrite the orginal values. This routine makes only one pass through the vector x.
          Parameters:
          n - input int The number of elements to be used from the vector x
          x - input double[][2] The complex vector for which a scaled sum of squares is computed, using x[0], x[incx], ..., x[(n-1)*incx]
          incx - input int The increment between successive values of the vector x. incx > 0.
          scale - input/output double[] On entry, the value scale in the equation above. On exit, scale is overwritten with scl, the scaling factor for the sum of squares
          sumsq - input/output double[] On entry, the value sumsq in the equation above. On exit, sumsq is overwritten with smsq, the basic sum of squares from which scl has been factored out.
        • ztrmv

          public void ztrmv​(char uplo,
                            char trans,
                            char diag,
                            int n,
                            double[][][] A,
                            int lda,
                            double[][] x,
                            int incx)
          This is a port of the 10/22/86 blas routine ZTRMV Original version written by: Jack Dongarra, Argonne National Lab. Jeremy Du Croz, Nag Central Office Sven Hammarling, Nag Central Office Richard Hanson, Sandia National Labs. Version 3.7.0 December, 2016. ztrmv performs one of the matrix-vector operations x = A*x or x = A**T*x or x = A**H*x where x is an n element vector and A is an n by n unit, or non-unit, upper or lower triangular matrix
          Parameters:
          uplo - input char On entry, uplo specifies whether the matrix is an upper or lower triangular matrix as follows: = 'U' or 'u' A is an upper triangular matrix = 'L' or 'l' A is a lower triangular matrix
          trans - input char On entry, trans specifies the operation to be performed as follows: = 'N' or 'n', x = A*x = 'T' or 't', x = A**T*x = 'C' or 'c', x = A**H*x
          diag - input char On entry, diag specifies whether or not A is unit triangular as follows: = 'U' or 'u' A is assumed to be unit triangular. = 'N' or 'n' A is not assumed to be unit triangular.
          n - input int On entry, n specifies the order of the matrix A. n must be at least zero.
          A - input double[][][2] dimension lda by n complex Before entry with uplo = 'U' or 'u', the leading n by n upper triangular part of the array A must contain the upper triangular matrix and the strictly lower triangular part of A is not referenced. Before entry with uplo = 'L' or 'l', the leading n by n lower triangular part of the array A must contain the lower triangular matrix and the strictly upper triangular part of A is not referenced. Note that when diag = 'U' or 'u', the diagonal elements of A are not referenced either, but are assumed to be unity.
          lda - input int On entry, lda specifies the first dimension of A as declared in the calling (sub) program. lda must be at least max(1,n).
          x - input/output double[][2] complex of dimension at least (1 + (n-1)*abs(incx)) Before entry, the incremented array x must contain the n element vector x. On exit, array x is is overwritten with the transformed vector x.
          incx - input int On entry, incx specifies the increment for the elements of x. incx must not be zero.
        • zlacpy

          public void zlacpy​(char uplo,
                             int m,
                             int n,
                             double[][][] A,
                             int lda,
                             double[][][] B,
                             int ldb)
          This is a port of LAPACK version 3.7.0 auxiliary routine DLACPY. Original DLACPY created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlacpy copies all or part of a two-dimensional matrix A to another matrix B.
          Parameters:
          uplo - input char Specifies the part of the matrix A to be copied to B. = 'U': Upper triangular part = 'L': Lower triangular part Otherwise: All of the matrix A
          m - input int The number of rows of the matrix A. m >= 0.
          n - input int The number of columns of the matrix A. n >= 0.
          A - input double[][][2] complex of dimension (lda,n). Has m by n matrix A. If uplo = 'U', only the upper triangle or trapezoid is accessed; if uplo = 'L', only the lower triangle or trapezoid is accessed.
          lda - input int The leading dimension of the array A. lda >= max(1,m).
          B - output double[][][2] co mplexof dimension (ldb,n). On exit, B = A in the locations specified by uplo.
          ldb - input int The leading dimension of the array B. ldb >= max(1,m).
        • zdotu

          private double[] zdotu​(int n,
                                 double[][] zx,
                                 int incx,
                                 double[][] zy,
                                 int incy)
          This is a a port of BLAS level1 routine ZDOTU version 3.7.0. Provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 Original code Jack Dongarra, 3/11/78 and modifed 12/3/93. zdotu forms the dot product of two complex vectors. zdotu = x^T * y
          Parameters:
          n - input integer number of elements in the input vectors
          zx - input double[][2] complex array, dimension (1 + (n-1)*abs(incx))
          incx - input integer storage spacing between elements of zx
          zy - input double[][2] complex array, dimension (1 + (n-10*abs(incy))
          incy - input integer storage spacing between elements of zy
        • zlaset

          public void zlaset​(char uplo,
                             int m,
                             int n,
                             double[] alpha,
                             double[] beta,
                             double[][][] A,
                             int lda)
          This is a port of version 3.7.0 auxiliary routine ZLASET. Original ZLASET created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlaset initializes an m-by-n matrix A to beta on the diagonal and alpha on the offdiagonals.
          Parameters:
          uplo - input char Specifies the part of the matrix to be set. = 'U': Upper triangular part is set; the strictly lower triangular part of A is not changed. = 'L': Lower triangular part is set; the strictly upper triangular part of A is not changed. Otherwise: All of the matrix A is set.
          m - input int The number of rows of the matrix A. m >= 0.
          n - input int The number of columns of the matrix A. n >= 0.
          alpha - input double[2] The complex constant to which the offdiagonal elements are to be set.
          beta - input double[2] The complex constant to which the diagonal elements are to be set.
          A - input/output double[][][2] complex of dimension lda by n. On exit, the leading m-by-n submatrix of A is set as follows: If uplo = 'U', A(i,j) = alpha, 0
          lda - input int The leading dimension of the array A. lda >= max(1,m).
        • zlarnd

          private double[] zlarnd​(int idist,
                                  int[] iseed)
          This is a port of the LAPACK routine ZLARND.f version 3.7.0 LAPACK is a software package provided by University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December, 2016 zlarnd returns a random complex number from a uniform or normal distribution.
        • zlarot

          public void zlarot​(boolean lrows,
                             boolean lleft,
                             boolean lright,
                             int nl,
                             double[] c,
                             double[] s,
                             double[][] A,
                             int lda,
                             double[] xleft,
                             double[] xright)
          This is a port of version 3.7.0 LAPACK auxiliary test routine ZLAROT Original ZLAROT created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., December, 2016 zlarot applies a (Givens) rotation to two adjacent rows or columns, where one element of the first and/or last collumn/row for use on matrices stored in some format other than GE, so that elements of the matrix may be used or modified for which no array element is provided.

          One example is a symmetric matrix in SB format (bandwidth=4), for which uplo = 'L': Two adjacent rows will have the format: row j: * * * * * . . . . row j+1: * * * * * . . . . '*' indicates elements for which storage is provided, '.' indicates elements for which no storage is provided, but are not necessrily zero; their values are determined by symmetry. ' ' indicates elements which are necessarily zero, and have no storage provided.

          Those columns which have two '*'s can be handled by zrot. Those columns which have no '*'s can be ignored, since as long as the Givens rotations are carefully applied to preserve symmetry, their values are determined. Those columns which have one '*' have to be handled separately, by using separate variables "p" and "q": row j: * * * * * * p . . . row j+1: q * * * * * . . . .

          The element p would have to be set correctly, then that column is rotated, setting p to its new value. The next call to zlarot would rotate columns j and j+1, using p, and restore symmetry. The element q would start out being zero, and be made non-zero by the rotation. Later, rotations would presumably be chosen to zero q out.

          Typical Calling Sequences: rotating the i-th and (i+1)-st rows.

          General dense matrix: zlarot(true, false, false, n, c, s, A[i-1][0], lda, dummy, dummy);

          General banded matrix in GB format: j = Math.max(1, i-kl); nl = Math.min(n, i+ku+1) + 1 - j; dlarot(true, (i-kl) >= 1, (i+ku)

          Symmetric banded matrix in SY format, bandwidth k, lower triangle only: j = Math.max(1,i-k); nl = Math.min(k+1,i) + 1; zlarot(true, (i-k) >= 1, true, nl, c, s, A[i-1][j-1], lda, xleft, xright);

          Same, but upper triangle only: nl = Math.min(k+1,n-i) + 1; zlarot(true, true, (i+k)

          Symmetric banded matrix in SB format, bandwidth k, lower triangle only: same as for sy, except: A[i-j][j-1], lda - 1, xleft, xright); Note that i+1-j is just min(i,k+1)

          Same, but upper triangle only: A[k][i-1], lda-1, xleft, xright);

          Rotating columns is just the transpose of rotating rows, except for GB and SB: (rotating columns i and i+1)

          GB: j = Math.max(1,i-ku); nl = Math.min(n, i+kl+1) + 1 - j; zlarot(true, i-ku >= 1, i+kl

          SB: (upper triangle) ............. A[k+j-i][i-1], lda-1, xtop, xbottm);

          SB: (lower triangle) ................... A[0][i-1], lda-1, xtop, xbottm);

          Parameters:
          lrows - input boolean If true, then zlarot will rotate two rows. If false, then it will rotate two columns.
          lleft - input boolean If true, then xleft will be used instead of the corresponding element of A for the first element in the second row (if lrows = false) or column (if lrows = true) If false, then the corresponding element of A will be used.
          lright - input boolean If true, then xright will be used instead of the corresponding element of A for the last element in the first row (if lrows = false) or column (if lrows = true). If false, then the corresponding element of A will be used.
          nl - input int The length of the rows (if lrows = true) or columns (if lrows = false) to be rotated. If xleft and/or xright are used, the columns/rows they are in should be included in nl, e.g., if lleft = lright = true, then nl must be at least 2. The number of rows/columns to be rotated exclusive of those involving xleft and/or xright may not be negative, i.e., nl minus how many of lleft and lright are true must be at least zero; if not, an error message will be output.
          c - input double[2] complex
          s - input double[2] complex c and s specify the Givens rotation to be applied. If lrows is true, then the matrix ( c s) (-s c ) is applied from the left; if false, then the transpose (not conjugated) thereof is applied from the right. Note that in contrast to the output of zrotg or to most versions of zrot, both c and s are complex. For a Givens rotation, |c|**2 + |s|**2 should be 1, but this is not checked.
          A - input/output double[][2] The complex array containing the rows/columns to be rotated. The first element of A should be the upper left element to be rotated.
          lda - input int The "effective" leading dimension of A. If A contains a matrix stored in GE, HE, or SY format, then this is just the leading dimension of A as dimensioned in the calling routine. If A contains a matrix stored in band (GB, HB, or SB) format, then this should be *one less* than the leading dimension used in the calling routine. Thus, if A were dimensioned A(lda,*) in zlarot, then A[0][j-1] would be the j-th element in the first of the two rows to be rotated, and A[1][j-1] would be the j-th in the second, regardless of how the array may be stored in the calling routine. [A cannot, however, actually be dimensioned thus, since for band format, the row number may exceed lda, which is not legal code.] If lrows = true, then lda must be at least 1, otherwise it must be at least nl minus the number of true values in xleft and xright.
          xleft - input/output double[][2] complex If lleft is true, then xleft will be used and modified instead of A[1][0] (if lrows = true) or A[0][1] (if lrows = false).
          xright - input/output double[][2] complex If lright is true, then xright will be used and modified instead of A[0][nl-1] (if lrows = true) or A[nl-1][0] (if lrows = false).
        • zlartg

          public void zlartg​(double[] f,
                             double[] g,
                             double[] cs,
                             double[] sn,
                             double[] r)
          This is a port of version 3.7.0 LAPACK auxiliary routine ZLARTG Original ZLARTG created by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd., December, 2016 zlartg generates a plane rotation with real cosine and complex sine. zlartg generates a plane rotation so that [ cs sn ] . [ f ] = [ r ] where cs**2 + |sn|**2 = 1. [ -sn cs ] [ g ] [ 0 ] If g = 0, then cs = 1 and sn = 0. If f = 0, then cs = 0 and sn is chosenso that r is real.
          Parameters:
          f - input double[2] The first complex component of the vector to be rotated.
          g - input double[2] The second complex component of the vector to be rotated.
          cs - output double[1] The real cosine of the rotation.
          sn - output double[2] The complex sine of the rotation.
          r - output double[2] The nonzero complex component of the rotated vector. 3/5/1996 Modified with a new algorithm by W. Kahan and J. Demmel
        • zlagsy

          public void zlagsy​(int n,
                             int k,
                             double[] D,
                             double[][][] A,
                             int lda,
                             int[] iseed,
                             double[][] work,
                             int[] info)
          This is a port of version 3.7.0 LAPACK auxiliary test routine zlagsy Original ZLAGSY created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., December, 2016 zlagsy generates a complex symmetric matrix A, by pre- and post- multiplying a real diagonal matrix D with a random unitary matrix: A = U*D*U**T. The semi-bandwidth may then be reduced to k by additional unitary transformations.
          Parameters:
          n - input int The order of the matrix A. n >= 0.
          k - input int The number of nonzero subdiagonals within the band of A. 0
          D - input double[] of dimension n. The diagonal elements of the diagonal matrix D.
          A - output double[][][2] complex of dimension (lda,n) The generated n by n symmetric matrix A (the full matrix is stored).
          lda - input int The leading dimension of the array A. lda >= n.
          iseed - input/output int[] of dimension 4 On entry, the seed of the random number generator; the array elements must be between 0 and 4095, and iseed[3] must be odd. On exit, the seed is updated.
          work - workspace double[][2] complex of dimension (2*n)
          info - output int[] = 0: successful exit
        • zdotc

          public double[] zdotc​(int n,
                                double[][] zx,
                                int incx,
                                double[][] zy,
                                int incy)
          BLAS level1 routine version 3.7.0 December, 2016 Port of 12/3/93 linpack zdotc routine Original version created by Jack Dongarra Forms the dot product of two complex vectors x**H * Y.
          Parameters:
          n - int number of elements input vector(s)
          zx - double[][2] complex array of dimension (1 + (n-1)*abs(incx))
          incx - int storage spacing between elements of zx
          zy - double[][2] complex array of dimension (1 + (n01)*abs(incy))
          incy - int storage spacing between elements of zy
          Returns:
          double[2] complex answer
        • zaxpy

          public void zaxpy​(int n,
                            double[] za,
                            double[][] zx,
                            int incx,
                            double[][] zy,
                            int incy)
          BLAS level1 routine version 3.7.0 December, 2016 Port of 12/3/93 linpack routine zaxpy Original version written by Jack Dongarra vector dy = vector dy + da * vector dx.
          Parameters:
          n - input int
          za - inut double[2] complex
          zx - input double[][2] complex array, dimension (1 + (n-1)*abs(incx))
          incx - input int storage spacing between elements of zx
          zy - input/output double[][2] complex, dimension (! = (n-1)*abs(incy))
          incy - input int spacing between elements of zy
        • zsymv

          public void zsymv​(char uplo,
                            int n,
                            double[] alpha,
                            double[][][] A,
                            int lda,
                            double[][] x,
                            int incx,
                            double[] beta,
                            double[][] y,
                            int incy)
          LAPACK auxiliary routine version 3.7.0 December, 2016 This is a port of the 10/22/86 Blas routine ZSYMV Original code written by: Jack Dongarra, Argonne Nationa Lab. Jeremy Du Croz, Nag Central Office. Sven Hammarling, Nag Central Office. Richard Hanson, Sandia National Labs. zsymv performs the matrix-vector operation y = alpha*A*x + beta*y where alpha and beta are scalars, x and y are n element vectors and A is an n by n symmetric matrix.
          Parameters:
          uplo - input char On entry, uplo specifies whether the upper or lower triangular part of the array A is to be referenced as follows: = 'U' or 'u' Only the upper triangular part of A is to be referenced. = 'L' or 'l' Only the lower triangular part of A is to be referenced.
          n - input int On entry, n specifies the order of the matrix A. n must be at least zero.
          alpha - input double[2] Specified complex scalar
          A - input double[][][2] complex of dimension lda by n Before entry with uplo = 'U' or 'u', the leading n by n upper triangular part of the array A must contain the upper triagular part of the symmetric matrix and the strictly lower triangular part of A is not referenced. Before entry with uplo = 'L' or 'l', the leading n by n lower triangular part of the array A must contain the lower triangular part of the symmetric matrix and the strictly upper triangular part of A is not referenced.
          lda - input int On entry, lda specifies the first dimension of A as declared in the calling (sub) program. lda must be at least max(1,n).
          x - input double[][2] complex of dimension at least (1 + (n-1)*abs(incx)). Before entry, the incremented array x must contain the n element vector x.
          incx - input int On entry, incx specifies the increment for the elements of x. incx must not be zero.
          beta - input double[2] complex On entry, beta specifies the scalar beta. When beta is supplied as zero, then y need not be set on input.
          y - input/output double[][2] complex of dimension at least (1 + (n-1)*abs(incy)). Before entry, the incremented array y must contain the n element vector y. On exit, y is overwritten by the updated vector y.
          incy - input int On entry, incy specifies the increment for the elements of y. incy must not be zero.
        • abs1

          private double abs1​(double[] ff)
        • abssq

          private double abssq​(double[] ff)
        • zgetri

          public void zgetri​(int n,
                             double[][][] A,
                             int lda,
                             int[] ipiv,
                             double[][] work,
                             int lwork,
                             int[] info)
        • ztrtri

          public void ztrtri​(char uplo,
                             char diag,
                             int n,
                             double[][][] A,
                             int lda,
                             int[] info)
          This is a port of LAPACK version routine 3.7.0 ZTRTRI.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016. ztrtri computes the inverse of a complex upper or lower triangular matrix A. This is a level 3 BLAS version of the algorithm.
          Parameters:
          input - char uplo = 'U': A is upper triangular = 'L': A is lower triangular
          input - char diag = 'N': A is non-unit triangular = 'U': A is unit triangular
          input - int n The order of the matrix A. n >= 0.
          inpuut - int lda The leading dimension of the array A. lda >= max(1,n).
          output - int[] info of dimension 1. = 0: successful exit 0: if info[0] = i, A[i-1][i-1] is exactly zero. The triangular matrix is singular and its inverse can not be computed.
        • ztrti2

          private void ztrti2​(char uplo,
                              char diag,
                              int n,
                              double[][][] A,
                              int lda,
                              int[] info)
          This is a port of LAPACK version routine 3.7.0 ZTRTI2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., December 2016. ztrti2 computes the inverse of a triangular matrix (unblocked algorithm). ztrti2 computes the inverse of a complex upper or lower triangular matrix. This is the level 2 BLAS version of the algorithm.
          Parameters:
          input - char uplo Specifies whether the matrix A is upper or lower triangular. = 'U': Upper triangular = 'L': Lower triangular
          input - char diag Specifies whether or not the matrix A is unit triangular. = 'N': Non-unit triangular = 'U': Unit triangular
          input - int n The order of the matrix A. n >= 0.
          input - int lda The leading dimension of the array A. lda >= max(1,n).
          output - int[] info of dimension 1. = 0: successful exit
        • zscal

          public void zscal​(int n,
                            double[] za,
                            double[][] zx,
                            int incx)
          Routine ported from 12/3/93 linpack dscal Original version written by Jack Dongarra Scales a vector by a constant zscal scales a vector by a constant. BLAS level1 routine version 3.7.0 BLAS is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, and NAG Ltd.
          Parameters:
          n - int number of elements in input vector
          za - double[] complex scalar
          zx - double[][2] complex array, dimension (!= (n-1)*abs(incx))
          incx - int storage spacing between elements of zx
        • zgerfs

          private void zgerfs​(char trans,
                              int n,
                              int nrhs,
                              double[][][] A,
                              int lda,
                              double[][][] AF,
                              int ldaf,
                              int[] ipiv,
                              double[][][] B,
                              int ldb,
                              double[][][] X,
                              int ldx,
                              double[] ferr,
                              double[] berr,
                              double[][] work,
                              double[] rwork,
                              int[] info)
        • zgetrs

          public void zgetrs​(char trans,
                             int n,
                             int nrhs,
                             double[][][] A,
                             int lda,
                             int[] ipiv,
                             double[][][] B,
                             int ldb,
                             int[] info)
        • zgetrf

          public void zgetrf​(int m,
                             int n,
                             double[][][] A,
                             int lda,
                             int[] ipiv,
                             int[] info)
        • zgetrf2

          private void zgetrf2​(int m,
                               int n,
                               double[][][] A,
                               int lda,
                               int[] ipiv,
                               int[] info)
        • zlaswp

          private void zlaswp​(int n,
                              double[][][] A,
                              int lda,
                              int k1,
                              int k2,
                              int[] ipiv,
                              int incx)
        • ztrmm

          public void ztrmm​(char side,
                            char uplo,
                            char transa,
                            char diag,
                            int m,
                            int n,
                            double[] alpha,
                            double[][][] A,
                            int lda,
                            double[][][] B,
                            int ldb)
          This is a port of the 2/8/89 Blas level 3 routine ZTRMM Original code written by: Jack Dongarra, Argonne National Laboratory Iain Duff, AERE Harwell. Jeremy Du Croz, Numerical Algorithms Group Ltd. Sven Hammarling, Numerical Algorithms Group Ltd. ztrmm performs one of the matrix-matrix operations B = alpha*op(A)*B or B = alpha*B*op(A), where alpha is scalar, B is an m by n matrix, A is a unit, or non-unit, upper or lower tringular matrix and op(A) is one of op(A) = A or op(A) = A**T or op(A) = A**H. Version 3.7.0 December, 2016
          Parameters:
          side - input char On entry, side specifies whether op(A) multiplies B from the left or right as follows: = 'L' or 'l' B = alpha*op(A)*B = 'R' or 'r' B = alpha*B*op(A)
          uplo - input char On entry, uplo specifies whether matrix A is an upper or lower triangular matrix as follows: = 'U' or 'u' A is an upper triangular matrix = 'L' or 'l' A is a lower triangular matrix
          transa - input char On entry, transa specifies the form of op(A) to be used in the matrix multiplication as follows: = 'N' or 'n' op(A) = A = 'T' or 't' op(A) = A**T = 'C' or 'c' op(A) = A**H
          diag - input char On entry, diag specifies whether or not A is unit triangular as follows: = 'U' or 'u' A is assumed to be unit triangular = 'N' or 'n' A is not assumed to be unit triangular
          m - input int On entry, m specifies the number of rows of B. m must be at least zero.
          n - input int On entry, n specifies the number of columns of B. n must be at least zero.
          alpha - input double[2] Specified complex scalar. When alpha is zero then A is not referenced and B need not be set before entry.
          A - input double[][][2] complex of dimension lda by k, where k is m when side = 'L' or 'l' and is n when side = 'R' or 'r'. Before entry with uplo = 'U' or 'u', the leading k by k upper triangular part of the array A must contain the upper triangular matrix and the strictly lower triangular part of A is not referenced. Before entry with uplo = 'L' or 'l', the leading k by k lower triangular part of the array A must contain the lower triangular matrix and the strictly upper triangular part of A is not referenced. Note that when diag = 'U' or 'u', the diagonal elements of A are not referenced either, but are assumed to be unity.
          lda - input int On entry, lda specifies the first dimension of A as declared in the calling (sub) program. When side = 'L' or 'l' then lda must be at least max(1,m), when side = 'R' or 'r' then lda must be at least max(1,n).
          B - input/output double[][][2] complex of dimension ldb by n Before entry, the leading m by n part of the array B must contain the matrix B, and on exit is overwritten by the transformed matrix.
          ldb - input int On entry, ldb specifies the first dimension of B as declared in the calling (sub) program. ldb must be at least max(1,m).
        • ztrsm

          public void ztrsm​(char side,
                            char uplo,
                            char transa,
                            char diag,
                            int m,
                            int n,
                            double[] alpha,
                            double[][][] A,
                            int lda,
                            double[][][] B,
                            int ldb)
          This is a port of the 2/8/89 Blas routine ZTRSM Original code written by: Jack Dongarra, Argonne National Laboratory Iain Duff, AERE Harwell. Jeremy Du Croz, Numerical Algorithms Group Ltd. Sven Hammarling, Numerical Algorithms Group Ltd. ztrsm solves one of the matrix equations op(A)*X = alpha*B or X*op(A) = alpha*B, where alpha is a scalar, X and B are m by n matrices, A is a unit, or non-unit, upper or lower triangular matrix and op(A) is one of op(A) = A or op(A) = A**T or op(A) = A**H. The matrix X is overwritten on B.
          Parameters:
          side - input char On entry, side specifies whether op(A) appears on the left or right or X as follows: = 'L' or 'l' op(A)*X = alpha*B = 'R' or 'r' X*op(A) = alpha*B
          uplo - input char On entry, uplo specifies whether the matrix A is an upper or lower triangular matrix as follows: = 'U' or 'u' A is an upper triangular matrix = 'L' or 'l' A is a lower triangular matrix
          transa - input char On entry, transa specifies the form of op(A) to be used in the matrix multiplication as follows: = 'N' or 'n' op(A) = A, 'T' or 't' op(A) = A**T, 'C' or 'c' op(A) = A**H
          diag - input char On entry, diag specifies whether or not A is unit triangular as follows: = 'U' or 'u' A is assumed to be unit triangular. = 'N' or 'n' A is not assumed to be unit triangular.
          m - input int On entry, m specifies the number of rows of B. m must be at least zero.
          n - input int On entry, n specifies the number of columns of B. n must be at least zero.
          alpha - input double[2] Specified complex scalar. When alpha is zero then A is not referenced and B need not be set before entry.
          A - input double[][][2] complex of dimension lda by k, where k is m when side = 'L' or 'l' and is n when side = 'R' or 'r'. Before entry with uplo = 'U' or 'u', the leading k by k upper triangular part of the array A must contain the upper triangular matrix and the strictly lower part of A is not referenced. Before entry with uplo = 'L' or 'l', the leading k by k lower triangular part of the array A must contain the lower triangular matrix and the strictly upper triangular part of A is not referenced. Note that when diag = 'U' or 'u', the diagonal elements of A are not referenced either, but are assumed to be unity.
          lda - input int On entry, lda specifies the first dimension of A as declared in the calling (sub) program. When side = 'L' or 'l', then lda must be at least max(1,m). When side = 'R' or 'r', then lda must be at least max(1,n).
          B - input/output double[][][2] complex of dimension ldb by n. Before entry, the leading m by n part of the array B must contain the right-hand side matrix B, and on exit is overwritten by the solution matrix X.
          ldb - input int On entry, ldb specifies the first dimension of B as declared in the calling (sub) program. ldb must be at least max(1,m).
        • zgemm

          public void zgemm​(char transa,
                            char transb,
                            int m,
                            int n,
                            int k,
                            double[] alpha,
                            double[][][] A,
                            int lda,
                            double[][][] B,
                            int ldb,
                            double[] beta,
                            double[][][] C,
                            int ldc)
          This is a port of the 2/8/89 Blas routine Original version written by: Jack Dongarra, Argonne National Laboratory Iain Duff, AERE Harwell. Jeremy Du Croz, Numerical Algorithms Group Ltd. Sven Hammarling, Numerical Algorithms Group Ltd. zgemm performs one of the matrix-matrix operations C = alpha*op(A)*op(B) + beta*C, where op(X) is one of op(X) = X or op(X) = X**T or op(X) = x**H, alpha and beta are scalars, and A, B, and C are matrices, with op(A) an m by k matrix, op(B) a k by n matrix, and C an m by n matrix.
          Parameters:
          transa - input char On entry, transa specifies the form of op(A) to be used in the matrix multiplication as follows:' = 'N' or 'n', op(A) = A. = 'T' or 't', op(A) = A**T. = 'C' or 'c', op(A) = A**H.
          transb - input char On entry, transb specifies the form of op(B) to be used in the matrix multiplication as follows: = 'N' or 'n', op(B) = B. = 'T' or 't', op(B) = B**T. = 'C' or 'c', op(B) = B**H.
          m - input int On entry, m specifies the number of rows of the matrix op(A) and of the matrix C. m must be at least zero.
          n - input int On entry, n specifies the number of columns of the matrix op(B) and the number of columns of the matrix C. n must be at least zero.
          k - input int On entry, k specifies the number of columns of the matrix op(A) and the number of rows of the matrix op(B). k must be at least zero.
          alpha - input double[2] specified complex scalar
          A - input double[][][2] complex dimension lda by ka, where ka is k when transa = 'N' or 'n', and is m otherwise. Before entry with transa = 'N' or 'n', the leading m by k part of the array A must contain the matrix A, otherwise the leading k by m part of the array A must contain the matrix A
          lda - input int On entry, lda specifies the first dimension of A as declared in the calling (sub) program. When transa = 'N' or 'n' then lda must be at least max(1,m), otherwise lda must be at least max(1,k)
          B - input double[][][2] complex dimension ldb by kb, where kb is n when transb = 'N' or 'n', and is k otherwise. Before entry with transb = 'N' or 'n', the leading k by n part of the array B must contain the matrix B, otherwise the leading n by k part of the array B must contain the matrix B
          ldb - input int On entry, ldb specifies the first dimension of B as declared in the calling (sub) program. When transb = 'N' or 'n' then ldb must be at least max(1,k), otherwise ldb must be at least max(1,n).
          beta - input double[2] specified complex scalar When beta is supplied as zero, then C need not be set on input.
          C - input/output double[][][2] complex dimension ldc by n. Before entry, the leading m by n part of the array C must contain the matrix C, except when beta is zero, in which case C need not be set on entry. On exit, the array C is overwritten by the m by n matrix (alpha*op(A)*op(B) + beta*C).
          ldc - input int On entry, ldc specifies the first dimension of C as declared in the calling (sub) program. ldc must be at least max(1,m).
        • zdiv

          private void zdiv​(double ar,
                            double ai,
                            double br,
                            double bi,
                            double[] cr,
                            double[] ci)
          complex divide c = a/b.
          Parameters:
          ar - double
          ai - double
          br - double
          bi - double
          cr - double[]
          ci - double[]
        • zabs

          private double zabs​(double zr,
                              double zi)
          zabs computes the absolute value or magnitude of a double precision complex variable zr + j*zi.
          Parameters:
          zr - double
          zi - double
          Returns:
          double
        • zmlt

          private void zmlt​(double ar,
                            double ai,
                            double br,
                            double bi,
                            double[] cr,
                            double[] ci)
          complex multiply c = a * b.
          Parameters:
          ar - double
          ai - double
          br - double
          bi - double
          cr - double[]
          ci - double[]