Class LinearEquations

  • All Implemented Interfaces:
    java.io.Serializable

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dchkaa()  
      private void dchkpo​(boolean[] dotype, 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 ddrvpo​(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)  
      void derrpo()  
      void derrvx()  
      void dget04​(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.4.0 DGET04.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011.
      double dget06​(double rcond, double rcondc)
      This is a port of LAPACK version test routine 3.4.0 DGET06.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011.
      void dlacn2​(int n, double[] v, double[] x, int[] isgn, double[] est, int[] kase, int[] isave)
      This is a port of LAPACK version auxiliary routine 3.4.2 DLACN2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012.
      private void dlaqsy​(char uplo, int n, double[][] A, int lda, double[] s, double scond, double amax, char[] equed)  
      void dlatrs​(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.4.2 DLATRS.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012.
      private void dlauu2​(char uplo, int n, double[][] A, int lda, int[] info)
      This is a port of LAPACK version auxiliary routine 3.4.2 DLAUU2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012.
      private void dlauum​(char uplo, int n, double[][] A, int lda, int[] info)
      This is a port of LAPACK version auxiliary routine 3.4.2 DLAUUM.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012.
      private void dpocon​(char uplo, int n, double[][] A, int lda, double anorm, double[] rcond, double[] work, int[] iwork, int[] info)
      This is a port of LAPACK version routine 3.4.0 DPOCON.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011.
      private void dpoequ​(int n, double[][] A, int lda, double[] s, double[] scond, double[] amax, int[] info)  
      private void dporfs​(char uplo, int n, int nrhs, double[][] A, int lda, double[][] AF, int ldaf, double[][] B, int ldb, double[][] X, int ldx, double[] ferr, double[] berr, double[] work, int[] iwork, int[] info)
      This is a port of LAPACK version routine 3.4.0 DPORFS.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011.
      void dposv​(char uplo, int n, int nrhs, double[][] A, int lda, double[][] B, int ldb, int[] info)
      This is a port of LAPACK version routine 3.4.0 DPOSV.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011.
      void dposvx​(char fact, char uplo, int n, int nrhs, double[][] A, int lda, double[][] AF, int ldaf, char[] equed, double[] s, double[][] B, int ldb, double[][] X, int ldx, double[] rcond, double[] ferr, double[] berr, double[] work, int[] iwork, int[] info)
      This is a port of LAPACK version routine 3.4.1 DPOSVX.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., April, 2012.
      private void dpot01​(char uplo, int n, double[][] A, int lda, double[][] afac, int ldafac, double[] rwork, double[] resid)
      This is a port of LAPACK version test routine 3.4.0 DPOT01.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011.
      private void dpot02​(char uplo, 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 LAPACK version test routine 3.4.0 DPOT02.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011.
      private void dpot03​(char uplo, int n, double[][] A, int lda, double[][] AINV, int ldainv, double[][] work, int ldwork, double[] rwork, double[] rcond, double[] resid)
      This is a port of LAPACK version test routine 3.4.0 DPOT03.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011.
      private void dpot05​(char uplo, int n, int nrhs, double[][] A, int lda, double[][] B, int ldb, double[][] X, int ldx, double[][] XACT, int ldxact, double[] ferr, double[] berr, double[] reslts)
      This is a port of LAPACK version test routine 3.4.0 DPOT05.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011.
      private void dpotf2​(char uplo, int n, double[][] A, int lda, int[] info)
      This is a port of LAPACK version routine 3.4.2 DPOTF2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012.
      void dpotrf​(char uplo, int n, double[][] A, int lda, int[] info)
      This is a port of LAPACK version routine 3.4.0 DPOTRF.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011.
      void dpotri​(char uplo, int n, double[][] A, int lda, int[] info)
      This is a port of LAPACK version routine 3.4.0 DPOTRI.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011.
      void dpotrs​(char uplo, int n, int nrhs, double[][] A, int lda, double[][] B, int ldb, int[] info)
      This is a port of LAPACK version routine 3.4.0 DPOTRS.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011.
      private void dtrti2​(char uplo, char diag, int n, double[][] A, int lda, int[] info)
      This is a port of LAPACK version routine 3.4.2 DTRTI2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012.
      void dtrtri​(char uplo, char diag, int n, double[][] A, int lda, int[] info)
      This is a port of LAPACK version routine 3.4.0 DTRTRI.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011.
      void xlaenv​(int ispec, int nvalue)
      This is a port of version 3.1 LAPACK auxiliary routine XLAENV.
      • Methods inherited from class java.lang.Object

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

      • LinearEquations

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

      • dchkaa

        public void dchkaa()
      • ddrvpo

        private void ddrvpo​(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)
      • derrvx

        public void derrvx()
      • dlaqsy

        private void dlaqsy​(char uplo,
                            int n,
                            double[][] A,
                            int lda,
                            double[] s,
                            double scond,
                            double amax,
                            char[] equed)
      • dpoequ

        private void dpoequ​(int n,
                            double[][] A,
                            int lda,
                            double[] s,
                            double[] scond,
                            double[] amax,
                            int[] info)
      • dchkpo

        private void dchkpo​(boolean[] dotype,
                            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)
      • derrpo

        public void derrpo()
      • dget04

        public void dget04​(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.4.0 DGET04.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011. dget04 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[][] 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[][] 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)
      • dget06

        public double dget06​(double rcond,
                             double rcondc)
        This is a port of LAPACK version test routine 3.4.0 DGET06.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011. dget06 computes a test ratio to compare two values for rcond.
        Parameters:
        input - double rcond The estimate of the reciprocal of the condition number of A, as computed by dgecon.
        input - double rcondc The reciprocal of the condition number of A, computed as ( 1/norm(A) ) / norm(inv(A)).
      • dpot01

        private void dpot01​(char uplo,
                            int n,
                            double[][] A,
                            int lda,
                            double[][] afac,
                            int ldafac,
                            double[] rwork,
                            double[] resid)
        This is a port of LAPACK version test routine 3.4.0 DPOT01.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011. dpot01 reconstructs a symmetric positive definite matrix A from its L*L' or U'*U factorization and computes the residual norm( L*L' - A ) / ( N * norm(A) * eps) or norm( U'*U - A ) / ( N * norm(A) * eps), where eps is the machine epsilon.
        Parameters:
        input - char uplo Specifies whether the upper or lower triangular part of the symmetric matrix A is stored: = 'U': Upper triangular = 'L': Lower triangular
        input - int n The number of rows and columns of the matrix A. n >= 0.
        input - double[][] A of dimension (lda, n). The original symmetric matrix A.
        input - int lda The leading dimension of the array A. lda >= max(1, n).
        input - int ldafac The leading dimension of the array afac. ldafac >= max(1, n).
        output - double[] rwork of dimension n
        output - double[] resid of dimension 1 If uplo = 'L', norm(L*L' - A) / (n * norm(A) * eps) If uplo = 'U', norm(U'*U - A) / (n * norm(A) * eps)
      • dpot02

        private void dpot02​(char uplo,
                            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 LAPACK version test routine 3.4.0 DPOT02.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011. dpot02 computes the residual for the solution of a symmetric system of linear equations A*x = b: resid[0] = norm(B - A*X) / ( norm(A) * norm(X) * eps), where eps is the machine epsilon.
        Parameters:
        input - char uplo Specifies whether the upper or lower triangular part of the symmetric matrix A is stored: = 'U': Upper triangular = 'L': Lower triangular
        input - int n The number of rows and columns of the matrix A. n >= 0.
        input - int nrhs The number of columns of B, the matrix of right hand sides. nrhs >= 0.
        input - double[][] A of dimension (lda, n). The original symmetric matrix A.
        input - int lda The leading dimension of the array A. lda >= max(1, n).
        input - double[][] X of dimension (ldx, nrhs). The computed solution vectors for the system of linear equations.
        input - int ldb The leading dimension of the array B. ldb >= max(1, n).
        output - double[] rwork of dimension n
        output - double[] resid of dimension 1 The maximum over the number of right hand sides of norm(B - A*X) / ( norm(A) * norm(X) * eps).
      • dpot03

        private void dpot03​(char uplo,
                            int n,
                            double[][] A,
                            int lda,
                            double[][] AINV,
                            int ldainv,
                            double[][] work,
                            int ldwork,
                            double[] rwork,
                            double[] rcond,
                            double[] resid)
        This is a port of LAPACK version test routine 3.4.0 DPOT03.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011. dpot03 computes the residual for a symmetric matrix times its inverse: norm( I - A*AINV ) / (n * norm(A) * norm(AINV) * eps), where eps is the machine epsilon.
        Parameters:
        input - char uplo Specifies whether the upper or lower triangular part of the symmetric matrix A is stored: = 'U': Upper triangular = 'L': Lower triangular
        input - int n The number of rows and columns of the matrix A. n >= 0.
        input - double[][] A of dimension (lda, n). The original symmetric matrix A.
        input - int lda The leading dimension of the array A. lda >= max(1, n).
        input - int ldainv The leading dimension of the array AINV. ldainv >= max(1, n).
        output - double[][] work of dimension (ldwork, n).
        input - int ldwork The leading dimension of the array work. ldwork >= max(1, n).
        output - double[] rwork of dimension n
        output - double[] rcond of dimension 1 The reciprocal of the condition number of A, computed as ( 1/norm(A) ) / norm(AINV).
        output - double[] resid of dimension 1 norm(I - A*AINV) / (n * norm(A) * norm(AINV) * eps)
      • dpot05

        private void dpot05​(char uplo,
                            int n,
                            int nrhs,
                            double[][] A,
                            int lda,
                            double[][] B,
                            int ldb,
                            double[][] X,
                            int ldx,
                            double[][] XACT,
                            int ldxact,
                            double[] ferr,
                            double[] berr,
                            double[] reslts)
        This is a port of LAPACK version test routine 3.4.0 DPOT05.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011. DPOT05 tests the error bounds from iterative refinement for the computed solution to a system of equations A*X = B, where A is a symmetric n by n matrix. reslts[0] = test of the error bound = norm(X - XACT) / ( norm(X) * ferr) A large value is returned if this ratio is not less than one. reslts[1] = residual from the iterative refinement routine = the maximum of berr / ( (n+1)*eps + (*) ), where (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
        Parameters:
        input - char uplo Specifies whether the upper or lower triangular part of the symmetric matrix A is stored. = 'U': Upper triangular = 'L': Lower triangular
        input - int n The number of rows of the matrices X, B, and XACT, and the order of the matrix A. n >= 0.
        input - int nrhs The number of columns of the matrices X, B, and XACT. nrhs >= 0.
        input - double[][] A of dimension (lda, n) 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, and the strictly lower triangular part of A is not referenced. If uplo = 'L', the leading n by n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
        input - int lda The leading dimension of the array A. lda >= max(1,n).
        input - double[][] B of dimension (ldb, nrhs) The right hand side vectors for the system of linear equations.
        input - int ldb The leading dimension of the array B. ldb >= max(1,n).
        input - double[][] 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[][] 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[] ferr of dimension (nrhs) The estimated forward error bounds for each solution vector X. If XTRUE is the true solution, FERR bounds the magnitude of the largest entry in (X - XTRUE) divided by the magnitude of the largest entry in X.
        input - double[] berr of dimension (nrhs) The componentwise relative backward error of each solution vector (i.e., the smallest relative change in any entry of A or B that makes X an exact solution).
        output - double[] reslts of dimension (2). The maximum over the nrhs solution vectors of the ratios: reslts[0] = norm(X - XACT) / ( norm(X) * ferr) reslts[1] = berr / ( (n+1)*eps + (*) ) (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
      • dposv

        public void dposv​(char uplo,
                          int n,
                          int nrhs,
                          double[][] A,
                          int lda,
                          double[][] B,
                          int ldb,
                          int[] info)
        This is a port of LAPACK version routine 3.4.0 DPOSV.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011. dposv computes the solution to a system of linear equations A*X = B for PO matrices dposv computes the solution to a real system of linear equations A * X = B where A is an n by n symmetric positive definite matrix and X and B are n by nrhs matrices. The Cholesky decomposition is used to factor A as A = U**T * U, if uplo = 'U', or A = L * L**T, if uplo = 'L', where U is an upper triangular matrix and L is a lower triangular matrix. The factored form of A is then used to solve the system of equations A * X = B.
        Parameters:
        input - char uplo = 'U': Upper triangle of A is stored = 'L': Lower triangle of A is stored
        input - int n The number of linear equations, i.e., the order of the matrix A. n >= 0.
        input - int nrhs The number of right hand sides, i.e., the number of columns of the matrix B. nrhs >= 0.
        input - int lda. The leading dimension of the array A. lda >= max(1, n).
        input - int ldb The leading dimension of the array B. ldb >= max(1,n).
        output - int[] info of dimension 1. = 0: successful exit 0: if info[0] = i, the leading minor of order i of A is not positive definite, so the factorization could not be completed, and the solution has not been computed.
      • dposvx

        public void dposvx​(char fact,
                           char uplo,
                           int n,
                           int nrhs,
                           double[][] A,
                           int lda,
                           double[][] AF,
                           int ldaf,
                           char[] equed,
                           double[] s,
                           double[][] B,
                           int ldb,
                           double[][] X,
                           int ldx,
                           double[] rcond,
                           double[] ferr,
                           double[] berr,
                           double[] work,
                           int[] iwork,
                           int[] info)
        This is a port of LAPACK version routine 3.4.1 DPOSVX.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., April, 2012. dposvx computes the solution to a system of linear equations A*X = B for PO matrices dposvx uses the Cholesky factorization A = U**T*U or A = L*L**T to compute the solution to a real system of linear equations A * X = B, where A is an n-by-n symmetric positive definite matrix and X and B are n-by-nrhs matrices. Error bounds on the solution and a condition estimate are also provided. The following steps are performed: 1. If fact = 'E', real scaling factors are computed to equilibrate the system: diag(s) * A * diag(s) * inv(diag(s)) * X = diag(s) * B Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(s)*A*diag(s) and B by diag(s)*B. 2. If fact = 'N' or 'E', the Cholesky decomposition is used to factor the matrix A (after equilibration if fact = 'E') as A = U**T* U, if uplo = 'U', or A = L * L**T, if uplo = 'L', where U is an upper triangular matrix and L is a lower triangular matrix. 3. If the leading i-by-i principal minor is not positive definite, then the routine returns with info[0] = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A. If the reciprocal of the condition number is less than machine precision, info[0] = n+1 is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below. 4. The system of equations is solved for X using the factored form of A. 5. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it. 6. If equilibration was used, the matrix X is premultiplied by diag(s) so that it solves the original system before equilibration.
        Parameters:
        input - char fact Specifies whether or not the factored form of the matrix A is supplied on entry, and if not, whether the matrix A should be equilibrated before it is factored. = 'F': On entry, AF contains the factored form of A. If equed[0] = 'Y', the matrix A has been equilibrated with scaling factors given by s. A and AF will not be modified. = 'N': The matrix A will be copied to AF and factored. = 'E': The matrix A will be equilibrated if necessary, then copied to AF and factored.
        input - char uplo = 'U': Upper triangle of A is stored; = 'L': Lower triangle of A is stored.
        input - int n The number of linear equations, i.e., the order of the matrix A. n >= 0.
        input - int nrhs The number of right hand sides, i.e., the number of columns of the matrices B and X. nrhs >= 0.
        input - int lda The leading dimension of the array A. lda >= max(1,n).
        input - int ldaf The leading dimension of the array AF. ldaf >= max(1,n).
        input - int ldb The leading dimension of the array B. LDB >= max(1,n).
        output - double[][] X of dimension (ldx, nrhs) If info[0] = 0 or info[0] = n+1, the n-by-nrhs solution matrix X to the original system of equations. Note that if equed[0] = 'Y', A and B are modified on exit, and the solution to the equilibrated system is inv(diag(s))*X.
        input - int ldx The leading dimension of the array X. ldx >= max(1,n).
        output - double[] rcond of dimension (1). The estimate of the reciprocal condition number of the matrix A after equilibration (if done). If rcond is less than the machine precision (in particular, if rcond = 0), the matrix is singular to working precision. This condition is indicated by a return code of info[0] > 0.
        output - double[] ferr of dimension (nrhs) The estimated forward error bound for each solution vector X[j] (the j-th column of the solution matrix X). If XTRUE is the true solution corresponding to X[j], ferr[j] is an estimated upper bound for the magnitude of the largest element in (X[j] - XTRUE) divided by the magnitude of the largest element in X[j]. The estimate is as reliable as the estimate for rcond, and is almost always a slight overestimate of the true error.
        output - double[] berr of dimension (nrhs) The componentwise relative backward error of each solution vector X[j] (i.e., the smallest relative change in any element of A or B that makes X[j] an exact solution).
        output - double[] work of dimension (3*n)
        output - int[] iwork of dimension (n)
        output - int[] info of dimension (1) = 0: successful exit 0: if info[0] = i, and i is
      • dpocon

        private void dpocon​(char uplo,
                            int n,
                            double[][] A,
                            int lda,
                            double anorm,
                            double[] rcond,
                            double[] work,
                            int[] iwork,
                            int[] info)
        This is a port of LAPACK version routine 3.4.0 DPOCON.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011. dpocon estimates the reciprocal of the condition number (in the 1-norm) of a real symmetric positive definite matrix using the Cholesky factorization A = U**T*U or A = L*L**T computed by dpotrf. An estimate is obtained for norm(inv(A)), and the reciprocal of the condition number is computed as rcond[0] = 1 / (anorm * norm(inv(A))).
        Parameters:
        input - char uplo = 'U': Upper triangle of A is stored; = 'L': Lower triangle of A is stored.
        input - int n The order of the matrix A. n >= 0.
        input - double[][] A of dimension (lda, n) The triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, as computed by dpotrf.
        input - int lda The leading dimension of the array A. lda >= max(1,n).
        input - double anorm The 1-norm (or infinity-norm) of the symmetric matrix A.
        output - double[] rcond of dimension (1) The reciprocal of the condition number of the matrix A, computed as rcond[0] = 1/(anorm * ainvnm), where ainvnm is an estimate of the 1-norm of inv(A) computed in this routine.
        output - double[] work of dimension (n)
        output - int[] iwork of dimension (n)
        out - int[] info of dimension (1) = 0: successful exit
      • dporfs

        private void dporfs​(char uplo,
                            int n,
                            int nrhs,
                            double[][] A,
                            int lda,
                            double[][] AF,
                            int ldaf,
                            double[][] B,
                            int ldb,
                            double[][] X,
                            int ldx,
                            double[] ferr,
                            double[] berr,
                            double[] work,
                            int[] iwork,
                            int[] info)
        This is a port of LAPACK version routine 3.4.0 DPORFS.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011. dporfs improves the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite, and provides error bounds and backward error estimates for the solution.
        Parameters:
        input - char uplo = 'U': Upper triangle of A is stored; = 'L': Lower triangle of A is stored.
        input - int n The order of the matrix A. n >= 0.
        input - int nrhs The number of right hand sides, i.e., the number of columns of the matrices B and X. nrhs >= 0.
        input - double[][] A of dimension (lda, n) 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, and the strictly lower triangular part of A is not referenced. If uplo = 'L', the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
        input - int lda The leading dimension of the array A. lda >= max(1,n).
        input - double[][] AF of dimension (ldaf, n) The triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, as computed by dpotrf.
        input - int ldaf The leading dimension of the array AF. ldaf >= max(1,n).
        input - double[][] B of dimension (ldb, nrhs) The right hand side matrix B.
        input - int ldb The leading dimension of the array B. ldb >= max(1,n).
        input - int ldx The leading dimension of the array X. ldx >= max(1,n).
        output - double[] ferr of dimension (nrhs) The estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). If XTRUE is the true solution corresponding to X(j), ferr[j] is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). The estimate is as reliable as the estimate for rcond, and is almost always a slight overestimate of the true error.
        output - double[] berr of dimension (nrhs) The componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution).
        output - double[] work of dimension (n)
        output - int[] iwork of dimension (n).
        output - int[] info of dimension (1). = 0: successful exit
      • dpotrf

        public void dpotrf​(char uplo,
                           int n,
                           double[][] A,
                           int lda,
                           int[] info)
        This is a port of LAPACK version routine 3.4.0 DPOTRF.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011. dpotrf computes the Cholesky factorization of a real symmetric positive definite matrix A. The factorization has the form A = U**T * U, if uplo = 'U', or A = L * L**T, if uplo = 'L', where U is an upper triangular matrix and L is lower triangular. This is the block version of the algorithm
        Parameters:
        input - char uplo = 'U': Upper triangle of A is stored = 'L': Lower triangle of A is stored
        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 0: if info[0] = i, the leading minor of order i is not positive definite, and the factorization could not be completed.
      • dpotrs

        public void dpotrs​(char uplo,
                           int n,
                           int nrhs,
                           double[][] A,
                           int lda,
                           double[][] B,
                           int ldb,
                           int[] info)
        This is a port of LAPACK version routine 3.4.0 DPOTRS.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November, 2011. dpotrs solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization A = U**T*U or A = L*L**T computed by dpotrf.
        Parameters:
        input - char uplo = 'U': Upper triangle of A is stored = 'L': Lower triangle of A is stored
        input - int n The order of the matrix A. n >= 0.
        input - int nrhs The number of right hand sides, i.e., the number of columns of the matrix B. nrhs >= 0.
        input - double[][] A of dimension (lda, n) The triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, as computed by dpotrf.
        input - int lda. The leading dimension of the array A. lda >= max(1, n).
        input - int ldb The leading dimension of the array B. ldb >= max(1,n).
        output - int[] info of dimension 1. = 0: successful exit
      • dpotf2

        private void dpotf2​(char uplo,
                            int n,
                            double[][] A,
                            int lda,
                            int[] info)
        This is a port of LAPACK version routine 3.4.2 DPOTF2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012. dpotf2 computes the Cholesky factorization of a symmetric Hermetian positive definite matrix (unblocked algorithm). dpotf2 computes the Cholesky factorization of a real symmetric positive definite matrix A. The factorization has the form A = U**T * U, if uplo = 'U', or A = L * L**T, if uplo = 'L', where U is an upper triangular matrix and L is lower triangular. This is the unblocked version of the algorithm
        Parameters:
        input - char uplo Specifies whether the upper or lower triangular part of the symmetric matrix A is stored. = 'U': Upper triangular = 'L': Lower 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 0: if info[0] = k, the leading minor of order k is not positive definite, and the factorization could not be completed.
      • dpotri

        public void dpotri​(char uplo,
                           int n,
                           double[][] A,
                           int lda,
                           int[] info)
        This is a port of LAPACK version routine 3.4.0 DPOTRI.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011. dpotri computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = U**T*U or A = L*L**T computed by dpotrf.
        Parameters:
        input - char uplo = 'U': Upper triangle of A is stored; = 'L': Lower triangle of A is stored.
        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[] of dimension 1. = 0: successful exit 0: if info = i, the [i-1][i-1] element of the factor U or L is zero, and the inverse could not be computed.
      • dlacn2

        public void dlacn2​(int n,
                           double[] v,
                           double[] x,
                           int[] isgn,
                           double[] est,
                           int[] kase,
                           int[] isave)
        This is a port of LAPACK version auxiliary routine 3.4.2 DLACN2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012. 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. dlacn2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products. dlacn2 estimates the 1-norm of a square, real matrix A. Reverse communication is used for evaluating matrix-vector products.
        Parameters:
        input - int n The order of the matrix. n >= 1.
        output - double[] v of dimension (n). On the final return, V = A*W, where EST = norm(V)/norm(W) (W is not returned).
        output - int[] isgn of dimension (n).
      • dlatrs

        public void dlatrs​(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.4.2 DLATRS.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012. dlatrs solves a triangular system of equations with the scale factor set to prevent overflow. dlatrs solves one of the triangular systems A *x = s*b or A**T *x = s*b with scaling to prevent overflow. Here A is an upper or lower triangular matrix, A**T denotes the 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 DTRSV 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, dtrsv 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**T* x = s*b (Conjugate transpose = 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[][] 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 or A**T* 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
        • dlauum

          private void dlauum​(char uplo,
                              int n,
                              double[][] A,
                              int lda,
                              int[] info)
          This is a port of LAPACK version auxiliary routine 3.4.2 DLAUUM.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012. dlauum computes the product UUH or LHL, where U and L are upper or lower triangular matrices (blocked algorithm). dlauum computes the product U * U**T or L**T * L, where the triangular factor U or L is stored in the upper or lower triangular part of the array A. If uplo = 'U' or 'u' then the upper triangle of the result is stored, overwriting the factor U in A. If uplo = 'L' or 'l' then the lower triangle of the result is stored, overwriting the factor L in A. This is the blocked form of the algorithm
          Parameters:
          input - char uplo Specifies whether the triangular factor stored in the array is upper or lower triangular: = 'U': Upper triangular = 'L': Lower triangular
          input - int n The order of the triangular factor U or L. n >= 0.
          input - int lda The leading dimension of array A. lda >= max(1, n).
          output - int[] info of dimension 1. = 0: successful exit
        • dlauu2

          private void dlauu2​(char uplo,
                              int n,
                              double[][] A,
                              int lda,
                              int[] info)
          This is a port of LAPACK version auxiliary routine 3.4.2 DLAUU2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012. dlauu2 computes the product UUH or LHL, where U and L are upper or lower triangular matrices (unblocked algorithm). dlauu2 computes the product U * U**T or L**T * L, where the triangular factor U or L is stored in the upper or lower triangular part of the array A. If uplo = 'U' or 'u' then the upper triangle of the result is stored, overwriting the factor U in A. If uplo = 'L' or 'l' then the lower triangle of the result is stored, overwriting the factor L in A. This is the unblocked form of the algorithm
          Parameters:
          input - char uplo Specifies whether the triangular factor stored in the array is upper or lower triangular: = 'U': Upper triangular = 'L': Lower triangular
          input - int n The order of the triangular factor U or L. n >= 0.
          input - int lda The leading dimension of array A. lda >= max(1, n).
          output - int[] info of dimension 1. = 0: successful exit
        • dtrtri

          public void dtrtri​(char uplo,
                             char diag,
                             int n,
                             double[][] A,
                             int lda,
                             int[] info)
          This is a port of LAPACK version routine 3.4.0 DTRTRI.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., November 2011. dtrtri computes the inverse of a real upper or lower triangular matrix A.
          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.
        • dtrti2

          private void dtrti2​(char uplo,
                              char diag,
                              int n,
                              double[][] A,
                              int lda,
                              int[] info)
          This is a port of LAPACK version routine 3.4.2 DTRTI2.F created by the University of Tennessee, University of California Berkeley, University of Colorado Denver, and NAG Ltd., September 2012. dtrti2 computes the inverse of a triangular matrix (unblocked algorithm). dtrti2 computes the inverse of a real upper or lower triangular matrix.
          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
        • 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.