Class SelectedEigenvalue

  • All Implemented Interfaces:
    java.io.Serializable

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void dchkst​(int nsizes, int[] nn, int ntypes, boolean[] dotype, int[] iseed, double thresh, double[][] A, int lda, double[] AP, double[] SD, double[] SE, double[] D1, double[] D2, double[] D3, double[] D4, double[] D5, double[] WA1, double[] WA2, double[] WA3, double[] WR, double[][] U, int ldu, double[][] V, double[] VP, double[] tau, double[][] Z, double[] work, int lwork, int[] iwork, int liwork, double[] result, int[] info)
      This is a port of the portions of LAPACK version 3.4.0 test routine DCHKST used to test the symmetric eigenvalue routines dstebz and dstein.
      void dchkst_test()
      This routine is an extraction from the FORTRAN program version 3.1.1 DCHKEE of the code needed to drive dchkst, that tests routines used in symmetric generalized eigenvalue problem.
      private void ddrvst​(int nsizes, int[] nn, int ntypes, boolean[] dotype, int[] iseed, double thresh, double[][] A, int lda, double[] D1, double[] D2, double[] D3, double[] D4, double[] eveigs, double[] WA1, double[] WA2, double[] WA3, double[][] U, int ldu, double[][] V, double[] tau, double[][] Z, double[] work, int lwork, int[] iwork, int liwork, double[] result, int[] info)
      This is a port of the part of version 3.4.0 LAPACK test routine DDRVST used to test dsyevx.
      void ddrvst_test()
      This routine is an extraction from the FORTRAN program version 3.1.1 DCHKEE of the code needed to drive ddrvst, that tests symmetric generalized eigenvalue drivers.
      void dlaebz​(int ijob, int nitmax, int n, int mmax, int minp, int nbmin, double abstol, double reltol, double pivmin, double[] d, double[] e, double[] e2, int[] nval, double[][] AB, double[] c, int[] mout, int[][] NAB, double[] work, int[] iwork, int[] info)
      This is a port of version 3.3.1 LAPACK routine DLAEBZ.
      private void dlagtf​(int n, double[] a, double lambda, double[] b, double[] c, double tol, double[] d, int[] in, int[] info)
      This is a port of version 3.2 LAPACK routine DLAGTF.
      private void dlagts​(int job, int n, double[] a, double[] b, double[] c, double[] d, int[] in, double[] y, double[] tol, int[] info)
      This is a port of version 3.3.1 LAPACK routine DLAGTS.
      private void dormql​(char side, char trans, int m, int n, int k, double[][] A, int lda, double[] tau, double[][] C, int ldc, double[] work, int lwork, int[] info)
      This is a port of version 3.3.1 LAPACK routine DORMQL.
      void dormtr​(char side, char uplo, char trans, int m, int n, double[][] A, int lda, double[] tau, double[][] C, int ldc, double[] work, int lwork, int[] info)
      This is a port of version 3.2 LAPACK routine DORMTR.
      private void dort01​(char rowcol, int m, int n, double[][] U, int ldu, double[][] work, int lwork, double[] resid)
      This is the port of version 3.1 LAPACK test routine DORT01.
      void dstebz​(char range, char order, int n, double vl, double vu, int il, int iu, double abstol, double[] d, double[] e, int[] m, int[] nsplit, double[] w, int[] iblock, int[] isplit, double[] work, int[] iwork, int[] info)
      This is a port of version 3.3.1 LAPACK routine DSTEBZ.
      void dstein​(int n, double[] d, double[] e, int m, double[] w, int[] iblock, int[] isplit, double[][] Z, int ldz, double[] work, int[] iwork, int[] ifail, int[] info)
      This is a port of version 3.2 LAPACK routine DSTEIN.
      double dsxt1​(int ijob, double[] d1, int n1, double[] d2, int n2, double abstol, double ulp, double unfl)
      This is the port of version 3.1 LAPACK test routine DSXT1.
      void dsyevx​(char jobz, char range, char uplo, int n, double[][] A, int lda, double vl, double vu, int il, int iu, double abstol, int[] m, double[] w, double[][] Z, int ldz, double[] work, int lwork, int[] iwork, int[] ifail, int[] info)
      This is a port of the version 3.2 LAPACK DSYEVX routine.
      void dsyt22​(int itype, char uplo, int n, int m, int kband, double[][] A, int lda, double[] d, double[] e, double[][] U, int ldu, double[][] V, int ldv, double[] tau, double[] work, double[] result)
      This is the port of version 3.1 LAPACK test routine DORT01.
      • Methods inherited from class java.lang.Object

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

      • SelectedEigenvalue

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

      • ddrvst_test

        public void ddrvst_test()
        This routine is an extraction from the FORTRAN program version 3.1.1 DCHKEE of the code needed to drive ddrvst, that tests symmetric generalized eigenvalue drivers. The driver tested is dsyevx. Numerical values were obtained from the sep.in datafile. Original DCHKEE created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., January, 2007
      • ddrvst

        private void ddrvst​(int nsizes,
                            int[] nn,
                            int ntypes,
                            boolean[] dotype,
                            int[] iseed,
                            double thresh,
                            double[][] A,
                            int lda,
                            double[] D1,
                            double[] D2,
                            double[] D3,
                            double[] D4,
                            double[] eveigs,
                            double[] WA1,
                            double[] WA2,
                            double[] WA3,
                            double[][] U,
                            int ldu,
                            double[][] V,
                            double[] tau,
                            double[][] Z,
                            double[] work,
                            int lwork,
                            int[] iwork,
                            int liwork,
                            double[] result,
                            int[] info)
        This is a port of the part of version 3.4.0 LAPACK test routine DDRVST used to test dsyevx. Original DDRVST created by Univ. of Tennessee, Univ. of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011. ddrvst checks the symmetric eigenvalue problem driver dsyevx. dsyevx computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix.

        When ddrvst is called, a number of matrix "sizes" ("n's") and a number of matrix "types" are specified. For each size ("n") and each type of matrix, one matrix will be generated and used to test the dsyevx driver. For each matrix, the following tests will be performed: (1) | A - Z D Z' | / ( |A| n ulp ) (2) | I - Z Z' | / ( n ulp ) (3) | D1 - D2 | / ( |D1| ulp ) where Z is the matrix of eigenvectors returned when the eigenvector option is given and D1 and D2 are the eigenvalues returned with and without the eigenvector option.

        The "sizes" are specified by an array nn(0:nsizes-1); the value of each element nn[j] specifies one size. The "types" are specified by a boolean array dotype(0:ntypes-1); if dotype[j] is true, then matrix type "j" will be generated. Currently, the list of possible types is: (1) The zero matrix. (2) The identity matrix. (3) A diagonal matrix with evenly spaced eigenvalues 1, ..., ulp and random signs. (ulp = (first number larger than 1) - 1) (4) A diagonal matrix with geometrically spaced eigenvalues 1, ..., ulp and random signs. (5) A diagonal matrix with "clustered" eigenvalues 1, ulp, ..., ulp and random signs. (6) Same as (4), but multiplied by sqrt(overflow threshold) (7) Same as (4), but multiplied by sqrt(underflow threshold) (8) A matrix of the form U' D U, where U is orthogonal and D has evenly spaced entries 1, ..., ulp with random signs on the diagonal. (9) A matrix of the form U' D U, where U is orthogonal and D has geometrically spaced entries 1, ..., ulp with random signs on the diagonal. (10) A matrix of the form U' D U, where U is orthogonal and D has "clustered" entries 1, ulp, ..., ulp with random signs on the diagonal. (11) Same as (8), but multiplied by sqrt( overflow threshold) (12) Same as (8), but multiplied by sqrt( underflow threshold) (13) Symmetric matrix with random entries chosen from (-1,1). (14) Same as (13), but multiplied by sqrt( overflow threshold) (15) Same as (13), but multiplied by sqrt(underflow threshold) (16) A band matrix with half bandwidth randomly chosen between 0 and n-1, with evenly spaced eigenvalues 1, ..., ulp with random signs. (17) Same as (16), but multiplied by sqrt(overflow threshold) (18) Same as (16), but multiplied by sqrt(underflow threshold)

        The tests performed are: (1) | A - U S U' | / ( |A| n ulp ) dsyevx(jobz = 'V', range = 'A' uplo = 'L',... ) (2) | I - U U' | / ( n ulp ) dsyevx(jobz = 'V', range = 'A' uplo = 'L',... ) (3) |D(with Z) - D(w/o Z)| / (|D| ulp) dsyevx(jobz = 'N', range = 'A' uplo = 'L',... ) (4) | A - U S U' | / ( |A| n ulp ) dsyevx(jobz = 'V', range = 'I' uplo = 'L',... ) (5) | I - U U' | / ( n ulp ) dsyevx(jobz = 'V', range = 'I' uplo = 'L',... ) (6) |D(with Z) - D(w/o Z)| / (|D| ulp) dsyevx(jobz = 'N', range = 'I' uplo = 'L',... ) (7) | A - U S U' | / ( |A| n ulp ) dsyevx(jobz = 'V', range = 'V' uplo = 'L',... ) (8) | I - U U' | / ( n ulp ) dsyevx(jobz = 'V', range = 'V' uplo = 'L',... ) (9) |D(with Z) - D(w/o Z)| / (|D| ulp) dsyevx(jobz = 'N', range = 'V' uplo = 'L',... ) Tests 1 through 9 are repeated with uplo = 'U'

        Parameters:
        nsizes - (input) int The number of sizes of matrices to use. If it is zero, ddrvst does nothing. It must be at least zero.
        nn - (input) int[] of dimension (nsizes) An array containing the sizes to be used for the matrices. Zero values will be skipped. The values must be at least zero.
        ntypes - (input) int The number of elements in dotype. If it is zero, ddrvst does nothing. It must be at least zero. If it is maxtyp+1 and nsizes is 1, then an additional type, maxtyp+1 is defined, which is to use whatever matrix is in A. This is only useful if dotype(0:maxtyp-1) is false and dotype[maxtyp] is true.
        dotype - (input) boolean[] of dimension (ntypes) If dotype[j] is true, then for each size in nn a matrix of that size and of type j will be generated. If ntypes is smaller than the maximum number of types defined (parameter maxtyp), then types ntypes+1 through maxtyp will not be generated. If ntypes is larger than maxtyp, dotype[maxtyp] through dotype[ntypes-1] will be ignored.
        iseed - (input/output) int[] of dimension (4) On entry iseed specifies the seed of the random number generator. The array elements should be between 0 and 4095; if not they will be reduced mod 4096. Also, iseed[3] must 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 ddrvst to continue the same random number sequence.
        thresh - (input) double A test will count as "failed" if the "error", computed as described above, exceeds thresh. Note that the error is scaled to be O(1), so thresh should be a reasonably small multiple of 1, e.g., 10 or 100. In particular, it should not depend on the precision (single vs. double) or the size of the matrix. It must be at least zero.
        A - (input/workspace/output) double[][] of dimension (lda, max(nn)) Used to hold the matrix whose eigenvalues are to be computed. On exit, A contains the last matrix actually used.
        lda - (input) int The leading dimension of A. It must be at least 1 and at least max(nn).
        D1 - (workspace/output) double[] of dimension (max(nn)) The eigenvalues of A, as computed by dsteqr simultaneously with Z. On exit, the eigenvalues in D1 correspond with the matrix in A.
        D2 - (workspace/output) double[] of dimension (max(nn)) The eigenvalues of A, as computed by dsteqr if Z is not computed. On exit, the eigenvalues in D2 correspond with the matrix in A.
        D3 - (workspace/output) double[] of dimension max(nn)) The eigenvalues of A, as computed by dsterf. On exit, the eigenvalues in D3 correspond with the matrix in A.
        D4 - double[] of dimension (max(nn))
        eveigs - double[] of dimension (max(nn)) The eigenvalues as computed by dstev('N', ... )
        WA1 - double[]
        WA2 - double[]
        WA3 - double[]
        U - (workspace/output) double[][] of dimension (ldu, max(nn)) The orthogonal matrix computed by dsytrd + dorgtr.
        ldu - (input) int The leading dimension of U, Z and V. It must be at least 1 and at least max(nn).
        V - (workspace/output) double[][] of dimension (ldu, max(nn)) The Householder vectors computed by dsytrd in reducing A to tridiagonal form.
        tau - (workspace/output) double[] of dimension max(nn) The Householder factors computed by dsytrd in reducing A to tridiagonal form.
        Z - (workspace/output) double[][] of dimension (ldu, max(nn)) The orthogonal matrix of eigenvectors computed by dsteqr, dpteqr, and dstein.
        work - (workspace/output) double[] of dimension (lwork)
        lwork - (input) int The number of entries in work. This must be at least 1 + 4*nmax + 2 * nmax * lg nmax + 4 * nmax**2 where nmax = max(nn[j], 2) and lg = log base 2.
        iwork - workspace int[] of dim (6 + 6*nmax + 5* nmax * lg nmax) where nmax = max(nn[j], 2) and lg = log base 2.
        liwork - (input) int length of iwork
        result - (output) double[] of dimension (105) The values computed by the tests described above. The values are currently limited to 1/ulp, to avoid overflow.
        info - (output) int[] If 0, then everything ran OK. -1: nsizes
      • dsyt22

        public void dsyt22​(int itype,
                           char uplo,
                           int n,
                           int m,
                           int kband,
                           double[][] A,
                           int lda,
                           double[] d,
                           double[] e,
                           double[][] U,
                           int ldu,
                           double[][] V,
                           int ldv,
                           double[] tau,
                           double[] work,
                           double[] result)
        This is the port of version 3.1 LAPACK test routine DORT01. Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. November 2006 DSYT22 generally checks a decomposition of the form A U = U S where A is symmetric, the columns of U are orthonormal, and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as a dense matrix, otherwise the U is expressed as a product of Householder transformations, whose vectors are stored in the array "V" and whose scaling constants are in "TAU"; we shall use the letter "V" to refer to the product of Householder transformations (which should be equal to U). Specifically, if ITYPE=1, then: RESULT(1) = | U' A U - S | / ( |A| m ulp ) *and* RESULT(2) = | I - U'U | / ( m ulp )
        Parameters:
        itype - input int Specifies the type of tests to be performed. 1: U expressed as a dense orthogonal matrix: result[0] = | A - U S U' | / ( |A| n ulp ) *and* result[1] = | I - UU' | / ( n ulp )
        uplo - input char If UPLO='U', the upper triangle of A will be used and the (strictly) lower triangle will not be referenced. If UPLO='L', the lower triangle of A will be used and the (strictly) upper triangle will not be referenced. Not modified.
        n - input int The size of the matrix. If it is zero, dsyt22 does nothing. It must be at least zero. Not modified.
        m - input int The number of columns of U. If it is zero, dsyt22 does nothing. It must be at least zero. Not modified.
        kband - input int The bandwidth of the matrix. It may only be zero or one. If zero, then S is diagonal, and E is not referenced. If one, then S is symmetric tri-diagonal. Not modified.
        A - input double[][] of dimension (lda, n). The original (unfactored) matrix. It is assumed to be symmetric, and only the upper (uplo='U') or only the lower (uplo='L') will be referenced. Not modified.
        lda - input int The leading dimension of A. It must be at least 1 and at least n. Not modified.
        d - input double[] of dimension n. The diagonal of the (symmetric tri-) diagonal matrix. Not modified.
        e - input double[] of dimension n. The off-diagonal of the (symmetric tri-) diagonal matrix. e[0] is ignored, e[1] is the (0,1) and (1,0) element, etc. Not referenced if kband=0. Not modified.
        U - input double[][] of dimension (ldu, n). If itype=1 or 3, this contains the orthogonal matrix in the decomposition, expressed as a dense matrix. If itype=2, then it is not referenced. Not modified.
        ldu - input int The leading dimension of U. ldu must be at least n and at least 1. Not modified.
        V - input double[][] of dimension (ldv, n). If itype=2 or 3, the lower triangle of this array contains the Householder vectors used to describe the orthogonal matrix in the decomposition. If itype=1, then it is not referenced. Not modified.
        ldv - input int The leading dimension of V. ldv must be at least n and at least 1. Not modified.
        tau - input double[] of dimension n. If itype >= 2, then tau(j) is the scalar factor of v(j) v(j)' in the Householder transformation H(j) of the product U = H(1)...H(n-2) If itype
        work - workspace double[] of dimension (2*n**2) Modified
        result - output double[] of dimension 2. The values computed by the two tests described above. The values are currently limited to 1/ulp, to avoid overflow. result[0] is always modified. result[1] is modified only if ldu is at least n. Modified.
      • dort01

        private void dort01​(char rowcol,
                            int m,
                            int n,
                            double[][] U,
                            int ldu,
                            double[][] work,
                            int lwork,
                            double[] resid)
        This is the port of version 3.1 LAPACK test routine DORT01. Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. November 2006 .. Scalar Arguments .. CHARACTER ROWCOL INTEGER LDU, LWORK, M, N DOUBLE PRECISION RESID .. .. Array Arguments .. DOUBLE PRECISION U( LDU, * ), WORK( * ) .. Purpose ======= DORT01 checks that the matrix U is orthogonal by computing the ratio RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R', or RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'. Alternatively, if there isn't sufficient workspace to form I - U*U' or I - U'*U, the ratio is computed as RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R', or RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'. where EPS is the machine precision. ROWCOL is used only if m = n; if m > n, ROWCOL is assumed to be 'C', and if m n or if m = n and ROWCOL = 'C'. U is checked for orthogonal rows if m = max(1,M). WORK (workspace) DOUBLE PRECISION array, dimension (min(m,n),min(m,n)) In dlaset, dsyrk, and dlansy work must be 2D array. LWORK (input) INTEGER The length of the array WORK. For best performance, LWORK should be at least N*(N+1) if ROWCOL = 'C' or M*(M+1) if ROWCOL = 'R', but the test will be done even if LWORK is 0. RESID (output) DOUBLE PRECISION RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
      • dsxt1

        public double dsxt1​(int ijob,
                            double[] d1,
                            int n1,
                            double[] d2,
                            int n2,
                            double abstol,
                            double ulp,
                            double unfl)
        This is the port of version 3.1 LAPACK test routine DSXT1. Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. November, 2006 DSXT1 computes the difference between a set of eigenvalues. The result is returned as the function value. IJOB = 1: Computes max { min | D1(i)-D2(j) | } i j IJOB = 2: Computes max { min | D1(i)-D2(j) | / i j ( ABSTOL + |D1(i)|*ULP ) }
        Parameters:
        ijob - input int Specifies the type of tests to be performed.
        d1 - input double[] of dimension n1 The first array. d1 should be in increasing order, i.e., d1[j]
        n1 - input int The length of d1.
        d2 - input double[] of dimension n2. The second array. d2 should be in increasing order, i.e., d2[j]
        n2 - input int The length of d2.
        abstol - input double The absolute tolerance, used as a measure of the error.
        ulp - input double Machine precision.
        unfl - input double The smallest positive number whose reciprocal does not overflow.
      • dchkst_test

        public void dchkst_test()
        This routine is an extraction from the FORTRAN program version 3.1.1 DCHKEE of the code needed to drive dchkst, that tests routines used in symmetric generalized eigenvalue problem. The routines tested are dstebz and dstein. Numerical values were obtained from the sep.in datafile. Original DCHKEE created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., January, 2007
      • dchkst

        private void dchkst​(int nsizes,
                            int[] nn,
                            int ntypes,
                            boolean[] dotype,
                            int[] iseed,
                            double thresh,
                            double[][] A,
                            int lda,
                            double[] AP,
                            double[] SD,
                            double[] SE,
                            double[] D1,
                            double[] D2,
                            double[] D3,
                            double[] D4,
                            double[] D5,
                            double[] WA1,
                            double[] WA2,
                            double[] WA3,
                            double[] WR,
                            double[][] U,
                            int ldu,
                            double[][] V,
                            double[] VP,
                            double[] tau,
                            double[][] Z,
                            double[] work,
                            int lwork,
                            int[] iwork,
                            int liwork,
                            double[] result,
                            int[] info)
        This is a port of the portions of LAPACK version 3.4.0 test routine DCHKST used to test the symmetric eigenvalue routines dstebz and dstein. Original DCHKST created by Univ. of Tennessee, Univ. of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011.

        dstebz computes selected eigenvalues. WA1, WA2, and WA3 will denote eigenvalues computed to high absolute accuracy, with different range options. WR will denote eigenvalues computed to high relative accuracy.

        dstein computes Y, the eigenvectors of S, given the eigenvalues.

        When dchkst is called, a number of matrix "sizes" ("n's") and a number of matrix "types" are specified. For each size ("n") and each type of matrix, one matrix will be generated and used to test the symmetric eigenroutines. For each matrix, a number of tests will be performed: 1.) When S is also diagonally dominant by the factor gamma

        Parameters:
        nsizes - (input) int The number of sizes of matrices to use. If it is zero, dchkst does nothing. It must be at least zero.
        nn - (input) int[] of dimension (nsizes) An array containing the sizes to be used for the matrices. Zero values will be skipped. The values must be at least zero.
        ntypes - (input) int The number of elements in dotype. If it is zero, dchkst does nothing. It must be at least zero. If it is maxtyp+1 and nsizes is 1, then an additional type, maxtyp+1 is defined, which is to use whatever matrix is in A. This is only useful if dotype(0:maxtyp-1) is false and dotype[maxtyp] is true.
        dotype - (input) boolean[] of dimension (ntypes) If dotype[j] is true, then for each size in nn a matrix of that size and of type j will be generated. If ntypes is smaller than the maximum number of types defined (parameter maxtyp), then types ntypes+1 through maxtyp will not be generated. If ntypes is larger than maxtyp, dotype[maxtyp] through dotype[ntypes-1] will be ignored.
        iseed - (input/output) int[] of dimension (4) On entry iseed specifies the seed of the random number generator. The array elements should be between 0 and 4095; if not they will be reduced mod 4096. Also, iseed[3] must be odd. The random number generator uses an 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 dchkst to continue the same random number sequence.
        thresh - (input) double A test will count as "failed" if the "error", computed as described above, exceeds thresh. Note that the error is scaled to be O(1), so thresh should be a reasonably small multiple of 1, e.g., 10 or 100. In particular, it should not depend on the precision (single vs. double) or the size of the matrix. It must be at least zero.
        A - (input/workspace/output) double[][] of dimension (lda, max(nn)) Used to hold the matrix whose eigenvalues are to be computed. On exit, A contains the last matrix actually used.
        lda - (input) int The leading dimension of A. It must be at least 1 and at least max(nn).
        AP - (workspace) double[] of dimension (max(nn)*max(nn+1)/2) The matrix A stored in packed format.
        SD - (workspace/output) double[] of dimension (max(nn)) The diagonal of the tridiagonal matrix computed by dsytrd. On exit, SD and SE contain the tridiagonal form of the matrix in A.
        SE - (workspace/output) double[] of dimension (max(nn)) The off-diagonal of the tridiagonal matrix computed by dsytrd. On exit, SD and SE contain the tridiagonal form of the matrix in A.
        D1 - (workspace/output) double[] of dimension (max(nn)) The eigenvalues of A, as computed by dsteqr simultaneously with Z. On exit, the eigenvalues in D1 correspond with the matrix in A.
        D2 - (workspace/output) double[] of dimension (max(nn)) The eigenvalues of A, as computed by dsteqr if Z is not computed. On exit, the eigenvalues in D2 correspond with the matrix in A.
        D3 - (workspace/output) double[] of dimension max(nn)) The eigenvalues of A, as computed by dsterf. On exit, the eigenvalues in D3 correspond with the matrix in A.
        D4 - double[] (out) of dimension max(nn).
        D5 - double[]
        WA1 - double[] (output) of dimension max(nn). All eigenvalues of A, computed to high absolute accuracy, with different range options as computed by dstebz.
        WA2 - double[] (output) of dimension max(nn). Selected eigenvalues of A, computed to high absolute accuracy, with different range options as computed by dstebz. Choose random values for il and iu, and ask fo rthe il-th through iu-th eigenvalues.
        WA3 - double[] (output) of dimension max(nn). Selected eigenvalues of A, computed to high absolute accuracy, with different range options as computed by dstebz. Determine the values of vl and vu of the il-th and iu-th eigenvalues and ask for all eigenvalues in thsi range.
        WR - double[] (output) of dimension max(nn). ALl eigenvalues of A, computed to high absolute accuracy, with different options, as computed by dstebz.
        U - (workspace/output) double[][] of dimension (ldu, max(nn)) The orthogonal matrix computed by dsytrd + dorgtr.
        ldu - (input) int The leading dimension of U, Z and V. It must be at least 1 and at least max(nn).
        V - (workspace/output) double[][] of dimension (ldu, max(nn)) The Householder vectors computed by dsytrd in reducing A to tridiagonal form. The vectors computed with uplo = 'U' are in the upper triangle, and the vectors computed with uplo = 'L' are in the lower triangle. (As described in dsytrd, the sub- and superdiagonal are not set to 1, although the true Householder vector has a 1 in that position. The routines that use V, such as dorgtr, set those entries to 1 before using them, and then restore them later.)
        VP - (workspace) double[] of dimension(max(nn)*max(nn+1)/2) The matrix V stored in packed format.
        tau - (workspace/output) double[] of dimension max(nn) The Householder factors computed by dsytrd in reducing A to tridiagonal form.
        Z - (workspace/output) double[][] of dimension (ldu, max(nn)) The orthogonal matrix of eigenvectors computed by dsteqr and dstein.
        work - (workspace/output) double[] of dimension (lwork)
        lwork - (input) int The number of entries in work. This must be at least 1 + 4*nmax + 2 * nmax * lg nmax + 3 * nmax**2 where nmax = max(nn[j], 2) and lg = log base 2.
        iwork - (workspace/output) int[] dimension liwork
        liwork - (input) int length of iwork This must be at least (6+ 6*nmax + 5 * nmax * lg nmax) where nmax = max(nn[j], 2) and lg = log base 2
        result - (output) double[] of dimension (26) The values computed by the tests described above. The values are currently limited to 1/ulp, to avoid overflow.
        info - (output) int[] If 0, then everything ran OK. -1: nsizes
      • dsyevx

        public void dsyevx​(char jobz,
                           char range,
                           char uplo,
                           int n,
                           double[][] A,
                           int lda,
                           double vl,
                           double vu,
                           int il,
                           int iu,
                           double abstol,
                           int[] m,
                           double[] w,
                           double[][] Z,
                           int ldz,
                           double[] work,
                           int lwork,
                           int[] iwork,
                           int[] ifail,
                           int[] info)
        This is a port of the version 3.2 LAPACK DSYEVX routine. Original DSYEVX created by created by Univ. of Tennessee, Univ. of California Berkeley, and NAG Ltd., November, 2006 * DSYEVX computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix A. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.
        Parameters:
        jobz - input char = 'N': Compute eigenvalues only = 'V': Compute eigenvalues and eigenvectors.
        range - input char = 'A': all eigenvalues will be found. = 'V': all eigenvalues in the half-open interval (VL,VU] will be found. = 'I': the IL-th through IU-th eigenvalues will be found.
        uplo - input char = 'U': Upper triangle of A is stored = 'L': Lower triangle of A is stored
        n - input int The order of the matrix A. n >= 0.
        A - input/output double[][] of dimension lda by n On entry, the symmetric matrix A. If uplo = 'U', the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = 'L', the leading n-by-n lower triangular part of A contains the lower triangular part of matrix A. On exit, the lower triangle (if UPLO='L') or the upper triangle (if UPLO='U') of A, including the diagonal, is destroyed.
        lda - input int The leading dimension of array A. lda >= max(1,n).
        vl - input double
        vu - input double If RANGE='V', the lower and upper bounds of the interval to be searched for eigenvalues. vl
        il - input int
        iu - input int If RANGE='I', the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 0; il = 1 and iu = 0 if n = 0. Not referenced if range = 'A' or 'V'.
        abstol - input double The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to abstol + eps * max( |a|,|b| ) , where eps is the machine precision. If abstol is less than or equal to zero, then eps*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form. Eigenvalues will be computed most accurately when abstol is set to twice the underflow threshold 2*dlamch('S'), not zero. If this routine returns with info>0, indicating that some eigenvectors did not converge, try setting abstol to 2*dlamch('S'). See "Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy," by Demmel and Kahan, LAPACK Working Note #3.
        m - output int[] The total number of eigenvalues found. 0
        w - output double[] of dimension n. On normal exit, the first M elements contain the selected eigenvalues in ascending order.
        Z - output double[][] of dimension ldz, max(1,m). If jobz = 'V', then if info = 0, the first m columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL. If jobz = 'N', then Z is not referenced. Note: the user must ensure that at least max(1,m) columns are supplied in the array Z; if range = 'V', the exact value of m is not known in advance and an upper bound must be used.
        ldz - input int The leading dimension of the array Z. ldz >= 1, and if jobz = 'V', ldz >= max(1,n).
        work - (workspace/output) double[] of dimension max(1,lwork). On exit, if info[0] = 0, then work[0] returns the optimal lwork.
        lwork - input int The length of the array work. lwork >= 1, when n = (nb+3)*n, where nb is the max of the blocksize for dsytrd and dortmr returned by ilaenv. If lwork = -1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla.
        iwork - worskpace int[] of dimension (5 * n).
        ifail - output int[] of dimension n. If jobz = 'V', then if info[0] = 0, the first m elements of ifail are zero. If info[0] > 0, then ifail contains the indices of the eigenvectors that failed to converge. If jobz = 'N', then ifail is not referenced.
        info - output int[] of dimension 1. = 0: successful exit 0: if info[0] = i, then i eigenvectors failed to converge. Their indices are stored in array ifail.
      • dstebz

        public void dstebz​(char range,
                           char order,
                           int n,
                           double vl,
                           double vu,
                           int il,
                           int iu,
                           double abstol,
                           double[] d,
                           double[] e,
                           int[] m,
                           int[] nsplit,
                           double[] w,
                           int[] iblock,
                           int[] isplit,
                           double[] work,
                           int[] iwork,
                           int[] info)
        This is a port of version 3.3.1 LAPACK routine DSTEBZ. The original DSTEBZ is created by by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. on April 2011 DSTEBZ computes the eigenvalues of a symmetric tridiagonal matrix T. The user may ask for all eigenvalues, all eigenvalues in the half-open interval (vl, vu], or the il-th through iu-th eigenvalues. To avoid overflow, the matrix must be scaled so that its largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest accuracy, it should not be much smaller than that. See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal Matrix", Report CS41, Computer Science Dept., Stanford University, July 21, 1966.
        Parameters:
        range - input char = 'A': ("All") all eigenvalues will be found. = 'V': ("Value") all eigenvalues in the half-open interval (vl, vu] will be found. = 'I': ("Index") the il-th through iu-th eigenvalues (of the entire matrix) will be found.
        order - input char = 'B': ("By Block") the eigenvalues will be grouped by split-off block (see iblock, isplit) and ordered from smallest to largest within the block. = 'E': ("Entire matrix") the eigenvalues for the entire matrix will be ordered from smallest to largest.
        n - input int The order of the tridiagonal matrix T. N >= 0.
        vl - input double
        vu - input double If range = 'V', the lower and upper bounds of the interval to be searched for eigenvalues. Eigenvalues less than or equal to vl, or greater than vu, will not be returned. vl
        il - input int
        iu - input int If range = 'I', the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 0; il = 1 and iu = 0 if n = 0. Not referenced if RANGE = 'A' or 'V'.
        abstol - input double The absolute tolerance for the eigenvalues. An eigenvalue (or cluster) is considered to be located if it has been determined to lie in an interval whose width is abstol or less. If abstol is less than or equal to zero, then ULP*|T| will be used, where |T| means the 1-norm of T. Eigenvalues will be computed most accurately when abstol is set to twice the underflow threshold 2*dlamch('S'), not zero.
        d - input double[] The n diagonal elements of the tridiagonal matrix T.
        e - input double[] The (n-1) off-diagonal elements of the tridiagonal matrix T.
        m - output int[] The actual number of eigenvalues found. 0
        nsplit - output int[] The number of diagonal blocks in the matrix T. 1
        w - output double[] of dimension n. On exit, the first m[0] elements of w will contain the eigenvalues. (dstebz may use the remaining n-m[0] elements as workspace.)
        iblock - output int[] of dimension n. At each row/column j where E(j) is zero or small, the matrix T is considered to split into a block diagonal matrix. On exit, if info[0] = 0, iblock[i] specifies to which block (from 1 to the number of blocks) the eigenvalue w[i] belongs. (dstebz may use the remaining n-m[0] elements as workspace.)
        isplit - output int[] of dimension n. The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to ISPLIT(1), the second of rows/columns ISPLIT(1)+1 through ISPLIT(2), etc., and the NSPLIT-th consists of rows/columns ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N. (Only the first NSPLIT elements will actually be used, but since the user cannot know a priori what value NSPLIT will have, N words must be reserved for ISPLIT.)
        work - workspace double[] of dimension 4*n.
        iwork - workspace int[] of dimension 3*n.
        info - output int[] of dimension 1. = 0: successful exit 0: some or all of the eigenvalues failed to converge or were not computed: =1 or 3: Bisection failed to converge for some eigenvalues; these eigenvalues are flagged by a negative block number. The effect is that the eigenvalues may not be as accurate as the absolute and relative tolerances. This is generally caused by unexpectedly inaccurate arithmetic. =2 or 3: RANGE='I' only: Not all of the eigenvalues IL:IU were found. Effect: M
      • dlaebz

        public void dlaebz​(int ijob,
                           int nitmax,
                           int n,
                           int mmax,
                           int minp,
                           int nbmin,
                           double abstol,
                           double reltol,
                           double pivmin,
                           double[] d,
                           double[] e,
                           double[] e2,
                           int[] nval,
                           double[][] AB,
                           double[] c,
                           int[] mout,
                           int[][] NAB,
                           double[] work,
                           int[] iwork,
                           int[] info)
        This is a port of version 3.3.1 LAPACK routine DLAEBZ. The original DSTEBZ is created by by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. on April 2011 DLAEBZ contains the iteration loops which compute and use the function N(w), which is the count of eigenvalues of a symmetric tridiagonal matrix T less than or equal to its argument w. It performs a choice of two types of loops: IJOB=1, followed by IJOB=2: It takes as input a list of intervals and returns a list of sufficiently small intervals whose union contains the same eigenvalues as the union of the original intervals. The input intervals are (AB(j,1),AB(j,2)], j=1,...,MINP. The output interval (AB(j,1),AB(j,2)] will contain eigenvalues NAB(j,1)+1,...,NAB(j,2), where 1
        Parameters:
        ijob - input int Specifies what is to be done: = 1: Compute nab for the initial intervals. = 2: Perform bisection iteration to find eigenvalues of T. = 3: Perform bisection iteration to invert N(w), i.e., to find a point which has a specified number of eigenvalues of T to its left. Other values will cause dlaebz to return with info[0]=-1.
        nitmax - input int The maximum number of "levels" of bisection to be performed, i.e., an interval of width W will not be made smaller than 2^(-nitmax) * W. If not all intervals have converged after nitmax iterations, then info[0] is set to the number of non-converged intervals.
        n - input int The dimension n of the tridiagonal matrix T. It must be at least 1.
        mmax - input int The maximum number of intervals. If more than mmax intervals are generated, then dlaebz will quit with info[0]=mmax+1.
        minp - input int The initial number of intervals. It may not be greater than mmax.
        nbmin - input int The smallest number of intervals that should be processed using a vector loop. If zero, then only the scalar loop will be used.
        abstol - input double The minimum (absolute) width of an interval. When an interval is narrower than abstol, or than reltol times the larger (in magnitude) endpoint, then it is considered to be sufficiently small, i.e., converged. This must be at least zero.
        reltol - input double The minimum relative width of an interval. When an interval is narrower than abstol, or than reltol times the larger (in magnitude) endpoint, then it is considered to be sufficiently small, i.e., converged. Note: this should always be at least radix*machine epsilon.
        pivmin - input double The minimum absolute value of a "pivot" in the Sturm sequence loop. This *must* be at least max |e(j)**2| * safe_min and at least safe_min, where safe_min is at least the smallest number that can divide one without overflow.
        d - input double[] of dimension n. The diagonal elements of the tridiagonal matrix T.
        e - input double[] of dimension n. The offdiagonal elements of the tridiagonal matrix T in positions 1 through N-1. E(N) is arbitrary.
        e2 - input double[] of dimension n. The squares of the offdiagonal elements of the tridiagonal matrix T. E2(N) is ignored.
        nval - (input/output) int[] of dimension minp. If IJOB=1 or 2, not referenced. If IJOB=3, the desired values of N(w). The elements of NVAL will be reordered to correspond with the intervals in AB. Thus, NVAL(j) on output will not, in general be the same as NVAL(j) on input, but it will correspond with the interval (AB(j,1),AB(j,2)] on output.
        AB - (input/output) double[][] of dimension (mmax,2) The endpoints of the intervals. AB(j,1) is a(j), the left endpoint of the j-th interval, and AB(j,2) is b(j), the right endpoint of the j-th interval. The input intervals will, in general, be modified, split, and reordered by the calculation.
        c - (input/output) double[] of dimension mmax. If IJOB=1, ignored. If IJOB=2, workspace. If IJOB=3, then on input C(j) should be initialized to the first search point in the binary search.
        mout - output int[] of dimension 1. If IJOB=1, the number of eigenvalues in the intervals. If IJOB=2 or 3, the number of intervals output. If IJOB=3, mout[0] will equal minp.
        NAB - (input/output) int[][] array of dimension (mmax,2) If IJOB=1, then on output NAB(i,j) will be set to N(AB(i,j)). If IJOB=2, then on input, NAB(i,j) should be set. It must satisfy the condition: N(AB(i,1)) NVAL(i) for all search points w , in which case NAB(i,1) will not be modified, i.e., the output value will be the same as the input value (modulo reorderings -- see NVAL and AB), or unless N(w)
        work - workspace double[] of dimension mmax.
        iwork - workspace int[] of dimension mmax.
        info - output int[] of dimension 1. = 0: All intervals converged. = 1--MMAX: The last INFO intervals did not converge. = MMAX+1: More than MMAX intervals were generated. Further Details =============== This routine is intended to be called only by other LAPACK routines, thus the interface is less user-friendly. It is intended for two purposes: (a) finding eigenvalues. In this case, DLAEBZ should have one or more initial intervals set up in AB, and DLAEBZ should be called with IJOB=1. This sets up NAB, and also counts the eigenvalues. Intervals with no eigenvalues would usually be thrown out at this point. Also, if not all the eigenvalues in an interval i are desired, NAB(i,1) can be increased or NAB(i,2) decreased. For example, set NAB(i,1)=NAB(i,2)-1 to get the largest eigenvalue. DLAEBZ is then called with IJOB=2 and MMAX no smaller than the value of MOUT returned by the call with IJOB=1. After this (IJOB=2) call, eigenvalues NAB(i,1)+1 through NAB(i,2) are approximately AB(i,1) (or AB(i,2)) to the tolerance specified by ABSTOL and RELTOL. (b) finding an interval (a',b'] containing eigenvalues w(f),...,w(l). In this case, start with a Gershgorin interval (a,b). Set up AB to contain 2 search intervals, both initially (a,b). One NVAL element should contain f-1 and the other should contain l , while C should contain a and b, resp. NAB(i,1) should be -1 and NAB(i,2) should be N+1, to flag an error if the desired interval does not lie in (a,b). DLAEBZ is then called with IJOB=3. On exit, if w(f-1) 0 and r >= 0, then the interval will have N(AB(j,1))=NAB(j,1)=f-k and N(AB(j,2))=NAB(j,2)=f+r. The cases w(l)
        • dstein

          public void dstein​(int n,
                             double[] d,
                             double[] e,
                             int m,
                             double[] w,
                             int[] iblock,
                             int[] isplit,
                             double[][] Z,
                             int ldz,
                             double[] work,
                             int[] iwork,
                             int[] ifail,
                             int[] info)
          This is a port of version 3.2 LAPACK routine DSTEIN. The original DSTEIN is created by by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. on November, 2006. dstein computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. The maximum number of iterations allowed for each eigenvector is specified by an internal parameter maxits (currently set to 5).
          Parameters:
          n - input int The order of the matrix. n >= 0.
          d - input double[] of dimension n. The n diagonal elements of the tridiagonal matrix T.
          e - input double[] of dimension n-1. The (n-1) subdiagonal elements of the tridiagonal matrix T, in elements 1 to N-1.
          m - input int The number of eigenvectors to be found. 0
          w - input double[] of dimension n. The first m elements of w contain the eigenvalues for which eigenvectors are to be computed. The eigenvalues should be grouped by split-off block and ordered from smallest to largest within the block. ( The output array w from dstebz with order = 'B' is expected here. )
          iblock - input int[] of dimension n The submatrix indices associated with the corresponding eigenvalues in w; iblock(i)=1 if eigenvalue w(i) belongs to the first submatrix from the top, =2 if w(i) belongs to the second submatrix, etc. ( The output array iblock from dstebz is expected here.
          isplit - input int[] of dimension n The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to isplit( 1 ), the second of rows/columns isplit( 1 )+1 through isplit( 2 ), etc. ( The output array isplit from dstebz is expected here. )
          Z - output double[][] of dimension (ldz, m) The computed eigenvectors. The eigenvector associated with the eigenvalue w(i) is stored in the i-th column of Z. Any vector which fails to converge is set to its current iterate after maxits iterations.
          ldz - input int The leading dimension of the array Z. ldz >= max(1,n).
          work - workspace double[] of dimension (5*n).
          iwork - workspace int[] of dimension n.
          ifail - output int[] of dimension m On normal exit, all elements of ifail are zero. If one or more eigenvectors fail to converge after maxits iterations, then their indices are stored in array ifail.
          info - output int[] of dimension 1. = 0: successful exit. 0: if INFO = i, then i eigenvectors failed to converge in MAXITS iterations. Their indices are stored in array IFAIL.
        • dlagtf

          private void dlagtf​(int n,
                              double[] a,
                              double lambda,
                              double[] b,
                              double[] c,
                              double tol,
                              double[] d,
                              int[] in,
                              int[] info)
          This is a port of version 3.2 LAPACK routine DLAGTF. The original DLAGTF is created by by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. on November, 2006. dlagtf factorizes the matrix (T - lambda*I), where T is an n by n tridiagonal matrix and lambda is a scalar, as T - lambda*I = PLU, where P is a permutation matrix, L is a unit lower tridiagonal matrix with at most one non-zero sub-diagonal elements per column and U is an upper triangular matrix with at most two non-zero super-diagonal elements per column. The factorization is obtained by Gaussian elimination with partial pivoting and implicit row scaling. The parameter LAMBDA is included in the routine so that DLAGTF may be used, in conjunction with DLAGTS, to obtain eigenvectors of T by inverse iteration.
          Parameters:
          n - input int The order of the matrix T.
          a - (input/output) double[] of dimension n. On entry, a must contain the diagonal elements of T. On exit, a is overwritten by the n diagonal elements of the upper triangular matrix U of the factorization of T.
          lambda - input double
          b - (input/output) double[] of dimension n-1. On entry, B must contain the (n-1) super-diagonal elements of T. On exit, B is overwritten by the (n-1) super-diagonal elements of the matrix U of the factorization of T.
          c - (input/output) of dimension (n-1). On entry, C must contain the (n-1) sub-diagonal elements of T. On exit, C is overwritten by the (n-1) sub-diagonal elements of the matrix L of the factorization of T.
          tol - input double On entry, a relative tolerance used to indicate whether or not the matrix (T - lambda*I) is nearly singular. tol should normally be chose as approximately the largest relative error in the elements of T. For example, if the elements of T are correct to about 4 significant figures, then tol should be set to about 5*10**(-4). If TOL is supplied as less than eps, where eps is the relative machine precision, then the value eps is used in place of tol.
          d - output double[] of dimension (n-2). On exit, d is overwritten by the (n-2) second super-diagonal elements of the matrix U of the factorization of T.
          in - output int[] of dimension n. On exit, in contains details of the permutation matrix P. If an interchange occurred at the kth step of the elimination, then in(k) = 1, otherwise in(k) = 0. The element in(n) returns the smallest positive integer j such that abs( u(j,j) ).le. norm( (T - lambda*I)(j) )*TOL, where norm( A(j) ) denotes the sum of the absolute values of the jth row of the matrix A. If no such j exists then in(n) is returned as zero. If in(n) is returned as positive, then a diagonal element of U is small, indicating that (T - lambda*I) is singular or nearly singular.
          info - output int[] of dimension 1. = 0 : successful exit
        • dlagts

          private void dlagts​(int job,
                              int n,
                              double[] a,
                              double[] b,
                              double[] c,
                              double[] d,
                              int[] in,
                              double[] y,
                              double[] tol,
                              int[] info)
          This is a port of version 3.3.1 LAPACK routine DLAGTS. The original DLAGTS is created by by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. on April, 2011. dlagts may be used to solve one of the systems of equations (T - lambda*I)*x = y or (T - lambda*I)**T*x = y, where T is an n by n tridiagonal matrix, for x, following the factorization of (T - lambda*I) as (T - lambda*I) = P*L*U , by routine dlagtf. The choice of equation to be solved is controlled by the argument job, and in each case there is an option to perturb zero or very small diagonal elements of U, this option being intended for use in applications such as inverse iteration.
          Parameters:
          job - input int Specifies the job to be performed by dlagts as follows: = 1: The equations (T - lambda*I)x = y are to be solved, but diagonal elements of U are not to be perturbed. = -1: The equations (T - lambda*I)x = y are to be solved and, if overflow would otherwise occur, the diagonal elements of U are to be perturbed. See argument TOL below. = 2: The equations (T - lambda*I)**Tx = y are to be solved, but diagonal elements of U are not to be perturbed. = -2: The equations (T - lambda*I)**Tx = y are to be solved and, if overflow would otherwise occur, the diagonal elements of U are to be perturbed. See argument TOL below.
          n - input n The order of the matrix T.
          a - input double[] of dimension n. On entry, a must contain the diagonal elements of U as returned from dlagtf.
          b - input double[] of dimension (n-1). On entry, b must contain the first super-diagonal elements of U as returned from dlagtf.
          c - input double[] of dimension (n-1). On entry, c must contain the sub-diagonal elements of L as returned from dlagtf.
          d - input double[] of dimension (n-2). On entry, d must contain the second super-diagonal elements of U as returned from dlagtf.
          in - input int[] of dimension n. On entry, in must contain details of the matrix P as returned from dlagtf.
          y - (input/output) double[] of dimension n. On entry, the right hand side vector y. On exit, y is overwritten by the solution vector x.
          tol - (input/out) double[] of dimension 1. On entry, with job 0 then tol is not referenced. On exit, TOL is changed as described above, only if TOL is non-positive on entry. Otherwise TOL is unchanged.
          info - output int[] of dimension 1. = 0 : successful exit 0: overflow would occur when computing the INFO(th) element of the solution vector x. This can only occur when JOB is supplied as positive and either means that a diagonal element of U is very small, or that the elements of the right-hand side vector y are very large.
        • dormtr

          public void dormtr​(char side,
                             char uplo,
                             char trans,
                             int m,
                             int n,
                             double[][] A,
                             int lda,
                             double[] tau,
                             double[][] C,
                             int ldc,
                             double[] work,
                             int lwork,
                             int[] info)
          This is a port of version 3.2 LAPACK routine DORMTR. The original DORMTR is created by by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. on November, 2006. DORMTR overwrites the general real M-by-N matrix C with SIDE = 'L' SIDE = 'R' TRANS = 'N': Q * C C * Q TRANS = 'T': Q**T * C C * Q**T where Q is a real orthogonal matrix of order nq, with nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of nq-1 elementary reflectors, as returned by DSYTRD: if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1); if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
          Parameters:
          side - input char = 'L': apply Q or Q**T from the Left; = 'R': apply Q or Q**T from the Right.
          uplo - input char = 'U': Upper triangle of A contains elementary reflectors from dsytrd; = 'L': Lower triangle of A contains elementary reflectors from dsytrd.
          trans - input char = 'N': No transpose, apply Q; = 'T': Transpose, apply Q**T.
          m - input int The number of rows of the matrix C. m >= 0.
          n - input int The number of columns of the matrix C. n >= 0.
          A - input double[][] of dimension (lda,m) if side = 'L' (lda,n) if side = 'R' The vectors which define the elementary reflectors, as returned by dsytrd.
          lda - input int The leading dimension of the array A. lda >= max(1,m) if side = 'L'; lda >= max(1,n) if side = 'R'.
          tau - input double[] of dimension (m-1) if side = 'L' (n-1) if side = 'R' tau[i] must contain the scalar factor of the elementary reflector H(i), as returned by dsytrd.
          C - (input/output) double of dimension (ldc,n). On entry, the m-by-n matrix C. On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
          ldc - input int The leading dimension of the array C. ldc >= max(1,m).
          work - (workspace/output) of dimension max(1, lwork) On exit, if info[0] = 0, work[0] returns the optimal lwork.
          lwork - input int The dimension of the array work. If side = 'L', lwork >= max(1,n); if side = 'R', lwork >= max(1,m). For optimum performance lwork >= n*nb if side = 'L', and lwork >= m*nb if side = 'R', where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued.
          info - output int[] of dimension 1. = 0: successful exit
        • dormql

          private void dormql​(char side,
                              char trans,
                              int m,
                              int n,
                              int k,
                              double[][] A,
                              int lda,
                              double[] tau,
                              double[][] C,
                              int ldc,
                              double[] work,
                              int lwork,
                              int[] info)
          This is a port of version 3.3.1 LAPACK routine DORMQL. The original DORMQL is created by by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. on April, 2011. dormql overwrites the general real M-by-N matrix C with SIDE = 'L' SIDE = 'R' TRANS = 'N': Q * C C * Q TRANS = 'T': Q**T * C C * Q**T where Q is a real orthogonal matrix defined as the product of k elementary reflectors Q = H(k) . . . H(2) H(1) as returned by DGEQLF. Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.
          Parameters:
          side - input char = 'L': apply Q or Q**T from the Left; = 'R': apply Q or Q**T from the Right.
          trans - input char = 'N': No transpose, apply Q; = 'T': Transpose, apply Q**T.
          m - input int The number of rows of the matrix C. m >= 0.
          n - input int The number of columns of the matrix C. n >= 0.
          k - input int The number of elementary reflectors whose product defines the matrix Q. If side = 'L', m >= k >= 0; if side = 'R', n >= k >= 0.
          A - input double[][] of dimension (lda, k) The i-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by dgeqlf in the last k columns of its array argument A. A is modified by the routine but restored on exit
          lda - input int The leading dimension of the array A. If side = 'L', lda >= max(1,m); if side = 'R', lda >= max(1,n).
          tau - [] input double[] of dimension k tau[i] must contain the scalar factor of the elementary reflector H(i), as returned by dgeqlf.
          C - (input/output) double[][] of dimension (ldc, n) On entry, the m-by-n matrix C. On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
          ldc - input int The leading dimension of the array C. ldc >= max(1,m).
          work - (workspace/output) of dimension max(1, lwork). On exit, if info[0] = 0, work[0] returns the optimal lwork.
          lwork - input int The dimension of the array work. If side = 'L', lwork >= max(1,n); if side = 'R', lwork >= max(1,m). For optimum performance lwork >= n*nb if side = 'L', and lwork >= m*nb if side = 'R', where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued.
          info - output int[] of dimension 1. = 0: successful exit