Functions | |
| subroutine | cbdt05 (m, n, a, lda, s, ns, u, ldu, vt, ldvt, work, resid) |
| CBDT05 | |
| subroutine | dbdt01 (m, n, kd, a, lda, q, ldq, d, e, pt, ldpt, work, resid) |
| DBDT01 | |
| subroutine | dbdt02 (m, n, b, ldb, c, ldc, u, ldu, work, resid) |
| DBDT02 | |
| subroutine | dbdt03 (uplo, n, kd, d, e, u, ldu, s, vt, ldvt, work, resid) |
| DBDT03 | |
| subroutine | dbdt04 (uplo, n, d, e, s, ns, u, ldu, vt, ldvt, work, resid) |
| DBDT04 | |
| subroutine | dbdt05 (m, n, a, lda, s, ns, u, ldu, vt, ldvt, work, resid) |
| DBDT05 | |
| subroutine | dchkbb (nsizes, mval, nval, nwdths, kk, ntypes, dotype, nrhs, iseed, thresh, nounit, a, lda, ab, ldab, bd, be, q, ldq, p, ldp, c, ldc, cc, work, lwork, result, info) |
| DCHKBB | |
| subroutine | dchkbd (nsizes, mval, nval, ntypes, dotype, nrhs, iseed, thresh, a, lda, bd, be, s1, s2, x, ldx, y, z, q, ldq, pt, ldpt, u, vt, work, lwork, iwork, nout, info) |
| DCHKBD | |
| subroutine | dchkbk (nin, nout) |
| DCHKBK | |
| subroutine | dchkbl (nin, nout) |
| DCHKBL | |
| subroutine | dchkec (thresh, tsterr, nin, nout) |
| DCHKEC | |
| program | dchkee |
| DCHKEE | |
| subroutine | dchkgg (nsizes, nn, ntypes, dotype, iseed, thresh, tstdif, thrshn, nounit, a, lda, b, h, t, s1, s2, p1, p2, u, ldu, v, q, z, alphr1, alphi1, beta1, alphr3, alphi3, beta3, evectl, evectr, work, lwork, llwork, result, info) |
| DCHKGG | |
| subroutine | dchkgk (nin, nout) |
| DCHKGK | |
| subroutine | dchkgl (nin, nout) |
| DCHKGL | |
| subroutine | dchkhs (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, h, t1, t2, u, ldu, z, uz, wr1, wi1, wr2, wi2, wr3, wi3, evectl, evectr, evecty, evectx, uu, tau, work, nwork, iwork, select, result, info) |
| DCHKHS | |
| subroutine | dchksb (nsizes, nn, nwdths, kk, ntypes, dotype, iseed, thresh, nounit, a, lda, sd, se, u, ldu, work, lwork, result, info) |
| DCHKSB | |
| subroutine | dchksb2stg (nsizes, nn, nwdths, kk, ntypes, dotype, iseed, thresh, nounit, a, lda, sd, se, d1, d2, d3, u, ldu, work, lwork, result, info) |
| DCHKSB2STG | |
| subroutine | dchkst (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, ap, sd, se, d1, d2, d3, d4, d5, wa1, wa2, wa3, wr, u, ldu, v, vp, tau, z, work, lwork, iwork, liwork, result, info) |
| DCHKST | |
| subroutine | dchkst2stg (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, ap, sd, se, d1, d2, d3, d4, d5, wa1, wa2, wa3, wr, u, ldu, v, vp, tau, z, work, lwork, iwork, liwork, result, info) |
| DCHKST2STG | |
| subroutine | dckcsd (nm, mval, pval, qval, nmats, iseed, thresh, mmax, x, xf, u1, u2, v1t, v2t, theta, iwork, work, rwork, nin, nout, info) |
| DCKCSD | |
| subroutine | dckglm (nn, mval, pval, nval, nmats, iseed, thresh, nmax, a, af, b, bf, x, work, rwork, nin, nout, info) |
| DCKGLM | |
| subroutine | dckgqr (nm, mval, np, pval, nn, nval, nmats, iseed, thresh, nmax, a, af, aq, ar, taua, b, bf, bz, bt, bwk, taub, work, rwork, nin, nout, info) |
| DCKGQR | |
| subroutine | dckgsv (nm, mval, pval, nval, nmats, iseed, thresh, nmax, a, af, b, bf, u, v, q, alpha, beta, r, iwork, work, rwork, nin, nout, info) |
| DCKGSV | |
| subroutine | dcklse (nn, mval, pval, nval, nmats, iseed, thresh, nmax, a, af, b, bf, x, work, rwork, nin, nout, info) |
| DCKLSE | |
| subroutine | dcsdts (m, p, q, x, xf, ldx, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, theta, iwork, work, lwork, rwork, result) |
| DCSDTS | |
| subroutine | ddrges (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, b, s, t, q, ldq, z, alphar, alphai, beta, work, lwork, result, bwork, info) |
| DDRGES | |
| subroutine | ddrges3 (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, b, s, t, q, ldq, z, alphar, alphai, beta, work, lwork, result, bwork, info) |
| DDRGES3 | |
| subroutine | ddrgev (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, b, s, t, q, ldq, z, qe, ldqe, alphar, alphai, beta, alphr1, alphi1, beta1, work, lwork, result, info) |
| DDRGEV | |
| subroutine | ddrgev3 (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, b, s, t, q, ldq, z, qe, ldqe, alphar, alphai, beta, alphr1, alphi1, beta1, work, lwork, result, info) |
| DDRGEV3 | |
| subroutine | ddrgsx (nsize, ncmax, thresh, nin, nout, a, lda, b, ai, bi, z, q, alphar, alphai, beta, c, ldc, s, work, lwork, iwork, liwork, bwork, info) |
| DDRGSX | |
| subroutine | ddrgvx (nsize, thresh, nin, nout, a, lda, b, ai, bi, alphar, alphai, beta, vl, vr, ilo, ihi, lscale, rscale, s, dtru, dif, diftru, work, lwork, iwork, liwork, result, bwork, info) |
| DDRGVX | |
| subroutine | ddrvbd (nsizes, mm, nn, ntypes, dotype, iseed, thresh, a, lda, u, ldu, vt, ldvt, asav, usav, vtsav, s, ssav, e, work, lwork, iwork, nout, info) |
| DDRVBD | |
| subroutine | ddrves (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, h, ht, wr, wi, wrt, wit, vs, ldvs, result, work, nwork, iwork, bwork, info) |
| DDRVES | |
| subroutine | ddrvev (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, h, wr, wi, wr1, wi1, vl, ldvl, vr, ldvr, lre, ldlre, result, work, nwork, iwork, info) |
| DDRVEV | |
| subroutine | ddrvsg (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, b, ldb, d, z, ldz, ab, bb, ap, bp, work, nwork, iwork, liwork, result, info) |
| DDRVSG | |
| subroutine | ddrvsg2stg (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, b, ldb, d, d2, z, ldz, ab, bb, ap, bp, work, nwork, iwork, liwork, result, info) |
| DDRVSG2STG | |
| subroutine | ddrvst (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, d1, d2, d3, d4, eveigs, wa1, wa2, wa3, u, ldu, v, tau, z, work, lwork, iwork, liwork, result, info) |
| DDRVST | |
| subroutine | ddrvst2stg (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, d1, d2, d3, d4, eveigs, wa1, wa2, wa3, u, ldu, v, tau, z, work, lwork, iwork, liwork, result, info) |
| DDRVST2STG | |
| subroutine | ddrvsx (nsizes, nn, ntypes, dotype, iseed, thresh, niunit, nounit, a, lda, h, ht, wr, wi, wrt, wit, wrtmp, witmp, vs, ldvs, vs1, result, work, lwork, iwork, bwork, info) |
| DDRVSX | |
| subroutine | ddrvvx (nsizes, nn, ntypes, dotype, iseed, thresh, niunit, nounit, a, lda, h, wr, wi, wr1, wi1, vl, ldvl, vr, ldvr, lre, ldlre, rcondv, rcndv1, rcdvin, rconde, rcnde1, rcdein, scale, scale1, result, work, nwork, iwork, info) |
| DDRVVX | |
| subroutine | derrbd (path, nunit) |
| DERRBD | |
| subroutine | derrec (path, nunit) |
| DERREC | |
| subroutine | derred (path, nunit) |
| DERRED | |
| subroutine | derrgg (path, nunit) |
| DERRGG | |
| subroutine | derrhs (path, nunit) |
| DERRHS | |
| subroutine | derrst (path, nunit) |
| DERRST | |
| subroutine | dget02 (trans, m, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid) |
| DGET02 | |
| subroutine | dget10 (m, n, a, lda, b, ldb, work, result) |
| DGET10 | |
| subroutine | dget22 (transa, transe, transw, n, a, lda, e, lde, wr, wi, work, result) |
| DGET22 | |
| subroutine | dget23 (comp, balanc, jtype, thresh, iseed, nounit, n, a, lda, h, wr, wi, wr1, wi1, vl, ldvl, vr, ldvr, lre, ldlre, rcondv, rcndv1, rcdvin, rconde, rcnde1, rcdein, scale, scale1, result, work, lwork, iwork, info) |
| DGET23 | |
| subroutine | dget24 (comp, jtype, thresh, iseed, nounit, n, a, lda, h, ht, wr, wi, wrt, wit, wrtmp, witmp, vs, ldvs, vs1, rcdein, rcdvin, nslct, islct, result, work, lwork, iwork, bwork, info) |
| DGET24 | |
| subroutine | dget31 (rmax, lmax, ninfo, knt) |
| DGET31 | |
| subroutine | dget32 (rmax, lmax, ninfo, knt) |
| DGET32 | |
| subroutine | dget33 (rmax, lmax, ninfo, knt) |
| DGET33 | |
| subroutine | dget34 (rmax, lmax, ninfo, knt) |
| DGET34 | |
| subroutine | dget35 (rmax, lmax, ninfo, knt) |
| DGET35 | |
| subroutine | dget36 (rmax, lmax, ninfo, knt, nin) |
| DGET36 | |
| subroutine | dget37 (rmax, lmax, ninfo, knt, nin) |
| DGET37 | |
| subroutine | dget38 (rmax, lmax, ninfo, knt, nin) |
| DGET38 | |
| subroutine | dget39 (rmax, lmax, ninfo, knt) |
| DGET39 | |
| subroutine | dget40 (rmax, lmax, ninfo, knt, nin) |
| DGET40 | |
| subroutine | dget51 (itype, n, a, lda, b, ldb, u, ldu, v, ldv, work, result) |
| DGET51 | |
| subroutine | dget52 (left, n, a, lda, b, ldb, e, lde, alphar, alphai, beta, work, result) |
| DGET52 | |
| subroutine | dget53 (a, lda, b, ldb, scale, wr, wi, result, info) |
| DGET53 | |
| subroutine | dget54 (n, a, lda, b, ldb, s, lds, t, ldt, u, ldu, v, ldv, work, result) |
| DGET54 | |
| subroutine | dglmts (n, m, p, a, af, lda, b, bf, ldb, d, df, x, u, work, lwork, rwork, result) |
| DGLMTS | |
| subroutine | dgqrts (n, m, p, a, af, q, r, lda, taua, b, bf, z, t, bwk, ldb, taub, work, lwork, rwork, result) |
| DGQRTS | |
| subroutine | dgrqts (m, p, n, a, af, q, r, lda, taua, b, bf, z, t, bwk, ldb, taub, work, lwork, rwork, result) |
| DGRQTS | |
| subroutine | dgsvts3 (m, p, n, a, af, lda, b, bf, ldb, u, ldu, v, ldv, q, ldq, alpha, beta, r, ldr, iwork, work, lwork, rwork, result) |
| DGSVTS3 | |
| subroutine | dhst01 (n, ilo, ihi, a, lda, h, ldh, q, ldq, work, lwork, result) |
| DHST01 | |
| subroutine | dlafts (type, m, n, imat, ntests, result, iseed, thresh, iounit, ie) |
| DLAFTS | |
| subroutine | dlahd2 (iounit, path) |
| DLAHD2 | |
| subroutine | dlarfy (uplo, n, v, incv, tau, c, ldc, work) |
| DLARFY | |
| subroutine | dlarhs (path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info) |
| DLARHS | |
| subroutine | dlasum (type, iounit, ie, nrun) |
| DLASUM | |
| subroutine | dlatb9 (path, imat, m, p, n, type, kla, kua, klb, kub, anorm, bnorm, modea, modeb, cndnma, cndnmb, dista, distb) |
| DLATB9 | |
| subroutine | dlatm4 (itype, n, nz1, nz2, isign, amagn, rcond, triang, idist, iseed, a, lda) |
| DLATM4 | |
| logical function | dlctes (zr, zi, d) |
| DLCTES | |
| logical function | dlctsx (ar, ai, beta) |
| DLCTSX | |
| subroutine | dlsets (m, p, n, a, af, lda, b, bf, ldb, c, cf, d, df, x, work, lwork, rwork, result) |
| DLSETS | |
| subroutine | dort01 (rowcol, m, n, u, ldu, work, lwork, resid) |
| DORT01 | |
| subroutine | dort03 (rc, mu, mv, n, k, u, ldu, v, ldv, work, lwork, result, info) |
| DORT03 | |
| subroutine | dsbt21 (uplo, n, ka, ks, a, lda, d, e, u, ldu, work, result) |
| DSBT21 | |
| subroutine | dsgt01 (itype, uplo, n, m, a, lda, b, ldb, z, ldz, d, work, result) |
| DSGT01 | |
| logical function | dslect (zr, zi) |
| DSLECT | |
| subroutine | dspt21 (itype, uplo, n, kband, ap, d, e, u, ldu, vp, tau, work, result) |
| DSPT21 | |
| subroutine | dstech (n, a, b, eig, tol, work, info) |
| DSTECH | |
| subroutine | dstect (n, a, b, shift, num) |
| DSTECT | |
| subroutine | dstt21 (n, kband, ad, ae, sd, se, u, ldu, work, result) |
| DSTT21 | |
| subroutine | dstt22 (n, m, kband, ad, ae, sd, se, u, ldu, work, ldwork, result) |
| DSTT22 | |
| subroutine | dsvdch (n, s, e, svd, tol, info) |
| DSVDCH | |
| subroutine | dsvdct (n, s, e, shift, num) |
| DSVDCT | |
| double precision function | dsxt1 (ijob, d1, n1, d2, n2, abstol, ulp, unfl) |
| DSXT1 | |
| subroutine | dsyt21 (itype, uplo, n, kband, a, lda, d, e, u, ldu, v, ldv, tau, work, result) |
| DSYT21 | |
| subroutine | dsyt22 (itype, uplo, n, m, kband, a, lda, d, e, u, ldu, v, ldv, tau, work, result) |
| DSYT22 | |
| subroutine | sbdt04 (uplo, n, d, e, s, ns, u, ldu, vt, ldvt, work, resid) |
| SBDT04 | |
| subroutine | sbdt05 (m, n, a, lda, s, ns, u, ldu, vt, ldvt, work, resid) |
| SBDT05 | |
| subroutine | sget40 (rmax, lmax, ninfo, knt, nin) |
| SGET40 | |
| subroutine | zbdt05 (m, n, a, lda, s, ns, u, ldu, vt, ldvt, work, resid) |
| ZBDT05 | |
This is the group of double LAPACK TESTING EIG routines.
| subroutine cbdt05 | ( | integer | m, |
| integer | n, | ||
| complex, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| real, dimension( * ) | s, | ||
| integer | ns, | ||
| complex, dimension( * ) | u, | ||
| integer | ldu, | ||
| complex, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| complex, dimension( * ) | work, | ||
| real | resid ) |
CBDT05
!> !> CBDT05 reconstructs a bidiagonal matrix B from its (partial) SVD: !> S = U' * B * V !> where U and V are orthogonal matrices and S is diagonal. !> !> The test ratio to test the singular value decomposition is !> RESID = norm( S - U' * B * V ) / ( n * norm(B) * EPS ) !> where VT = V' and EPS is the machine precision. !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrices A and U. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices A and VT. !> |
| [in] | A | !> A is COMPLEX array, dimension (LDA,N) !> The m by n matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !> |
| [in] | S | !> S is REAL array, dimension (NS) !> The singular values from the (partial) SVD of B, sorted in !> decreasing order. !> |
| [in] | NS | !> NS is INTEGER !> The number of singular values/vectors from the (partial) !> SVD of B. !> |
| [in] | U | !> U is COMPLEX array, dimension (LDU,NS) !> The n by ns orthogonal matrix U in S = U' * B * V. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,N) !> |
| [in] | VT | !> VT is COMPLEX array, dimension (LDVT,N) !> The n by ns orthogonal matrix V in S = U' * B * V. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. !> |
| [out] | WORK | !> WORK is COMPLEX array, dimension (M,N) !> |
| [out] | RESID | !> RESID is REAL !> The test ratio: norm(S - U' * A * V) / ( n * norm(A) * EPS ) !> |
Definition at line 123 of file cbdt05.f.
| subroutine dbdt01 | ( | integer | m, |
| integer | n, | ||
| integer | kd, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldpt, * ) | pt, | ||
| integer | ldpt, | ||
| double precision, dimension( * ) | work, | ||
| double precision | resid ) |
DBDT01
!> !> DBDT01 reconstructs a general matrix A from its bidiagonal form !> A = Q * B * P**T !> where Q (m by min(m,n)) and P**T (min(m,n) by n) are orthogonal !> matrices and B is bidiagonal. !> !> The test ratio to test the reduction is !> RESID = norm(A - Q * B * P**T) / ( n * norm(A) * EPS ) !> where EPS is the machine precision. !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrices A and Q. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices A and P**T. !> |
| [in] | KD | !> KD is INTEGER !> If KD = 0, B is diagonal and the array E is not referenced. !> If KD = 1, the reduction was performed by xGEBRD; B is upper !> bidiagonal if M >= N, and lower bidiagonal if M < N. !> If KD = -1, the reduction was performed by xGBBRD; B is !> always upper bidiagonal. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> The m by n matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !> |
| [in] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ,N) !> The m by min(m,n) orthogonal matrix Q in the reduction !> A = Q * B * P**T. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,M). !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (min(M,N)) !> The diagonal elements of the bidiagonal matrix B. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (min(M,N)-1) !> The superdiagonal elements of the bidiagonal matrix B if !> m >= n, or the subdiagonal elements of B if m < n. !> |
| [in] | PT | !> PT is DOUBLE PRECISION array, dimension (LDPT,N) !> The min(m,n) by n orthogonal matrix P**T in the reduction !> A = Q * B * P**T. !> |
| [in] | LDPT | !> LDPT is INTEGER !> The leading dimension of the array PT. !> LDPT >= max(1,min(M,N)). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (M+N) !> |
| [out] | RESID | !> RESID is DOUBLE PRECISION !> The test ratio: !> norm(A - Q * B * P**T) / ( n * norm(A) * EPS ) !> |
Definition at line 139 of file dbdt01.f.
| subroutine dbdt02 | ( | integer | m, |
| integer | n, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision, dimension( ldc, * ) | c, | ||
| integer | ldc, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( * ) | work, | ||
| double precision | resid ) |
DBDT02
!> !> DBDT02 tests the change of basis C = U**H * B by computing the !> residual !> !> RESID = norm(B - U * C) / ( max(m,n) * norm(B) * EPS ), !> !> where B and C are M by N matrices, U is an M by M orthogonal matrix, !> and EPS is the machine precision. !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrices B and C and the order of !> the matrix Q. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices B and C. !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB,N) !> The m by n matrix B. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the array B. LDB >= max(1,M). !> |
| [in] | C | !> C is DOUBLE PRECISION array, dimension (LDC,N) !> The m by n matrix C, assumed to contain U**H * B. !> |
| [in] | LDC | !> LDC is INTEGER !> The leading dimension of the array C. LDC >= max(1,M). !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU,M) !> The m by m orthogonal matrix U. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,M). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (M) !> |
| [out] | RESID | !> RESID is DOUBLE PRECISION !> RESID = norm(B - U * C) / ( max(m,n) * norm(B) * EPS ), !> |
Definition at line 111 of file dbdt02.f.
| subroutine dbdt03 | ( | character | uplo, |
| integer | n, | ||
| integer | kd, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( * ) | s, | ||
| double precision, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| double precision, dimension( * ) | work, | ||
| double precision | resid ) |
DBDT03
!> !> DBDT03 reconstructs a bidiagonal matrix B from its SVD: !> S = U' * B * V !> where U and V are orthogonal matrices and S is diagonal. !> !> The test ratio to test the singular value decomposition is !> RESID = norm( B - U * S * VT ) / ( n * norm(B) * EPS ) !> where VT = V' and EPS is the machine precision. !>
| [in] | UPLO | !> UPLO is CHARACTER*1 !> Specifies whether the matrix B is upper or lower bidiagonal. !> = 'U': Upper bidiagonal !> = 'L': Lower bidiagonal !> |
| [in] | N | !> N is INTEGER !> The order of the matrix B. !> |
| [in] | KD | !> KD is INTEGER !> The bandwidth of the bidiagonal matrix B. If KD = 1, the !> matrix B is bidiagonal, and if KD = 0, B is diagonal and E is !> not referenced. If KD is greater than 1, it is assumed to be !> 1, and if KD is less than 0, it is assumed to be 0. !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (N) !> The n diagonal elements of the bidiagonal matrix B. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> The (n-1) superdiagonal elements of the bidiagonal matrix B !> if UPLO = 'U', or the (n-1) subdiagonal elements of B if !> UPLO = 'L'. !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU,N) !> The n by n orthogonal matrix U in the reduction B = U'*A*P. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,N) !> |
| [in] | S | !> S is DOUBLE PRECISION array, dimension (N) !> The singular values from the SVD of B, sorted in decreasing !> order. !> |
| [in] | VT | !> VT is DOUBLE PRECISION array, dimension (LDVT,N) !> The n by n orthogonal matrix V' in the reduction !> B = U * S * V'. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (2*N) !> |
| [out] | RESID | !> RESID is DOUBLE PRECISION !> The test ratio: norm(B - U * S * V') / ( n * norm(A) * EPS ) !> |
Definition at line 133 of file dbdt03.f.
| subroutine dbdt04 | ( | character | uplo, |
| integer | n, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( * ) | s, | ||
| integer | ns, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| double precision, dimension( * ) | work, | ||
| double precision | resid ) |
DBDT04
!> !> DBDT04 reconstructs a bidiagonal matrix B from its (partial) SVD: !> S = U' * B * V !> where U and V are orthogonal matrices and S is diagonal. !> !> The test ratio to test the singular value decomposition is !> RESID = norm( S - U' * B * V ) / ( n * norm(B) * EPS ) !> where VT = V' and EPS is the machine precision. !>
| [in] | UPLO | !> UPLO is CHARACTER*1 !> Specifies whether the matrix B is upper or lower bidiagonal. !> = 'U': Upper bidiagonal !> = 'L': Lower bidiagonal !> |
| [in] | N | !> N is INTEGER !> The order of the matrix B. !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (N) !> The n diagonal elements of the bidiagonal matrix B. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> The (n-1) superdiagonal elements of the bidiagonal matrix B !> if UPLO = 'U', or the (n-1) subdiagonal elements of B if !> UPLO = 'L'. !> |
| [in] | S | !> S is DOUBLE PRECISION array, dimension (NS) !> The singular values from the (partial) SVD of B, sorted in !> decreasing order. !> |
| [in] | NS | !> NS is INTEGER !> The number of singular values/vectors from the (partial) !> SVD of B. !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU,NS) !> The n by ns orthogonal matrix U in S = U' * B * V. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,N) !> |
| [in] | VT | !> VT is DOUBLE PRECISION array, dimension (LDVT,N) !> The n by ns orthogonal matrix V in S = U' * B * V. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (2*N) !> |
| [out] | RESID | !> RESID is DOUBLE PRECISION !> The test ratio: norm(S - U' * B * V) / ( n * norm(B) * EPS ) !> |
Definition at line 129 of file dbdt04.f.
| subroutine dbdt05 | ( | integer | m, |
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | s, | ||
| integer | ns, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| double precision, dimension( * ) | work, | ||
| double precision | resid ) |
DBDT05
!> !> DBDT05 reconstructs a bidiagonal matrix B from its (partial) SVD: !> S = U' * B * V !> where U and V are orthogonal matrices and S is diagonal. !> !> The test ratio to test the singular value decomposition is !> RESID = norm( S - U' * B * V ) / ( n * norm(B) * EPS ) !> where VT = V' and EPS is the machine precision. !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrices A and U. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices A and VT. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> The m by n matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !> |
| [in] | S | !> S is DOUBLE PRECISION array, dimension (NS) !> The singular values from the (partial) SVD of B, sorted in !> decreasing order. !> |
| [in] | NS | !> NS is INTEGER !> The number of singular values/vectors from the (partial) !> SVD of B. !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU,NS) !> The n by ns orthogonal matrix U in S = U' * B * V. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,N) !> |
| [in] | VT | !> VT is DOUBLE PRECISION array, dimension (LDVT,N) !> The n by ns orthogonal matrix V in S = U' * B * V. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (M,N) !> |
| [out] | RESID | !> RESID is DOUBLE PRECISION !> The test ratio: norm(S - U' * A * V) / ( n * norm(A) * EPS ) !> |
Definition at line 125 of file dbdt05.f.
| subroutine dchkbb | ( | integer | nsizes, |
| integer, dimension( * ) | mval, | ||
| integer, dimension( * ) | nval, | ||
| integer | nwdths, | ||
| integer, dimension( * ) | kk, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer | nrhs, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldab, * ) | ab, | ||
| integer | ldab, | ||
| double precision, dimension( * ) | bd, | ||
| double precision, dimension( * ) | be, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( ldp, * ) | p, | ||
| integer | ldp, | ||
| double precision, dimension( ldc, * ) | c, | ||
| integer | ldc, | ||
| double precision, dimension( ldc, * ) | cc, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DCHKBB
!> !> DCHKBB tests the reduction of a general real rectangular band !> matrix to bidiagonal form. !> !> DGBBRD factors a general band matrix A as Q B P* , where * means !> transpose, B is upper bidiagonal, and Q and P are orthogonal; !> DGBBRD can also overwrite a given matrix C with Q* C . !> !> For each pair of matrix dimensions (M,N) and each selected matrix !> type, an M by N matrix A and an M by NRHS matrix C are generated. !> The problem dimensions are as follows !> A: M x N !> Q: M x M !> P: N x N !> B: min(M,N) x min(M,N) !> C: M x NRHS !> !> For each generated matrix, 4 tests are performed: !> !> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P' !> !> (2) | I - Q' Q | / ( M ulp ) !> !> (3) | I - PT PT' | / ( N ulp ) !> !> (4) | Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C. !> !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> The possible matrix types are !> !> (1) The zero matrix. !> (2) The identity matrix. !> !> (3) A diagonal matrix with evenly spaced entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (4) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (5) A diagonal matrix with entries 1, ULP, ..., ULP !> and random signs. !> !> (6) Same as (3), but multiplied by SQRT( overflow threshold ) !> (7) Same as (3), but multiplied by SQRT( underflow threshold ) !> !> (8) A matrix of the form U D V, where U and V are orthogonal and !> D has evenly spaced entries 1, ..., ULP with random signs !> on the diagonal. !> !> (9) A matrix of the form U D V, where U and V are orthogonal and !> D has geometrically spaced entries 1, ..., ULP with random !> signs on the diagonal. !> !> (10) A matrix of the form U D V, where U and V are orthogonal and !> D has 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) Rectangular 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 ) !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of values of M and N contained in the vectors !> MVAL and NVAL. The matrix sizes are used in pairs (M,N). !> If NSIZES is zero, DCHKBB does nothing. NSIZES must be at !> least zero. !> |
| [in] | MVAL | !> MVAL is INTEGER array, dimension (NSIZES) !> The values of the matrix row dimension M. !> |
| [in] | NVAL | !> NVAL is INTEGER array, dimension (NSIZES) !> The values of the matrix column dimension N. !> |
| [in] | NWDTHS | !> NWDTHS is INTEGER !> The number of bandwidths to use. If it is zero, !> DCHKBB does nothing. It must be at least zero. !> |
| [in] | KK | !> KK is INTEGER array, dimension (NWDTHS) !> An array containing the bandwidths to be used for the band !> matrices. The values must be at least zero. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DCHKBB !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in] | NRHS | !> NRHS is INTEGER !> The number of columns in the matrix C. !> If NRHS = 0, then the operations on the right-hand side will !> not be tested. NRHS must be at least 0. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DCHKBB to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, dimension !> (LDA, max(NN)) !> Used to hold the matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at least 1 !> and at least max( NN ). !> |
| [out] | AB | !> AB is DOUBLE PRECISION array, dimension (LDAB, max(NN)) !> Used to hold A in band storage format. !> |
| [in] | LDAB | !> LDAB is INTEGER !> The leading dimension of AB. It must be at least 2 (not 1!) !> and at least max( KK )+1. !> |
| [out] | BD | !> BD is DOUBLE PRECISION array, dimension (max(NN)) !> Used to hold the diagonal of the bidiagonal matrix computed !> by DGBBRD. !> |
| [out] | BE | !> BE is DOUBLE PRECISION array, dimension (max(NN)) !> Used to hold the off-diagonal of the bidiagonal matrix !> computed by DGBBRD. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ, max(NN)) !> Used to hold the orthogonal matrix Q computed by DGBBRD. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of Q. It must be at least 1 !> and at least max( NN ). !> |
| [out] | P | !> P is DOUBLE PRECISION array, dimension (LDP, max(NN)) !> Used to hold the orthogonal matrix P computed by DGBBRD. !> |
| [in] | LDP | !> LDP is INTEGER !> The leading dimension of P. It must be at least 1 !> and at least max( NN ). !> |
| [out] | C | !> C is DOUBLE PRECISION array, dimension (LDC, max(NN)) !> Used to hold the matrix C updated by DGBBRD. !> |
| [in] | LDC | !> LDC is INTEGER !> The leading dimension of U. It must be at least 1 !> and at least max( NN ). !> |
| [out] | CC | !> CC is DOUBLE PRECISION array, dimension (LDC, max(NN)) !> Used to hold a copy of the matrix C. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. This must be at least !> max( LDA+1, max(NN)+1 )*max(NN). !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (4) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid !> overflow. !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then everything ran OK. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NTEST The number of tests performed, or which can !> be performed so far, for the current matrix. !> NTESTT The total number of tests performed so far. !> NMAX Largest value in NN. !> NMATS The number of matrices generated so far. !> NERRS The number of tests which have exceeded THRESH !> so far. !> COND, IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTOVFL, RTUNFL Square roots of the previous 2 values. !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> |
Definition at line 351 of file dchkbb.f.
| subroutine dchkbd | ( | integer | nsizes, |
| integer, dimension( * ) | mval, | ||
| integer, dimension( * ) | nval, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer | nrhs, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | bd, | ||
| double precision, dimension( * ) | be, | ||
| double precision, dimension( * ) | s1, | ||
| double precision, dimension( * ) | s2, | ||
| double precision, dimension( ldx, * ) | x, | ||
| integer | ldx, | ||
| double precision, dimension( ldx, * ) | y, | ||
| double precision, dimension( ldx, * ) | z, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( ldpt, * ) | pt, | ||
| integer | ldpt, | ||
| double precision, dimension( ldpt, * ) | u, | ||
| double precision, dimension( ldpt, * ) | vt, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | nout, | ||
| integer | info ) |
DCHKBD
!>
!> DCHKBD checks the singular value decomposition (SVD) routines.
!>
!> DGEBRD reduces a real general m by n matrix A to upper or lower
!> bidiagonal form B by an orthogonal transformation: Q' * A * P = B
!> (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n
!> and lower bidiagonal if m < n.
!>
!> DORGBR generates the orthogonal matrices Q and P' from DGEBRD.
!> Note that Q and P are not necessarily square.
!>
!> DBDSQR computes the singular value decomposition of the bidiagonal
!> matrix B as B = U S V'. It is called three times to compute
!> 1) B = U S1 V', where S1 is the diagonal matrix of singular
!> values and the columns of the matrices U and V are the left
!> and right singular vectors, respectively, of B.
!> 2) Same as 1), but the singular values are stored in S2 and the
!> singular vectors are not computed.
!> 3) A = (UQ) S (P'V'), the SVD of the original matrix A.
!> In addition, DBDSQR has an option to apply the left orthogonal matrix
!> U to a matrix X, useful in least squares applications.
!>
!> DBDSDC computes the singular value decomposition of the bidiagonal
!> matrix B as B = U S V' using divide-and-conquer. It is called twice
!> to compute
!> 1) B = U S1 V', where S1 is the diagonal matrix of singular
!> values and the columns of the matrices U and V are the left
!> and right singular vectors, respectively, of B.
!> 2) Same as 1), but the singular values are stored in S2 and the
!> singular vectors are not computed.
!>
!> DBDSVDX computes the singular value decomposition of the bidiagonal
!> matrix B as B = U S V' using bisection and inverse iteration. It is
!> called six times to compute
!> 1) B = U S1 V', RANGE='A', where S1 is the diagonal matrix of singular
!> values and the columns of the matrices U and V are the left
!> and right singular vectors, respectively, of B.
!> 2) Same as 1), but the singular values are stored in S2 and the
!> singular vectors are not computed.
!> 3) B = U S1 V', RANGE='I', with where S1 is the diagonal matrix of singular
!> values and the columns of the matrices U and V are the left
!> and right singular vectors, respectively, of B
!> 4) Same as 3), but the singular values are stored in S2 and the
!> singular vectors are not computed.
!> 5) B = U S1 V', RANGE='V', with where S1 is the diagonal matrix of singular
!> values and the columns of the matrices U and V are the left
!> and right singular vectors, respectively, of B
!> 6) Same as 5), but the singular values are stored in S2 and the
!> singular vectors are not computed.
!>
!> For each pair of matrix dimensions (M,N) and each selected matrix
!> type, an M by N matrix A and an M by NRHS matrix X are generated.
!> The problem dimensions are as follows
!> A: M x N
!> Q: M x min(M,N) (but M x M if NRHS > 0)
!> P: min(M,N) x N
!> B: min(M,N) x min(M,N)
!> U, V: min(M,N) x min(M,N)
!> S1, S2 diagonal, order min(M,N)
!> X: M x NRHS
!>
!> For each generated matrix, 14 tests are performed:
!>
!> Test DGEBRD and DORGBR
!>
!> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
!>
!> (2) | I - Q' Q | / ( M ulp )
!>
!> (3) | I - PT PT' | / ( N ulp )
!>
!> Test DBDSQR on bidiagonal matrix B
!>
!> (4) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
!>
!> (5) | Y - U Z | / ( |Y| max(min(M,N),k) ulp ), where Y = Q' X
!> and Z = U' Y.
!> (6) | I - U' U | / ( min(M,N) ulp )
!>
!> (7) | I - VT VT' | / ( min(M,N) ulp )
!>
!> (8) S1 contains min(M,N) nonnegative values in decreasing order.
!> (Return 0 if true, 1/ULP if false.)
!>
!> (9) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
!> computing U and V.
!>
!> (10) 0 if the true singular values of B are within THRESH of
!> those in S1. 2*THRESH if they are not. (Tested using
!> DSVDCH)
!>
!> Test DBDSQR on matrix A
!>
!> (11) | A - (QU) S (VT PT) | / ( |A| max(M,N) ulp )
!>
!> (12) | X - (QU) Z | / ( |X| max(M,k) ulp )
!>
!> (13) | I - (QU)'(QU) | / ( M ulp )
!>
!> (14) | I - (VT PT) (PT'VT') | / ( N ulp )
!>
!> Test DBDSDC on bidiagonal matrix B
!>
!> (15) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
!>
!> (16) | I - U' U | / ( min(M,N) ulp )
!>
!> (17) | I - VT VT' | / ( min(M,N) ulp )
!>
!> (18) S1 contains min(M,N) nonnegative values in decreasing order.
!> (Return 0 if true, 1/ULP if false.)
!>
!> (19) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
!> computing U and V.
!> Test DBDSVDX on bidiagonal matrix B
!>
!> (20) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
!>
!> (21) | I - U' U | / ( min(M,N) ulp )
!>
!> (22) | I - VT VT' | / ( min(M,N) ulp )
!>
!> (23) S1 contains min(M,N) nonnegative values in decreasing order.
!> (Return 0 if true, 1/ULP if false.)
!>
!> (24) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
!> computing U and V.
!>
!> (25) | S1 - U' B VT' | / ( |S| n ulp ) DBDSVDX('V', 'I')
!>
!> (26) | I - U' U | / ( min(M,N) ulp )
!>
!> (27) | I - VT VT' | / ( min(M,N) ulp )
!>
!> (28) S1 contains min(M,N) nonnegative values in decreasing order.
!> (Return 0 if true, 1/ULP if false.)
!>
!> (29) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
!> computing U and V.
!>
!> (30) | S1 - U' B VT' | / ( |S1| n ulp ) DBDSVDX('V', 'V')
!>
!> (31) | I - U' U | / ( min(M,N) ulp )
!>
!> (32) | I - VT VT' | / ( min(M,N) ulp )
!>
!> (33) S1 contains min(M,N) nonnegative values in decreasing order.
!> (Return 0 if true, 1/ULP if false.)
!>
!> (34) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
!> computing U and V.
!>
!> The possible matrix types are
!>
!> (1) The zero matrix.
!> (2) The identity matrix.
!>
!> (3) A diagonal matrix with evenly spaced entries
!> 1, ..., ULP and random signs.
!> (ULP = (first number larger than 1) - 1 )
!> (4) A diagonal matrix with geometrically spaced entries
!> 1, ..., ULP and random signs.
!> (5) A diagonal matrix with entries 1, ULP, ..., ULP
!> and random signs.
!>
!> (6) Same as (3), but multiplied by SQRT( overflow threshold )
!> (7) Same as (3), but multiplied by SQRT( underflow threshold )
!>
!> (8) A matrix of the form U D V, where U and V are orthogonal and
!> D has evenly spaced entries 1, ..., ULP with random signs
!> on the diagonal.
!>
!> (9) A matrix of the form U D V, where U and V are orthogonal and
!> D has geometrically spaced entries 1, ..., ULP with random
!> signs on the diagonal.
!>
!> (10) A matrix of the form U D V, where U and V are orthogonal and
!> D has 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) Rectangular 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 )
!>
!> Special case:
!> (16) A bidiagonal matrix with random entries chosen from a
!> logarithmic distribution on [ulp^2,ulp^(-2)] (I.e., each
!> entry is e^x, where x is chosen uniformly on
!> [ 2 log(ulp), -2 log(ulp) ] .) For *this* type:
!> (a) DGEBRD is not called to reduce it to bidiagonal form.
!> (b) the bidiagonal is min(M,N) x min(M,N); if M<N, the
!> matrix will be lower bidiagonal, otherwise upper.
!> (c) only tests 5--8 and 14 are performed.
!>
!> A subset of the full set of matrix types may be selected through
!> the logical array DOTYPE.
!> | [in] | NSIZES | !> NSIZES is INTEGER !> The number of values of M and N contained in the vectors !> MVAL and NVAL. The matrix sizes are used in pairs (M,N). !> |
| [in] | MVAL | !> MVAL is INTEGER array, dimension (NM) !> The values of the matrix row dimension M. !> |
| [in] | NVAL | !> NVAL is INTEGER array, dimension (NM) !> The values of the matrix column dimension N. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DCHKBD !> 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 matrices are in A and B. !> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, dimension (NTYPES) !> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix !> 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+1) through !> DOTYPE(NTYPES) will be ignored. !> |
| [in] | NRHS | !> NRHS is INTEGER !> The number of columns in the matrices X, Y, !> and Z, used in testing DBDSQR. If NRHS = 0, then the !> operations on the right-hand side will not be tested. !> NRHS must be at least 0. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) must !> be odd. The values of ISEED are changed on exit, and can be !> used in the next call to DCHKBD to continue the same random !> number sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> The threshold value for the test ratios. A result is !> included in the output file if RESULT >= THRESH. To have !> every test ratio printed, use THRESH = 0. Note that the !> expected value of the test ratios is O(1), so THRESH should !> be a reasonably small multiple of 1, e.g., 10 or 100. !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (LDA,NMAX) !> where NMAX is the maximum value of N in NVAL. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,MMAX), !> where MMAX is the maximum value of M in MVAL. !> |
| [out] | BD | !> BD is DOUBLE PRECISION array, dimension !> (max(min(MVAL(j),NVAL(j)))) !> |
| [out] | BE | !> BE is DOUBLE PRECISION array, dimension !> (max(min(MVAL(j),NVAL(j)))) !> |
| [out] | S1 | !> S1 is DOUBLE PRECISION array, dimension !> (max(min(MVAL(j),NVAL(j)))) !> |
| [out] | S2 | !> S2 is DOUBLE PRECISION array, dimension !> (max(min(MVAL(j),NVAL(j)))) !> |
| [out] | X | !> X is DOUBLE PRECISION array, dimension (LDX,NRHS) !> |
| [in] | LDX | !> LDX is INTEGER !> The leading dimension of the arrays X, Y, and Z. !> LDX >= max(1,MMAX) !> |
| [out] | Y | !> Y is DOUBLE PRECISION array, dimension (LDX,NRHS) !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension (LDX,NRHS) !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ,MMAX) !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,MMAX). !> |
| [out] | PT | !> PT is DOUBLE PRECISION array, dimension (LDPT,NMAX) !> |
| [in] | LDPT | !> LDPT is INTEGER !> The leading dimension of the arrays PT, U, and V. !> LDPT >= max(1, max(min(MVAL(j),NVAL(j)))). !> |
| [out] | U | !> U is DOUBLE PRECISION array, dimension !> (LDPT,max(min(MVAL(j),NVAL(j)))) !> |
| [out] | VT | !> VT is DOUBLE PRECISION array, dimension !> (LDPT,max(min(MVAL(j),NVAL(j)))) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. This must be at least !> 3(M+N) and M(M + max(M,N,k) + 1) + N*min(M,N) for all !> pairs (M,N)=(MM(j),NN(j)) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension at least 8*min(M,N) !> |
| [in] | NOUT | !> NOUT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then everything ran OK. !> -1: NSIZES < 0 !> -2: Some MM(j) < 0 !> -3: Some NN(j) < 0 !> -4: NTYPES < 0 !> -6: NRHS < 0 !> -8: THRESH < 0 !> -11: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ). !> -17: LDB < 1 or LDB < MMAX. !> -21: LDQ < 1 or LDQ < MMAX. !> -23: LDPT< 1 or LDPT< MNMAX. !> -27: LWORK too small. !> If DLATMR, SLATMS, DGEBRD, DORGBR, or DBDSQR, !> returns an error code, the !> absolute value of it is returned. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NTEST The number of tests performed, or which can !> be performed so far, for the current matrix. !> MMAX Largest value in NN. !> NMAX Largest value in NN. !> MNMIN min(MM(j), NN(j)) (the dimension of the bidiagonal !> matrix.) !> MNMAX The maximum value of MNMIN for j=1,...,NSIZES. !> NFAIL The number of tests which have exceeded THRESH !> COND, IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> RTOVFL, RTUNFL Square roots of the previous 2 values. !> ULP, ULPINV Finest relative precision and its inverse. !> !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> |
Definition at line 489 of file dchkbd.f.
| subroutine dchkbk | ( | integer | nin, |
| integer | nout ) |
DCHKBK
!> !> DCHKBK tests DGEBAK, a routine for backward transformation of !> the computed right or left eigenvectors if the original matrix !> was preprocessed by balance subroutine DGEBAL. !>
| [in] | NIN | !> NIN is INTEGER !> The logical unit number for input. NIN > 0. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The logical unit number for output. NOUT > 0. !> |
Definition at line 54 of file dchkbk.f.
| subroutine dchkbl | ( | integer | nin, |
| integer | nout ) |
DCHKBL
!> !> DCHKBL tests DGEBAL, a routine for balancing a general real !> matrix and isolating some of its eigenvalues. !>
| [in] | NIN | !> NIN is INTEGER !> The logical unit number for input. NIN > 0. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The logical unit number for output. NOUT > 0. !> |
Definition at line 53 of file dchkbl.f.
| subroutine dchkec | ( | double precision | thresh, |
| logical | tsterr, | ||
| integer | nin, | ||
| integer | nout ) |
DCHKEC
!> !> DCHKEC tests eigen- condition estimation routines !> DLALN2, DLASY2, DLANV2, DLAQTR, DLAEXC, !> DTRSYL, DTREXC, DTRSNA, DTRSEN, DTGEXC !> !> In all cases, the routine runs through a fixed set of numerical !> examples, subjects them to various tests, and compares the test !> results to a threshold THRESH. In addition, DTREXC, DTRSNA and DTRSEN !> are tested by reading in precomputed examples from a file (on input !> unit NIN). Output is written to output unit NOUT. !>
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> Threshold for residual tests. A computed test ratio passes !> the threshold if it is less than THRESH. !> |
| [in] | TSTERR | !> TSTERR is LOGICAL !> Flag that indicates whether error exits are to be tested. !> |
| [in] | NIN | !> NIN is INTEGER !> The logical unit number for input. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The logical unit number for output. !> |
Definition at line 75 of file dchkec.f.
| program dchkee |
DCHKEE
!> !> DCHKEE tests the DOUBLE PRECISION LAPACK subroutines for the matrix !> eigenvalue problem. The test paths in this version are !> !> NEP (Nonsymmetric Eigenvalue Problem): !> Test DGEHRD, DORGHR, DHSEQR, DTREVC, DHSEIN, and DORMHR !> !> SEP (Symmetric Eigenvalue Problem): !> Test DSYTRD, DORGTR, DSTEQR, DSTERF, DSTEIN, DSTEDC, !> and drivers DSYEV(X), DSBEV(X), DSPEV(X), DSTEV(X), !> DSYEVD, DSBEVD, DSPEVD, DSTEVD !> !> SVD (Singular Value Decomposition): !> Test DGEBRD, DORGBR, DBDSQR, DBDSDC !> and the drivers DGESVD, DGESDD !> !> DEV (Nonsymmetric Eigenvalue/eigenvector Driver): !> Test DGEEV !> !> DES (Nonsymmetric Schur form Driver): !> Test DGEES !> !> DVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver): !> Test DGEEVX !> !> DSX (Nonsymmetric Schur form Expert Driver): !> Test DGEESX !> !> DGG (Generalized Nonsymmetric Eigenvalue Problem): !> Test DGGHD3, DGGBAL, DGGBAK, DHGEQZ, and DTGEVC !> !> DGS (Generalized Nonsymmetric Schur form Driver): !> Test DGGES !> !> DGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver): !> Test DGGEV !> !> DGX (Generalized Nonsymmetric Schur form Expert Driver): !> Test DGGESX !> !> DXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver): !> Test DGGEVX !> !> DSG (Symmetric Generalized Eigenvalue Problem): !> Test DSYGST, DSYGV, DSYGVD, DSYGVX, DSPGST, DSPGV, DSPGVD, !> DSPGVX, DSBGST, DSBGV, DSBGVD, and DSBGVX !> !> DSB (Symmetric Band Eigenvalue Problem): !> Test DSBTRD !> !> DBB (Band Singular Value Decomposition): !> Test DGBBRD !> !> DEC (Eigencondition estimation): !> Test DLALN2, DLASY2, DLAEQU, DLAEXC, DTRSYL, DTREXC, DTRSNA, !> DTRSEN, and DLAQTR !> !> DBL (Balancing a general matrix) !> Test DGEBAL !> !> DBK (Back transformation on a balanced matrix) !> Test DGEBAK !> !> DGL (Balancing a matrix pair) !> Test DGGBAL !> !> DGK (Back transformation on a matrix pair) !> Test DGGBAK !> !> GLM (Generalized Linear Regression Model): !> Tests DGGGLM !> !> GQR (Generalized QR and RQ factorizations): !> Tests DGGQRF and DGGRQF !> !> GSV (Generalized Singular Value Decomposition): !> Tests DGGSVD, DGGSVP, DTGSJA, DLAGS2, DLAPLL, and DLAPMT !> !> CSD (CS decomposition): !> Tests DORCSD !> !> LSE (Constrained Linear Least Squares): !> Tests DGGLSE !> !> Each test path has a different set of inputs, but the data sets for !> the driver routines xEV, xES, xVX, and xSX can be concatenated in a !> single input file. The first line of input should contain one of the !> 3-character path names in columns 1-3. The number of remaining lines !> depends on what is found on the first line. !> !> The number of matrix types used in testing is often controllable from !> the input file. The number of matrix types for each path, and the !> test routine that describes them, is as follows: !> !> Path name(s) Types Test routine !> !> DHS or NEP 21 DCHKHS !> DST or SEP 21 DCHKST (routines) !> 18 DDRVST (drivers) !> DBD or SVD 16 DCHKBD (routines) !> 5 DDRVBD (drivers) !> DEV 21 DDRVEV !> DES 21 DDRVES !> DVX 21 DDRVVX !> DSX 21 DDRVSX !> DGG 26 DCHKGG (routines) !> DGS 26 DDRGES !> DGX 5 DDRGSX !> DGV 26 DDRGEV !> DXV 2 DDRGVX !> DSG 21 DDRVSG !> DSB 15 DCHKSB !> DBB 15 DCHKBB !> DEC - DCHKEC !> DBL - DCHKBL !> DBK - DCHKBK !> DGL - DCHKGL !> DGK - DCHKGK !> GLM 8 DCKGLM !> GQR 8 DCKGQR !> GSV 8 DCKGSV !> CSD 3 DCKCSD !> LSE 8 DCKLSE !> !>----------------------------------------------------------------------- !> !> NEP input file: !> !> line 2: NN, INTEGER !> Number of values of N. !> !> line 3: NVAL, INTEGER array, dimension (NN) !> The values for the matrix dimension N. !> !> line 4: NPARMS, INTEGER !> Number of values of the parameters NB, NBMIN, NX, NS, and !> MAXB. !> !> line 5: NBVAL, INTEGER array, dimension (NPARMS) !> The values for the blocksize NB. !> !> line 6: NBMIN, INTEGER array, dimension (NPARMS) !> The values for the minimum blocksize NBMIN. !> !> line 7: NXVAL, INTEGER array, dimension (NPARMS) !> The values for the crossover point NX. !> !> line 8: INMIN, INTEGER array, dimension (NPARMS) !> LAHQR vs TTQRE crossover point, >= 11 !> !> line 9: INWIN, INTEGER array, dimension (NPARMS) !> recommended deflation window size !> !> line 10: INIBL, INTEGER array, dimension (NPARMS) !> nibble crossover point !> !> line 11: ISHFTS, INTEGER array, dimension (NPARMS) !> number of simultaneous shifts) !> !> line 12: IACC22, INTEGER array, dimension (NPARMS) !> select structured matrix multiply: 0, 1 or 2) !> !> line 13: THRESH !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. To have all of the test !> ratios printed, use THRESH = 0.0 . !> !> line 14: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 14 was 2: !> !> line 15: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow !> the user to specify the matrix types. Each line contains !> a 3-character path name in columns 1-3, and the number !> of matrix types must be the first nonblank item in columns !> 4-80. If the number of matrix types is at least 1 but is !> less than the maximum number of possible types, a second !> line will be read to get the numbers of the matrix types to !> be used. For example, !> NEP 21 !> requests all of the matrix types for the nonsymmetric !> eigenvalue problem, while !> NEP 4 !> 9 10 11 12 !> requests only matrices of type 9, 10, 11, and 12. !> !> The valid 3-character path names are 'NEP' or 'SHS' for the !> nonsymmetric eigenvalue routines. !> !>----------------------------------------------------------------------- !> !> SEP or DSG input file: !> !> line 2: NN, INTEGER !> Number of values of N. !> !> line 3: NVAL, INTEGER array, dimension (NN) !> The values for the matrix dimension N. !> !> line 4: NPARMS, INTEGER !> Number of values of the parameters NB, NBMIN, and NX. !> !> line 5: NBVAL, INTEGER array, dimension (NPARMS) !> The values for the blocksize NB. !> !> line 6: NBMIN, INTEGER array, dimension (NPARMS) !> The values for the minimum blocksize NBMIN. !> !> line 7: NXVAL, INTEGER array, dimension (NPARMS) !> The values for the crossover point NX. !> !> line 8: THRESH !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 9: TSTCHK, LOGICAL !> Flag indicating whether or not to test the LAPACK routines. !> !> line 10: TSTDRV, LOGICAL !> Flag indicating whether or not to test the driver routines. !> !> line 11: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 12: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 12 was 2: !> !> line 13: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 13-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path names are 'SEP' or 'SST' for the !> symmetric eigenvalue routines and driver routines, and !> 'DSG' for the routines for the symmetric generalized !> eigenvalue problem. !> !>----------------------------------------------------------------------- !> !> SVD input file: !> !> line 2: NN, INTEGER !> Number of values of M and N. !> !> line 3: MVAL, INTEGER array, dimension (NN) !> The values for the matrix row dimension M. !> !> line 4: NVAL, INTEGER array, dimension (NN) !> The values for the matrix column dimension N. !> !> line 5: NPARMS, INTEGER !> Number of values of the parameter NB, NBMIN, NX, and NRHS. !> !> line 6: NBVAL, INTEGER array, dimension (NPARMS) !> The values for the blocksize NB. !> !> line 7: NBMIN, INTEGER array, dimension (NPARMS) !> The values for the minimum blocksize NBMIN. !> !> line 8: NXVAL, INTEGER array, dimension (NPARMS) !> The values for the crossover point NX. !> !> line 9: NSVAL, INTEGER array, dimension (NPARMS) !> The values for the number of right hand sides NRHS. !> !> line 10: THRESH !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 11: TSTCHK, LOGICAL !> Flag indicating whether or not to test the LAPACK routines. !> !> line 12: TSTDRV, LOGICAL !> Flag indicating whether or not to test the driver routines. !> !> line 13: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 14: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 14 was 2: !> !> line 15: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 15-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path names are 'SVD' or 'SBD' for both the !> SVD routines and the SVD driver routines. !> !>----------------------------------------------------------------------- !> !> DEV and DES data files: !> !> line 1: 'DEV' or 'DES' in columns 1 to 3. !> !> line 2: NSIZES, INTEGER !> Number of sizes of matrices to use. Should be at least 0 !> and at most 20. If NSIZES = 0, no testing is done !> (although the remaining 3 lines are still read). !> !> line 3: NN, INTEGER array, dimension(NSIZES) !> Dimensions of matrices to be tested. !> !> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs !> These integer parameters determine how blocking is done !> (see ILAENV for details) !> NB : block size !> NBMIN : minimum block size !> NX : minimum dimension for blocking !> NS : number of shifts in xHSEQR !> NBCOL : minimum column dimension for blocking !> !> line 5: THRESH, REAL !> The test threshold against which computed residuals are !> compared. Should generally be in the range from 10. to 20. !> If it is 0., all test case data will be printed. !> !> line 6: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits. !> !> line 7: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 7 was 2: !> !> line 8: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 9 and following: Lines specifying matrix types, as for NEP. !> The 3-character path name is 'DEV' to test SGEEV, or !> 'DES' to test SGEES. !> !>----------------------------------------------------------------------- !> !> The DVX data has two parts. The first part is identical to DEV, !> and the second part consists of test matrices with precomputed !> solutions. !> !> line 1: 'DVX' in columns 1-3. !> !> line 2: NSIZES, INTEGER !> If NSIZES = 0, no testing of randomly generated examples !> is done, but any precomputed examples are tested. !> !> line 3: NN, INTEGER array, dimension(NSIZES) !> !> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs !> !> line 5: THRESH, REAL !> !> line 6: TSTERR, LOGICAL !> !> line 7: NEWSD, INTEGER !> !> If line 7 was 2: !> !> line 8: INTEGER array, dimension (4) !> !> lines 9 and following: The first line contains 'DVX' in columns 1-3 !> followed by the number of matrix types, possibly with !> a second line to specify certain matrix types. !> If the number of matrix types = 0, no testing of randomly !> generated examples is done, but any precomputed examples !> are tested. !> !> remaining lines : Each matrix is stored on 1+2*N lines, where N is !> its dimension. The first line contains the dimension (a !> single integer). The next N lines contain the matrix, one !> row per line. The last N lines correspond to each !> eigenvalue. Each of these last N lines contains 4 real !> values: the real part of the eigenvalue, the imaginary !> part of the eigenvalue, the reciprocal condition number of !> the eigenvalues, and the reciprocal condition number of the !> eigenvector. The end of data is indicated by dimension N=0. !> Even if no data is to be tested, there must be at least one !> line containing N=0. !> !>----------------------------------------------------------------------- !> !> The DSX data is like DVX. The first part is identical to DEV, and the !> second part consists of test matrices with precomputed solutions. !> !> line 1: 'DSX' in columns 1-3. !> !> line 2: NSIZES, INTEGER !> If NSIZES = 0, no testing of randomly generated examples !> is done, but any precomputed examples are tested. !> !> line 3: NN, INTEGER array, dimension(NSIZES) !> !> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs !> !> line 5: THRESH, REAL !> !> line 6: TSTERR, LOGICAL !> !> line 7: NEWSD, INTEGER !> !> If line 7 was 2: !> !> line 8: INTEGER array, dimension (4) !> !> lines 9 and following: The first line contains 'DSX' in columns 1-3 !> followed by the number of matrix types, possibly with !> a second line to specify certain matrix types. !> If the number of matrix types = 0, no testing of randomly !> generated examples is done, but any precomputed examples !> are tested. !> !> remaining lines : Each matrix is stored on 3+N lines, where N is its !> dimension. The first line contains the dimension N and the !> dimension M of an invariant subspace. The second line !> contains M integers, identifying the eigenvalues in the !> invariant subspace (by their position in a list of !> eigenvalues ordered by increasing real part). The next N !> lines contain the matrix. The last line contains the !> reciprocal condition number for the average of the selected !> eigenvalues, and the reciprocal condition number for the !> corresponding right invariant subspace. The end of data is !> indicated by a line containing N=0 and M=0. Even if no data !> is to be tested, there must be at least one line containing !> N=0 and M=0. !> !>----------------------------------------------------------------------- !> !> DGG input file: !> !> line 2: NN, INTEGER !> Number of values of N. !> !> line 3: NVAL, INTEGER array, dimension (NN) !> The values for the matrix dimension N. !> !> line 4: NPARMS, INTEGER !> Number of values of the parameters NB, NBMIN, NS, MAXB, and !> NBCOL. !> !> line 5: NBVAL, INTEGER array, dimension (NPARMS) !> The values for the blocksize NB. !> !> line 6: NBMIN, INTEGER array, dimension (NPARMS) !> The values for NBMIN, the minimum row dimension for blocks. !> !> line 7: NSVAL, INTEGER array, dimension (NPARMS) !> The values for the number of shifts. !> !> line 8: MXBVAL, INTEGER array, dimension (NPARMS) !> The values for MAXB, used in determining minimum blocksize. !> !> line 9: IACC22, INTEGER array, dimension (NPARMS) !> select structured matrix multiply: 1 or 2) !> !> line 10: NBCOL, INTEGER array, dimension (NPARMS) !> The values for NBCOL, the minimum column dimension for !> blocks. !> !> line 11: THRESH !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 12: TSTCHK, LOGICAL !> Flag indicating whether or not to test the LAPACK routines. !> !> line 13: TSTDRV, LOGICAL !> Flag indicating whether or not to test the driver routines. !> !> line 14: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 15: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 15 was 2: !> !> line 16: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 17-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path name is 'DGG' for the generalized !> eigenvalue problem routines and driver routines. !> !>----------------------------------------------------------------------- !> !> DGS and DGV input files: !> !> line 1: 'DGS' or 'DGV' in columns 1 to 3. !> !> line 2: NN, INTEGER !> Number of values of N. !> !> line 3: NVAL, INTEGER array, dimension(NN) !> Dimensions of matrices to be tested. !> !> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs !> These integer parameters determine how blocking is done !> (see ILAENV for details) !> NB : block size !> NBMIN : minimum block size !> NX : minimum dimension for blocking !> NS : number of shifts in xHGEQR !> NBCOL : minimum column dimension for blocking !> !> line 5: THRESH, REAL !> The test threshold against which computed residuals are !> compared. Should generally be in the range from 10. to 20. !> If it is 0., all test case data will be printed. !> !> line 6: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits. !> !> line 7: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 17 was 2: !> !> line 7: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 7-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path name is 'DGS' for the generalized !> eigenvalue problem routines and driver routines. !> !>----------------------------------------------------------------------- !> !> DXV input files: !> !> line 1: 'DXV' in columns 1 to 3. !> !> line 2: N, INTEGER !> Value of N. !> !> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs !> These integer parameters determine how blocking is done !> (see ILAENV for details) !> NB : block size !> NBMIN : minimum block size !> NX : minimum dimension for blocking !> NS : number of shifts in xHGEQR !> NBCOL : minimum column dimension for blocking !> !> line 4: THRESH, REAL !> The test threshold against which computed residuals are !> compared. Should generally be in the range from 10. to 20. !> Information will be printed about each test for which the !> test ratio is greater than or equal to the threshold. !> !> line 5: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 6: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 6 was 2: !> !> line 7: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> If line 2 was 0: !> !> line 7-EOF: Precomputed examples are tested. !> !> remaining lines : Each example is stored on 3+2*N lines, where N is !> its dimension. The first line contains the dimension (a !> single integer). The next N lines contain the matrix A, one !> row per line. The next N lines contain the matrix B. The !> next line contains the reciprocals of the eigenvalue !> condition numbers. The last line contains the reciprocals of !> the eigenvector condition numbers. The end of data is !> indicated by dimension N=0. Even if no data is to be tested, !> there must be at least one line containing N=0. !> !>----------------------------------------------------------------------- !> !> DGX input files: !> !> line 1: 'DGX' in columns 1 to 3. !> !> line 2: N, INTEGER !> Value of N. !> !> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs !> These integer parameters determine how blocking is done !> (see ILAENV for details) !> NB : block size !> NBMIN : minimum block size !> NX : minimum dimension for blocking !> NS : number of shifts in xHGEQR !> NBCOL : minimum column dimension for blocking !> !> line 4: THRESH, REAL !> The test threshold against which computed residuals are !> compared. Should generally be in the range from 10. to 20. !> Information will be printed about each test for which the !> test ratio is greater than or equal to the threshold. !> !> line 5: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 6: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 6 was 2: !> !> line 7: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> If line 2 was 0: !> !> line 7-EOF: Precomputed examples are tested. !> !> remaining lines : Each example is stored on 3+2*N lines, where N is !> its dimension. The first line contains the dimension (a !> single integer). The next line contains an integer k such !> that only the last k eigenvalues will be selected and appear !> in the leading diagonal blocks of $A$ and $B$. The next N !> lines contain the matrix A, one row per line. The next N !> lines contain the matrix B. The last line contains the !> reciprocal of the eigenvalue cluster condition number and the !> reciprocal of the deflating subspace (associated with the !> selected eigencluster) condition number. The end of data is !> indicated by dimension N=0. Even if no data is to be tested, !> there must be at least one line containing N=0. !> !>----------------------------------------------------------------------- !> !> DSB input file: !> !> line 2: NN, INTEGER !> Number of values of N. !> !> line 3: NVAL, INTEGER array, dimension (NN) !> The values for the matrix dimension N. !> !> line 4: NK, INTEGER !> Number of values of K. !> !> line 5: KVAL, INTEGER array, dimension (NK) !> The values for the matrix dimension K. !> !> line 6: THRESH !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 7: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 7 was 2: !> !> line 8: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 8-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path name is 'DSB'. !> !>----------------------------------------------------------------------- !> !> DBB input file: !> !> line 2: NN, INTEGER !> Number of values of M and N. !> !> line 3: MVAL, INTEGER array, dimension (NN) !> The values for the matrix row dimension M. !> !> line 4: NVAL, INTEGER array, dimension (NN) !> The values for the matrix column dimension N. !> !> line 4: NK, INTEGER !> Number of values of K. !> !> line 5: KVAL, INTEGER array, dimension (NK) !> The values for the matrix bandwidth K. !> !> line 6: NPARMS, INTEGER !> Number of values of the parameter NRHS !> !> line 7: NSVAL, INTEGER array, dimension (NPARMS) !> The values for the number of right hand sides NRHS. !> !> line 8: THRESH !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 9: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 9 was 2: !> !> line 10: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 10-EOF: Lines specifying matrix types, as for SVD. !> The 3-character path name is 'DBB'. !> !>----------------------------------------------------------------------- !> !> DEC input file: !> !> line 2: THRESH, REAL !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> lines 3-EOF: !> !> Input for testing the eigencondition routines consists of a set of !> specially constructed test cases and their solutions. The data !> format is not intended to be modified by the user. !> !>----------------------------------------------------------------------- !> !> DBL and DBK input files: !> !> line 1: 'DBL' in columns 1-3 to test SGEBAL, or 'DBK' in !> columns 1-3 to test SGEBAK. !> !> The remaining lines consist of specially constructed test cases. !> !>----------------------------------------------------------------------- !> !> DGL and DGK input files: !> !> line 1: 'DGL' in columns 1-3 to test DGGBAL, or 'DGK' in !> columns 1-3 to test DGGBAK. !> !> The remaining lines consist of specially constructed test cases. !> !>----------------------------------------------------------------------- !> !> GLM data file: !> !> line 1: 'GLM' in columns 1 to 3. !> !> line 2: NN, INTEGER !> Number of values of M, P, and N. !> !> line 3: MVAL, INTEGER array, dimension(NN) !> Values of M (row dimension). !> !> line 4: PVAL, INTEGER array, dimension(NN) !> Values of P (row dimension). !> !> line 5: NVAL, INTEGER array, dimension(NN) !> Values of N (column dimension), note M <= N <= M+P. !> !> line 6: THRESH, REAL !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 7: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 8: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 8 was 2: !> !> line 9: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 9-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path name is 'GLM' for the generalized !> linear regression model routines. !> !>----------------------------------------------------------------------- !> !> GQR data file: !> !> line 1: 'GQR' in columns 1 to 3. !> !> line 2: NN, INTEGER !> Number of values of M, P, and N. !> !> line 3: MVAL, INTEGER array, dimension(NN) !> Values of M. !> !> line 4: PVAL, INTEGER array, dimension(NN) !> Values of P. !> !> line 5: NVAL, INTEGER array, dimension(NN) !> Values of N. !> !> line 6: THRESH, REAL !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 7: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 8: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 8 was 2: !> !> line 9: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 9-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path name is 'GQR' for the generalized !> QR and RQ routines. !> !>----------------------------------------------------------------------- !> !> GSV data file: !> !> line 1: 'GSV' in columns 1 to 3. !> !> line 2: NN, INTEGER !> Number of values of M, P, and N. !> !> line 3: MVAL, INTEGER array, dimension(NN) !> Values of M (row dimension). !> !> line 4: PVAL, INTEGER array, dimension(NN) !> Values of P (row dimension). !> !> line 5: NVAL, INTEGER array, dimension(NN) !> Values of N (column dimension). !> !> line 6: THRESH, REAL !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 7: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 8: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 8 was 2: !> !> line 9: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 9-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path name is 'GSV' for the generalized !> SVD routines. !> !>----------------------------------------------------------------------- !> !> CSD data file: !> !> line 1: 'CSD' in columns 1 to 3. !> !> line 2: NM, INTEGER !> Number of values of M, P, and N. !> !> line 3: MVAL, INTEGER array, dimension(NM) !> Values of M (row and column dimension of orthogonal matrix). !> !> line 4: PVAL, INTEGER array, dimension(NM) !> Values of P (row dimension of top-left block). !> !> line 5: NVAL, INTEGER array, dimension(NM) !> Values of N (column dimension of top-left block). !> !> line 6: THRESH, REAL !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 7: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 8: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 8 was 2: !> !> line 9: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 9-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path name is 'CSD' for the CSD routine. !> !>----------------------------------------------------------------------- !> !> LSE data file: !> !> line 1: 'LSE' in columns 1 to 3. !> !> line 2: NN, INTEGER !> Number of values of M, P, and N. !> !> line 3: MVAL, INTEGER array, dimension(NN) !> Values of M. !> !> line 4: PVAL, INTEGER array, dimension(NN) !> Values of P. !> !> line 5: NVAL, INTEGER array, dimension(NN) !> Values of N, note P <= N <= P+M. !> !> line 6: THRESH, REAL !> Threshold value for the test ratios. Information will be !> printed about each test for which the test ratio is greater !> than or equal to the threshold. !> !> line 7: TSTERR, LOGICAL !> Flag indicating whether or not to test the error exits for !> the LAPACK routines and driver routines. !> !> line 8: NEWSD, INTEGER !> A code indicating how to set the random number seed. !> = 0: Set the seed to a default value before each run !> = 1: Initialize the seed to a default value only before the !> first run !> = 2: Like 1, but use the seed values on the next line !> !> If line 8 was 2: !> !> line 9: INTEGER array, dimension (4) !> Four integer values for the random number seed. !> !> lines 9-EOF: Lines specifying matrix types, as for NEP. !> The 3-character path name is 'GSV' for the generalized !> SVD routines. !> !>----------------------------------------------------------------------- !> !> NMAX is currently set to 132 and must be at least 12 for some of the !> precomputed examples, and LWORK = NMAX*(5*NMAX+5)+1 in the parameter !> statements below. For SVD, we assume NRHS may be as big as N. The !> parameter NEED is set to 14 to allow for 14 N-by-N matrices for DGG. !>
| subroutine dchkgg | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| logical | tstdif, | ||
| double precision | thrshn, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | b, | ||
| double precision, dimension( lda, * ) | h, | ||
| double precision, dimension( lda, * ) | t, | ||
| double precision, dimension( lda, * ) | s1, | ||
| double precision, dimension( lda, * ) | s2, | ||
| double precision, dimension( lda, * ) | p1, | ||
| double precision, dimension( lda, * ) | p2, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldu, * ) | v, | ||
| double precision, dimension( ldu, * ) | q, | ||
| double precision, dimension( ldu, * ) | z, | ||
| double precision, dimension( * ) | alphr1, | ||
| double precision, dimension( * ) | alphi1, | ||
| double precision, dimension( * ) | beta1, | ||
| double precision, dimension( * ) | alphr3, | ||
| double precision, dimension( * ) | alphi3, | ||
| double precision, dimension( * ) | beta3, | ||
| double precision, dimension( ldu, * ) | evectl, | ||
| double precision, dimension( ldu, * ) | evectr, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| logical, dimension( * ) | llwork, | ||
| double precision, dimension( 15 ) | result, | ||
| integer | info ) |
DCHKGG
!> !> DCHKGG checks the nonsymmetric generalized eigenvalue problem !> routines. !> T T T !> DGGHRD factors A and B as U H V and U T V , where means !> transpose, H is hessenberg, T is triangular and U and V are !> orthogonal. !> T T !> DHGEQZ factors H and T as Q S Z and Q P Z , where P is upper !> triangular, S is in generalized Schur form (block upper triangular, !> with 1x1 and 2x2 blocks on the diagonal, the 2x2 blocks !> corresponding to complex conjugate pairs of generalized !> eigenvalues), and Q and Z are orthogonal. It also computes the !> generalized eigenvalues (alpha(1),beta(1)),...,(alpha(n),beta(n)), !> where alpha(j)=S(j,j) and beta(j)=P(j,j) -- thus, !> w(j) = alpha(j)/beta(j) is a root of the generalized eigenvalue !> problem !> !> det( A - w(j) B ) = 0 !> !> and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent !> problem !> !> det( m(j) A - B ) = 0 !> !> DTGEVC computes the matrix L of left eigenvectors and the matrix R !> of right eigenvectors for the matrix pair ( S, P ). In the !> description below, l and r are left and right eigenvectors !> corresponding to the generalized eigenvalues (alpha,beta). !> !> When DCHKGG is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, one matrix will be generated and used !> to test the nonsymmetric eigenroutines. For each matrix, 15 !> tests will be performed. The first twelve should be !> small -- O(1). They will be compared with the threshold THRESH: !> !> T !> (1) | A - U H V | / ( |A| n ulp ) !> !> T !> (2) | B - U T V | / ( |B| n ulp ) !> !> T !> (3) | I - UU | / ( n ulp ) !> !> T !> (4) | I - VV | / ( n ulp ) !> !> T !> (5) | H - Q S Z | / ( |H| n ulp ) !> !> T !> (6) | T - Q P Z | / ( |T| n ulp ) !> !> T !> (7) | I - QQ | / ( n ulp ) !> !> T !> (8) | I - ZZ | / ( n ulp ) !> !> (9) max over all left eigenvalue/-vector pairs (beta/alpha,l) of !> !> | l**H * (beta S - alpha P) | / ( ulp max( |beta S|, |alpha P| ) ) !> !> (10) max over all left eigenvalue/-vector pairs (beta/alpha,l') of !> T !> | l'**H * (beta H - alpha T) | / ( ulp max( |beta H|, |alpha T| ) ) !> !> where the eigenvectors l' are the result of passing Q to !> DTGEVC and back transforming (HOWMNY='B'). !> !> (11) max over all right eigenvalue/-vector pairs (beta/alpha,r) of !> !> | (beta S - alpha T) r | / ( ulp max( |beta S|, |alpha T| ) ) !> !> (12) max over all right eigenvalue/-vector pairs (beta/alpha,r') of !> !> | (beta H - alpha T) r' | / ( ulp max( |beta H|, |alpha T| ) ) !> !> where the eigenvectors r' are the result of passing Z to !> DTGEVC and back transforming (HOWMNY='B'). !> !> The last three test ratios will usually be small, but there is no !> mathematical requirement that they be so. They are therefore !> compared with THRESH only if TSTDIF is .TRUE. !> !> (13) | S(Q,Z computed) - S(Q,Z not computed) | / ( |S| ulp ) !> !> (14) | P(Q,Z computed) - P(Q,Z not computed) | / ( |P| ulp ) !> !> (15) max( |alpha(Q,Z computed) - alpha(Q,Z not computed)|/|S| , !> |beta(Q,Z computed) - beta(Q,Z not computed)|/|P| ) / ulp !> !> In addition, the normalization of L and R are checked, and compared !> with the threshold THRSHN. !> !> Test Matrices !> ---- -------- !> !> The sizes of the test matrices are specified by an array !> NN(1:NSIZES); the value of each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); if !> DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) ( 0, 0 ) (a pair of zero matrices) !> !> (2) ( I, 0 ) (an identity and a zero matrix) !> !> (3) ( 0, I ) (an identity and a zero matrix) !> !> (4) ( I, I ) (a pair of identity matrices) !> !> t t !> (5) ( J , J ) (a pair of transposed Jordan blocks) !> !> t ( I 0 ) !> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t ) !> ( 0 I ) ( 0 J ) !> and I is a k x k identity and J a (k+1)x(k+1) !> Jordan block; k=(N-1)/2 !> !> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal !> matrix with those diagonal entries.) !> (8) ( I, D ) !> !> (9) ( big*D, small*I ) where is near overflow and small=1/big !> !> (10) ( small*D, big*I ) !> !> (11) ( big*I, small*D ) !> !> (12) ( small*I, big*D ) !> !> (13) ( big*D, big*I ) !> !> (14) ( small*D, small*I ) !> !> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and !> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 ) !> t t !> (16) U ( J , J ) V where U and V are random orthogonal matrices. !> !> (17) U ( T1, T2 ) V where T1 and T2 are upper triangular matrices !> with random O(1) entries above the diagonal !> and diagonal entries diag(T1) = !> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) = !> ( 0, N-3, N-4,..., 1, 0, 0 ) !> !> (18) U ( T1, T2 ) V diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 ) !> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 ) !> s = machine precision. !> !> (19) U ( T1, T2 ) V diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 ) !> !> N-5 !> (20) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> !> (21) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> where r1,..., r(N-4) are random. !> !> (22) U ( big*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (23) U ( small*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (24) U ( small*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (25) U ( big*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (26) U ( T1, T2 ) V where T1 and T2 are random upper-triangular !> matrices. !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DCHKGG does nothing. It must be at least zero. !> |
| [in] | NN | !> NN is INTEGER array, 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. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DCHKGG !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DCHKGG to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | TSTDIF | !> TSTDIF is LOGICAL !> Specifies whether test ratios 13-15 will be computed and !> compared with THRESH. !> = .FALSE.: Only test ratios 1-12 will be computed and tested. !> Ratios 13-15 will be set to zero. !> = .TRUE.: All the test ratios 1-15 will be computed and !> tested. !> |
| [in] | THRSHN | !> THRSHN is DOUBLE PRECISION !> Threshold for reporting eigenvector normalization error. !> If the normalization of any eigenvector differs from 1 by !> more than THRSHN*ulp, then a special error message will be !> printed. (This is handled separately from the other tests, !> since only a compiler or programming error should cause an !> error message, at least if THRSHN is at least 5--10.) !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, dimension !> (LDA, max(NN)) !> Used to hold the original A matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, B, H, T, S1, P1, S2, and P2. !> It must be at least 1 and at least max( NN ). !> |
| [in,out] | B | !> B is DOUBLE PRECISION array, dimension !> (LDA, max(NN)) !> Used to hold the original B matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [out] | H | !> H is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The upper Hessenberg matrix computed from A by DGGHRD. !> |
| [out] | T | !> T is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The upper triangular matrix computed from B by DGGHRD. !> |
| [out] | S1 | !> S1 is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The Schur (block upper triangular) matrix computed from H by !> DHGEQZ when Q and Z are also computed. !> |
| [out] | S2 | !> S2 is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The Schur (block upper triangular) matrix computed from H by !> DHGEQZ when Q and Z are not computed. !> |
| [out] | P1 | !> P1 is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The upper triangular matrix computed from T by DHGEQZ !> when Q and Z are also computed. !> |
| [out] | P2 | !> P2 is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The upper triangular matrix computed from T by DHGEQZ !> when Q and Z are not computed. !> |
| [out] | U | !> U is DOUBLE PRECISION array, dimension (LDU, max(NN)) !> The (left) orthogonal matrix computed by DGGHRD. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U, V, Q, Z, EVECTL, and EVEZTR. It !> must be at least 1 and at least max( NN ). !> |
| [out] | V | !> V is DOUBLE PRECISION array, dimension (LDU, max(NN)) !> The (right) orthogonal matrix computed by DGGHRD. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDU, max(NN)) !> The (left) orthogonal matrix computed by DHGEQZ. !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension (LDU, max(NN)) !> The (left) orthogonal matrix computed by DHGEQZ. !> |
| [out] | ALPHR1 | !> ALPHR1 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | ALPHI1 | !> ALPHI1 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | BETA1 | !> BETA1 is DOUBLE PRECISION array, dimension (max(NN)) !> !> The generalized eigenvalues of (A,B) computed by DHGEQZ !> when Q, Z, and the full Schur matrices are computed. !> On exit, ( ALPHR1(k)+ALPHI1(k)*i ) / BETA1(k) is the k-th !> generalized eigenvalue of the matrices in A and B. !> |
| [out] | ALPHR3 | !> ALPHR3 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | ALPHI3 | !> ALPHI3 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | BETA3 | !> BETA3 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | EVECTL | !> EVECTL is DOUBLE PRECISION array, dimension (LDU, max(NN)) !> The (block lower triangular) left eigenvector matrix for !> the matrices in S1 and P1. (See DTGEVC for the format.) !> |
| [out] | EVECTR | !> EVECTR is DOUBLE PRECISION array, dimension (LDU, max(NN)) !> The (block upper triangular) right eigenvector matrix for !> the matrices in S1 and P1. (See DTGEVC for the format.) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. This must be at least !> max( 2 * N**2, 6*N, 1 ), for all N=NN(j). !> |
| [out] | LLWORK | !> LLWORK is LOGICAL array, dimension (max(NN)) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (15) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid !> overflow. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: A routine returned an error code. INFO is the !> absolute value of the INFO value returned. !> |
Definition at line 506 of file dchkgg.f.
| subroutine dchkgk | ( | integer | nin, |
| integer | nout ) |
DCHKGK
!> !> DCHKGK tests DGGBAK, a routine for backward balancing of !> a matrix pair (A, B). !>
| [in] | NIN | !> NIN is INTEGER !> The logical unit number for input. NIN > 0. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The logical unit number for output. NOUT > 0. !> |
Definition at line 53 of file dchkgk.f.
| subroutine dchkgl | ( | integer | nin, |
| integer | nout ) |
DCHKGL
!> !> DCHKGL tests DGGBAL, a routine for balancing a matrix pair (A, B). !>
| [in] | NIN | !> NIN is INTEGER !> The logical unit number for input. NIN > 0. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The logical unit number for output. NOUT > 0. !> |
Definition at line 52 of file dchkgl.f.
| subroutine dchkhs | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | h, | ||
| double precision, dimension( lda, * ) | t1, | ||
| double precision, dimension( lda, * ) | t2, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldu, * ) | z, | ||
| double precision, dimension( ldu, * ) | uz, | ||
| double precision, dimension( * ) | wr1, | ||
| double precision, dimension( * ) | wi1, | ||
| double precision, dimension( * ) | wr2, | ||
| double precision, dimension( * ) | wi2, | ||
| double precision, dimension( * ) | wr3, | ||
| double precision, dimension( * ) | wi3, | ||
| double precision, dimension( ldu, * ) | evectl, | ||
| double precision, dimension( ldu, * ) | evectr, | ||
| double precision, dimension( ldu, * ) | evecty, | ||
| double precision, dimension( ldu, * ) | evectx, | ||
| double precision, dimension( ldu, * ) | uu, | ||
| double precision, dimension( * ) | tau, | ||
| double precision, dimension( * ) | work, | ||
| integer | nwork, | ||
| integer, dimension( * ) | iwork, | ||
| logical, dimension( * ) | select, | ||
| double precision, dimension( 14 ) | result, | ||
| integer | info ) |
DCHKHS
!> !> DCHKHS checks the nonsymmetric eigenvalue problem routines. !> !> DGEHRD factors A as U H U' , where ' means transpose, !> H is hessenberg, and U is an orthogonal matrix. !> !> DORGHR generates the orthogonal matrix U. !> !> DORMHR multiplies a matrix by the orthogonal matrix U. !> !> DHSEQR factors H as Z T Z' , where Z is orthogonal and !> T is , and the eigenvalue vector W. !> !> DTREVC computes the left and right eigenvector matrices !> L and R for T. !> !> DHSEIN computes the left and right eigenvector matrices !> Y and X for H, using inverse iteration. !> !> When DCHKHS is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, one matrix will be generated and used !> to test the nonsymmetric eigenroutines. For each matrix, 14 !> tests will be performed: !> !> (1) | A - U H U**T | / ( |A| n ulp ) !> !> (2) | I - UU**T | / ( n ulp ) !> !> (3) | H - Z T Z**T | / ( |H| n ulp ) !> !> (4) | I - ZZ**T | / ( n ulp ) !> !> (5) | A - UZ H (UZ)**T | / ( |A| n ulp ) !> !> (6) | I - UZ (UZ)**T | / ( n ulp ) !> !> (7) | T(Z computed) - T(Z not computed) | / ( |T| ulp ) !> !> (8) | W(Z computed) - W(Z not computed) | / ( |W| ulp ) !> !> (9) | TR - RW | / ( |T| |R| ulp ) !> !> (10) | L**H T - W**H L | / ( |T| |L| ulp ) !> !> (11) | HX - XW | / ( |H| |X| ulp ) !> !> (12) | Y**H H - W**H Y | / ( |H| |Y| ulp ) !> !> (13) | AX - XW | / ( |A| |X| ulp ) !> !> (14) | Y**H A - W**H Y | / ( |A| |Y| ulp ) !> !> The are specified by an array NN(1:NSIZES); the value of !> each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) The zero matrix. !> (2) The identity matrix. !> (3) A (transposed) Jordan block, with 1's on the diagonal. !> !> (4) A diagonal matrix with evenly spaced entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (5) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (6) A diagonal matrix with entries 1, ULP, ..., ULP !> and random signs. !> !> (7) Same as (4), but multiplied by SQRT( overflow threshold ) !> (8) Same as (4), but multiplied by SQRT( underflow threshold ) !> !> (9) A matrix of the form U' T U, where U is orthogonal and !> T has evenly spaced entries 1, ..., ULP with random signs !> on the diagonal and random O(1) entries in the upper !> triangle. !> !> (10) A matrix of the form U' T U, where U is orthogonal and !> T has geometrically spaced entries 1, ..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (11) A matrix of the form U' T U, where U is orthogonal and !> T has entries 1, ULP,..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (12) A matrix of the form U' T U, where U is orthogonal and !> T has real or complex conjugate paired eigenvalues randomly !> chosen from ( ULP, 1 ) and random O(1) entries in the upper !> triangle. !> !> (13) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (14) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has geometrically spaced entries !> 1, ..., ULP with random signs on the diagonal and random !> O(1) entries in the upper triangle. !> !> (15) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has entries 1, ULP,..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (16) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has real or complex conjugate paired !> eigenvalues randomly chosen from ( ULP, 1 ) and random !> O(1) entries in the upper triangle. !> !> (17) Same as (16), but multiplied by SQRT( overflow threshold ) !> (18) Same as (16), but multiplied by SQRT( underflow threshold ) !> !> (19) Nonsymmetric matrix with random entries chosen from (-1,1). !> (20) Same as (19), but multiplied by SQRT( overflow threshold ) !> (21) Same as (19), but multiplied by SQRT( underflow threshold ) !>
!> NSIZES - INTEGER !> The number of sizes of matrices to use. If it is zero, !> DCHKHS does nothing. It must be at least zero. !> Not modified. !> !> NN - INTEGER array, 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. !> Not modified. !> !> NTYPES - INTEGER !> The number of elements in DOTYPE. If it is zero, DCHKHS !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> Not modified. !> !> DOTYPE - LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> Not modified. !> !> ISEED - INTEGER array, 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(4) 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 DCHKHS to continue the same random number !> sequence. !> Modified. !> !> THRESH - DOUBLE PRECISION !> A test will count as if the , 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. !> Not modified. !> !> NOUNIT - INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> Not modified. !> !> A - DOUBLE PRECISION array, dimension (LDA,max(NN)) !> Used to hold the matrix whose eigenvalues are to be !> computed. On exit, A contains the last matrix actually !> used. !> Modified. !> !> LDA - INTEGER !> The leading dimension of A, H, T1 and T2. It must be at !> least 1 and at least max( NN ). !> Not modified. !> !> H - DOUBLE PRECISION array, dimension (LDA,max(NN)) !> The upper hessenberg matrix computed by DGEHRD. On exit, !> H contains the Hessenberg form of the matrix in A. !> Modified. !> !> T1 - DOUBLE PRECISION array, dimension (LDA,max(NN)) !> The Schur (=) matrix computed by DHSEQR !> if Z is computed. On exit, T1 contains the Schur form of !> the matrix in A. !> Modified. !> !> T2 - DOUBLE PRECISION array, dimension (LDA,max(NN)) !> The Schur matrix computed by DHSEQR when Z is not computed. !> This should be identical to T1. !> Modified. !> !> LDU - INTEGER !> The leading dimension of U, Z, UZ and UU. It must be at !> least 1 and at least max( NN ). !> Not modified. !> !> U - DOUBLE PRECISION array, dimension (LDU,max(NN)) !> The orthogonal matrix computed by DGEHRD. !> Modified. !> !> Z - DOUBLE PRECISION array, dimension (LDU,max(NN)) !> The orthogonal matrix computed by DHSEQR. !> Modified. !> !> UZ - DOUBLE PRECISION array, dimension (LDU,max(NN)) !> The product of U times Z. !> Modified. !> !> WR1 - DOUBLE PRECISION array, dimension (max(NN)) !> WI1 - DOUBLE PRECISION array, dimension (max(NN)) !> The real and imaginary parts of the eigenvalues of A, !> as computed when Z is computed. !> On exit, WR1 + WI1*i are the eigenvalues of the matrix in A. !> Modified. !> !> WR2 - DOUBLE PRECISION array, dimension (max(NN)) !> WI2 - DOUBLE PRECISION array, dimension (max(NN)) !> The real and imaginary parts of the eigenvalues of A, !> as computed when T is computed but not Z. !> On exit, WR2 + WI2*i are the eigenvalues of the matrix in A. !> Modified. !> !> WR3 - DOUBLE PRECISION array, dimension (max(NN)) !> WI3 - DOUBLE PRECISION array, dimension (max(NN)) !> Like WR1, WI1, these arrays contain the eigenvalues of A, !> but those computed when DHSEQR only computes the !> eigenvalues, i.e., not the Schur vectors and no more of the !> Schur form than is necessary for computing the !> eigenvalues. !> Modified. !> !> EVECTL - DOUBLE PRECISION array, dimension (LDU,max(NN)) !> The (upper triangular) left eigenvector matrix for the !> matrix in T1. For complex conjugate pairs, the real part !> is stored in one row and the imaginary part in the next. !> Modified. !> !> EVEZTR - DOUBLE PRECISION array, dimension (LDU,max(NN)) !> The (upper triangular) right eigenvector matrix for the !> matrix in T1. For complex conjugate pairs, the real part !> is stored in one column and the imaginary part in the next. !> Modified. !> !> EVECTY - DOUBLE PRECISION array, dimension (LDU,max(NN)) !> The left eigenvector matrix for the !> matrix in H. For complex conjugate pairs, the real part !> is stored in one row and the imaginary part in the next. !> Modified. !> !> EVECTX - DOUBLE PRECISION array, dimension (LDU,max(NN)) !> The right eigenvector matrix for the !> matrix in H. For complex conjugate pairs, the real part !> is stored in one column and the imaginary part in the next. !> Modified. !> !> UU - DOUBLE PRECISION array, dimension (LDU,max(NN)) !> Details of the orthogonal matrix computed by DGEHRD. !> Modified. !> !> TAU - DOUBLE PRECISION array, dimension(max(NN)) !> Further details of the orthogonal matrix computed by DGEHRD. !> Modified. !> !> WORK - DOUBLE PRECISION array, dimension (NWORK) !> Workspace. !> Modified. !> !> NWORK - INTEGER !> The number of entries in WORK. NWORK >= 4*NN(j)*NN(j) + 2. !> !> IWORK - INTEGER array, dimension (max(NN)) !> Workspace. !> Modified. !> !> SELECT - LOGICAL array, dimension (max(NN)) !> Workspace. !> Modified. !> !> RESULT - DOUBLE PRECISION array, dimension (14) !> The values computed by the fourteen tests described above. !> The values are currently limited to 1/ulp, to avoid !> overflow. !> Modified. !> !> INFO - INTEGER !> If 0, then everything ran OK. !> -1: NSIZES < 0 !> -2: Some NN(j) < 0 !> -3: NTYPES < 0 !> -6: THRESH < 0 !> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ). !> -14: LDU < 1 or LDU < NMAX. !> -28: NWORK too small. !> If DLATMR, SLATMS, or SLATME returns an error code, the !> absolute value of it is returned. !> If 1, then DHSEQR could not find all the shifts. !> If 2, then the EISPACK code (for small blocks) failed. !> If >2, then 30*N iterations were not enough to find an !> eigenvalue or to decompose the problem. !> Modified. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> MTEST The number of tests defined: care must be taken !> that (1) the size of RESULT, (2) the number of !> tests actually performed, and (3) MTEST agree. !> NTEST The number of tests performed on this matrix !> so far. This should be less than MTEST, and !> equal to it by the last test. It will be less !> if any of the routines being tested indicates !> that it could not compute the matrices that !> would be tested. !> NMAX Largest value in NN. !> NMATS The number of matrices generated so far. !> NERRS The number of tests which have exceeded THRESH !> so far (computed by DLAFTS). !> COND, CONDS, !> IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTOVFL, RTUNFL, !> RTULP, RTULPI Square roots of the previous 4 values. !> !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> KCONDS(j) Selects whether CONDS is to be 1 or !> 1/sqrt(ulp). (0 means irrelevant.) !>
Definition at line 407 of file dchkhs.f.
| subroutine dchksb | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | nwdths, | ||
| integer, dimension( * ) | kk, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | sd, | ||
| double precision, dimension( * ) | se, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DCHKSB
!> !> DCHKSB tests the reduction of a symmetric band matrix to tridiagonal !> form, used with the symmetric eigenvalue problem. !> !> DSBTRD factors a symmetric band matrix A as U S U' , where ' means !> transpose, S is symmetric tridiagonal, and U is orthogonal. !> DSBTRD can use either just the lower or just the upper triangle !> of A; DCHKSB checks both cases. !> !> When DCHKSB is called, a number of matrix (), a number !> of bandwidths (), and a number of matrix are !> specified. For each size (), each bandwidth () less than or !> equal to , and each type of matrix, one matrix will be generated !> and used to test the symmetric banded reduction routine. For each !> matrix, a number of tests will be performed: !> !> (1) | A - V S V' | / ( |A| n ulp ) computed by DSBTRD with !> UPLO='U' !> !> (2) | I - UU' | / ( n ulp ) !> !> (3) | A - V S V' | / ( |A| n ulp ) computed by DSBTRD with !> UPLO='L' !> !> (4) | I - UU' | / ( n ulp ) !> !> The are specified by an array NN(1:NSIZES); the value of !> each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type 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 entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (4) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (5) A diagonal matrix with entries 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 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 ) !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DCHKSB does nothing. It must be at least zero. !> |
| [in] | NN | !> NN is INTEGER array, 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. !> |
| [in] | NWDTHS | !> NWDTHS is INTEGER !> The number of bandwidths to use. If it is zero, !> DCHKSB does nothing. It must be at least zero. !> |
| [in] | KK | !> KK is INTEGER array, dimension (NWDTHS) !> An array containing the bandwidths to be used for the band !> matrices. The values must be at least zero. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DCHKSB !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DCHKSB to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, dimension !> (LDA, max(NN)) !> Used to hold the matrix whose eigenvalues are to be !> computed. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at least 2 (not 1!) !> and at least max( KK )+1. !> |
| [out] | SD | !> SD is DOUBLE PRECISION array, dimension (max(NN)) !> Used to hold the diagonal of the tridiagonal matrix computed !> by DSBTRD. !> |
| [out] | SE | !> SE is DOUBLE PRECISION array, dimension (max(NN)) !> Used to hold the off-diagonal of the tridiagonal matrix !> computed by DSBTRD. !> |
| [out] | U | !> U is DOUBLE PRECISION array, dimension (LDU, max(NN)) !> Used to hold the orthogonal matrix computed by DSBTRD. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. It must be at least 1 !> and at least max( NN ). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. This must be at least !> max( LDA+1, max(NN)+1 )*max(NN). !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (4) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid !> overflow. !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then everything ran OK. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NTEST The number of tests performed, or which can !> be performed so far, for the current matrix. !> NTESTT The total number of tests performed so far. !> NMAX Largest value in NN. !> NMATS The number of matrices generated so far. !> NERRS The number of tests which have exceeded THRESH !> so far. !> COND, IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTOVFL, RTUNFL Square roots of the previous 2 values. !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> |
Definition at line 290 of file dchksb.f.
| subroutine dchksb2stg | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | nwdths, | ||
| integer, dimension( * ) | kk, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | sd, | ||
| double precision, dimension( * ) | se, | ||
| double precision, dimension( * ) | d1, | ||
| double precision, dimension( * ) | d2, | ||
| double precision, dimension( * ) | d3, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DCHKSB2STG
!> !> DCHKSB2STG tests the reduction of a symmetric band matrix to tridiagonal !> form, used with the symmetric eigenvalue problem. !> !> DSBTRD factors a symmetric band matrix A as U S U' , where ' means !> transpose, S is symmetric tridiagonal, and U is orthogonal. !> DSBTRD can use either just the lower or just the upper triangle !> of A; DCHKSB2STG checks both cases. !> !> DSYTRD_SB2ST factors a symmetric band matrix A as U S U' , !> where ' means transpose, S is symmetric tridiagonal, and U is !> orthogonal. DSYTRD_SB2ST can use either just the lower or just !> the upper triangle of A; DCHKSB2STG checks both cases. !> !> DSTEQR factors S as Z D1 Z'. !> D1 is the matrix of eigenvalues computed when Z is not computed !> and from the S resulting of DSBTRD (used as reference for DSYTRD_SB2ST) !> D2 is the matrix of eigenvalues computed when Z is not computed !> and from the S resulting of DSYTRD_SB2ST . !> D3 is the matrix of eigenvalues computed when Z is not computed !> and from the S resulting of DSYTRD_SB2ST . !> !> When DCHKSB2STG is called, a number of matrix (), a number !> of bandwidths (), and a number of matrix are !> specified. For each size (), each bandwidth () less than or !> equal to , and each type of matrix, one matrix will be generated !> and used to test the symmetric banded reduction routine. For each !> matrix, a number of tests will be performed: !> !> (1) | A - V S V' | / ( |A| n ulp ) computed by DSBTRD with !> UPLO='U' !> !> (2) | I - UU' | / ( n ulp ) !> !> (3) | A - V S V' | / ( |A| n ulp ) computed by DSBTRD with !> UPLO='L' !> !> (4) | I - UU' | / ( n ulp ) !> !> (5) | D1 - D2 | / ( |D1| ulp ) where D1 is computed by !> DSBTRD with UPLO='U' and !> D2 is computed by !> DSYTRD_SB2ST with UPLO='U' !> !> (6) | D1 - D3 | / ( |D1| ulp ) where D1 is computed by !> DSBTRD with UPLO='U' and !> D3 is computed by !> DSYTRD_SB2ST with UPLO='L' !> !> The are specified by an array NN(1:NSIZES); the value of !> each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type 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 entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (4) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (5) A diagonal matrix with entries 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 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 ) !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DCHKSB2STG does nothing. It must be at least zero. !> |
| [in] | NN | !> NN is INTEGER array, 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. !> |
| [in] | NWDTHS | !> NWDTHS is INTEGER !> The number of bandwidths to use. If it is zero, !> DCHKSB2STG does nothing. It must be at least zero. !> |
| [in] | KK | !> KK is INTEGER array, dimension (NWDTHS) !> An array containing the bandwidths to be used for the band !> matrices. The values must be at least zero. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DCHKSB2STG !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DCHKSB2STG to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, dimension !> (LDA, max(NN)) !> Used to hold the matrix whose eigenvalues are to be !> computed. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at least 2 (not 1!) !> and at least max( KK )+1. !> |
| [out] | SD | !> SD is DOUBLE PRECISION array, dimension (max(NN)) !> Used to hold the diagonal of the tridiagonal matrix computed !> by DSBTRD. !> |
| [out] | SE | !> SE is DOUBLE PRECISION array, dimension (max(NN)) !> Used to hold the off-diagonal of the tridiagonal matrix !> computed by DSBTRD. !> |
| [out] | D1 | !> D1 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | D2 | !> D2 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | D3 | !> D3 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | U | !> U is DOUBLE PRECISION array, dimension (LDU, max(NN)) !> Used to hold the orthogonal matrix computed by DSBTRD. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. It must be at least 1 !> and at least max( NN ). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. This must be at least !> max( LDA+1, max(NN)+1 )*max(NN). !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (4) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid !> overflow. !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then everything ran OK. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NTEST The number of tests performed, or which can !> be performed so far, for the current matrix. !> NTESTT The total number of tests performed so far. !> NMAX Largest value in NN. !> NMATS The number of matrices generated so far. !> NERRS The number of tests which have exceeded THRESH !> so far. !> COND, IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTOVFL, RTUNFL Square roots of the previous 2 values. !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> |
Definition at line 329 of file dchksb2stg.f.
| subroutine dchkst | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | ap, | ||
| double precision, dimension( * ) | sd, | ||
| double precision, dimension( * ) | se, | ||
| double precision, dimension( * ) | d1, | ||
| double precision, dimension( * ) | d2, | ||
| double precision, dimension( * ) | d3, | ||
| double precision, dimension( * ) | d4, | ||
| double precision, dimension( * ) | d5, | ||
| double precision, dimension( * ) | wa1, | ||
| double precision, dimension( * ) | wa2, | ||
| double precision, dimension( * ) | wa3, | ||
| double precision, dimension( * ) | wr, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldu, * ) | v, | ||
| double precision, dimension( * ) | vp, | ||
| double precision, dimension( * ) | tau, | ||
| double precision, dimension( ldu, * ) | z, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DCHKST
!>
!> DCHKST checks the symmetric eigenvalue problem routines.
!>
!> DSYTRD factors A as U S U' , where ' means transpose,
!> S is symmetric tridiagonal, and U is orthogonal.
!> DSYTRD can use either just the lower or just the upper triangle
!> of A; DCHKST checks both cases.
!> U is represented as a product of Householder
!> transformations, whose vectors are stored in the first
!> n-1 columns of V, and whose scale factors are in TAU.
!>
!> DSPTRD does the same as DSYTRD, except that A and V are stored
!> in format.
!>
!> DORGTR constructs the matrix U from the contents of V and TAU.
!>
!> DOPGTR constructs the matrix U from the contents of VP and TAU.
!>
!> DSTEQR factors S as Z D1 Z' , where Z is the orthogonal
!> matrix of eigenvectors and D1 is a diagonal matrix with
!> the eigenvalues on the diagonal. D2 is the matrix of
!> eigenvalues computed when Z is not computed.
!>
!> DSTERF computes D3, the matrix of eigenvalues, by the
!> PWK method, which does not yield eigenvectors.
!>
!> DPTEQR factors S as Z4 D4 Z4' , for a
!> symmetric positive definite tridiagonal matrix.
!> D5 is the matrix of eigenvalues computed when Z is not
!> computed.
!>
!> 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.
!>
!> DSTEDC factors S as Z D1 Z' , where Z is the orthogonal
!> matrix of eigenvectors and D1 is a diagonal matrix with
!> the eigenvalues on the diagonal ('I' option). It may also
!> update an input orthogonal matrix, usually the output
!> from DSYTRD/DORGTR or DSPTRD/DOPGTR ('V' option). It may
!> also just compute eigenvalues ('N' option).
!>
!> DSTEMR factors S as Z D1 Z' , where Z is the orthogonal
!> matrix of eigenvectors and D1 is a diagonal matrix with
!> the eigenvalues on the diagonal ('I' option). DSTEMR
!> uses the Relatively Robust Representation whenever possible.
!>
!> When DCHKST is called, a number of matrix () and a
!> number of matrix are specified. For each size ()
!> 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) | A - V S V' | / ( |A| n ulp ) DSYTRD( UPLO='U', ... )
!>
!> (2) | I - UV' | / ( n ulp ) DORGTR( UPLO='U', ... )
!>
!> (3) | A - V S V' | / ( |A| n ulp ) DSYTRD( UPLO='L', ... )
!>
!> (4) | I - UV' | / ( n ulp ) DORGTR( UPLO='L', ... )
!>
!> (5-8) Same as 1-4, but for DSPTRD and DOPGTR.
!>
!> (9) | S - Z D Z' | / ( |S| n ulp ) DSTEQR('V',...)
!>
!> (10) | I - ZZ' | / ( n ulp ) DSTEQR('V',...)
!>
!> (11) | D1 - D2 | / ( |D1| ulp ) DSTEQR('N',...)
!>
!> (12) | D1 - D3 | / ( |D1| ulp ) DSTERF
!>
!> (13) 0 if the true eigenvalues (computed by sturm count)
!> of S are within THRESH of
!> those in D1. 2*THRESH if they are not. (Tested using
!> DSTECH)
!>
!> For S positive definite,
!>
!> (14) | S - Z4 D4 Z4' | / ( |S| n ulp ) DPTEQR('V',...)
!>
!> (15) | I - Z4 Z4' | / ( n ulp ) DPTEQR('V',...)
!>
!> (16) | D4 - D5 | / ( 100 |D4| ulp ) DPTEQR('N',...)
!>
!> When S is also diagonally dominant by the factor gamma < 1,
!>
!> (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
!> i
!> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
!> DSTEBZ( 'A', 'E', ...)
!>
!> (18) | WA1 - D3 | / ( |D3| ulp ) DSTEBZ( 'A', 'E', ...)
!>
!> (19) ( max { min | WA2(i)-WA3(j) | } +
!> i j
!> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
!> i j
!> DSTEBZ( 'I', 'E', ...)
!>
!> (20) | S - Y WA1 Y' | / ( |S| n ulp ) DSTEBZ, SSTEIN
!>
!> (21) | I - Y Y' | / ( n ulp ) DSTEBZ, SSTEIN
!>
!> (22) | S - Z D Z' | / ( |S| n ulp ) DSTEDC('I')
!>
!> (23) | I - ZZ' | / ( n ulp ) DSTEDC('I')
!>
!> (24) | S - Z D Z' | / ( |S| n ulp ) DSTEDC('V')
!>
!> (25) | I - ZZ' | / ( n ulp ) DSTEDC('V')
!>
!> (26) | D1 - D2 | / ( |D1| ulp ) DSTEDC('V') and
!> DSTEDC('N')
!>
!> Test 27 is disabled at the moment because DSTEMR does not
!> guarantee high relatvie accuracy.
!>
!> (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
!> i
!> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
!> DSTEMR('V', 'A')
!>
!> (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
!> i
!> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
!> DSTEMR('V', 'I')
!>
!> Tests 29 through 34 are disable at present because DSTEMR
!> does not handle partial spectrum requests.
!>
!> (29) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'I')
!>
!> (30) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'I')
!>
!> (31) ( max { min | WA2(i)-WA3(j) | } +
!> i j
!> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
!> i j
!> DSTEMR('N', 'I') vs. SSTEMR('V', 'I')
!>
!> (32) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'V')
!>
!> (33) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'V')
!>
!> (34) ( max { min | WA2(i)-WA3(j) | } +
!> i j
!> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
!> i j
!> DSTEMR('N', 'V') vs. SSTEMR('V', 'V')
!>
!> (35) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'A')
!>
!> (36) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'A')
!>
!> (37) ( max { min | WA2(i)-WA3(j) | } +
!> i j
!> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
!> i j
!> DSTEMR('N', 'A') vs. SSTEMR('V', 'A')
!>
!> The are specified by an array NN(1:NSIZES); the value of
!> each element NN(j) specifies one size.
!> The are specified by a logical array DOTYPE( 1:NTYPES );
!> if DOTYPE(j) is .TRUE., then matrix type 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 entries
!> 1, ..., ULP and random signs.
!> (ULP = (first number larger than 1) - 1 )
!> (4) A diagonal matrix with geometrically spaced entries
!> 1, ..., ULP and random signs.
!> (5) A diagonal matrix with entries 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 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) Same as (8), but diagonal elements are all positive.
!> (17) Same as (9), but diagonal elements are all positive.
!> (18) Same as (10), but diagonal elements are all positive.
!> (19) Same as (16), but multiplied by SQRT( overflow threshold )
!> (20) Same as (16), but multiplied by SQRT( underflow threshold )
!> (21) A diagonally dominant tridiagonal matrix with geometrically
!> spaced diagonal entries 1, ..., ULP.
!> | [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DCHKST does nothing. It must be at least zero. !> |
| [in] | NN | !> NN is INTEGER array, 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. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DCHKST to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array 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. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at !> least 1 and at least max( NN ). !> |
| [out] | AP | !> AP is DOUBLE PRECISION array of !> dimension( max(NN)*max(NN+1)/2 ) !> The matrix A stored in packed format. !> |
| [out] | SD | !> SD is DOUBLE PRECISION array 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. !> |
| [out] | SE | !> SE is DOUBLE PRECISION array 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. !> |
| [out] | D1 | !> D1 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The eigenvalues of A, as computed by DSTEQR simlutaneously !> with Z. On exit, the eigenvalues in D1 correspond with the !> matrix in A. !> |
| [out] | D2 | !> D2 is DOUBLE PRECISION array 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. !> |
| [out] | D3 | !> D3 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The eigenvalues of A, as computed by DSTERF. On exit, the !> eigenvalues in D3 correspond with the matrix in A. !> |
| [out] | D4 | !> D4 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The eigenvalues of A, as computed by DPTEQR(V). !> DPTEQR factors S as Z4 D4 Z4* !> On exit, the eigenvalues in D4 correspond with the matrix in A. !> |
| [out] | D5 | !> D5 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The eigenvalues of A, as computed by DPTEQR(N) !> when Z is not computed. On exit, the !> eigenvalues in D4 correspond with the matrix in A. !> |
| [out] | WA1 | !> WA1 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> All eigenvalues of A, computed to high !> absolute accuracy, with different range options. !> as computed by DSTEBZ. !> |
| [out] | WA2 | !> WA2 is DOUBLE PRECISION array 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 for the !> IL-th through IU-th eigenvalues. !> |
| [out] | WA3 | !> WA3 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> Selected eigenvalues of A, computed to high !> absolute accuracy, with different range options. !> as computed by DSTEBZ. !> Determine the values VL and VU of the IL-th and IU-th !> eigenvalues and ask for all eigenvalues in this range. !> |
| [out] | WR | !> WR is DOUBLE PRECISION array of !> dimension( max(NN) ) !> All eigenvalues of A, computed to high !> absolute accuracy, with different options. !> as computed by DSTEBZ. !> |
| [out] | U | !> U is DOUBLE PRECISION array of !> dimension( LDU, max(NN) ). !> The orthogonal matrix computed by DSYTRD + DORGTR. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U, Z, and V. It must be at least 1 !> and at least max( NN ). !> |
| [out] | V | !> V is DOUBLE PRECISION array of !> dimension( LDU, max(NN) ). !> The Housholder 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.) !> |
| [out] | VP | !> VP is DOUBLE PRECISION array of !> dimension( max(NN)*max(NN+1)/2 ) !> The matrix V stored in packed format. !> |
| [out] | TAU | !> TAU is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The Householder factors computed by DSYTRD in reducing A !> to tridiagonal form. !> |
| [out] | Z | !> Z is DOUBLE PRECISION array of !> dimension( LDU, max(NN) ). !> The orthogonal matrix of eigenvectors computed by DSTEQR, !> DPTEQR, and DSTEIN. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array of !> dimension( LWORK ) !> |
| [in] | LWORK | !> LWORK is INTEGER !> 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. !> |
| [out] | IWORK | !> IWORK is INTEGER array, !> Workspace. !> |
| [out] | LIWORK | !> LIWORK is INTEGER !> The number of entries in IWORK. This must be at least !> 6 + 6*Nmax + 5 * Nmax * lg Nmax !> where Nmax = max( NN(j), 2 ) and lg = log base 2. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (26) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid !> overflow. !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then everything ran OK. !> -1: NSIZES < 0 !> -2: Some NN(j) < 0 !> -3: NTYPES < 0 !> -5: THRESH < 0 !> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ). !> -23: LDU < 1 or LDU < NMAX. !> -29: LWORK too small. !> If DLATMR, SLATMS, DSYTRD, DORGTR, DSTEQR, SSTERF, !> or DORMC2 returns an error code, the !> absolute value of it is returned. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NTEST The number of tests performed, or which can !> be performed so far, for the current matrix. !> NTESTT The total number of tests performed so far. !> NBLOCK Blocksize as returned by ENVIR. !> NMAX Largest value in NN. !> NMATS The number of matrices generated so far. !> NERRS The number of tests which have exceeded THRESH !> so far. !> COND, IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTOVFL, RTUNFL Square roots of the previous 2 values. !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> |
Definition at line 587 of file dchkst.f.
| subroutine dchkst2stg | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | ap, | ||
| double precision, dimension( * ) | sd, | ||
| double precision, dimension( * ) | se, | ||
| double precision, dimension( * ) | d1, | ||
| double precision, dimension( * ) | d2, | ||
| double precision, dimension( * ) | d3, | ||
| double precision, dimension( * ) | d4, | ||
| double precision, dimension( * ) | d5, | ||
| double precision, dimension( * ) | wa1, | ||
| double precision, dimension( * ) | wa2, | ||
| double precision, dimension( * ) | wa3, | ||
| double precision, dimension( * ) | wr, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldu, * ) | v, | ||
| double precision, dimension( * ) | vp, | ||
| double precision, dimension( * ) | tau, | ||
| double precision, dimension( ldu, * ) | z, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DCHKST2STG
!>
!> DCHKST2STG checks the symmetric eigenvalue problem routines
!> using the 2-stage reduction techniques. Since the generation
!> of Q or the vectors is not available in this release, we only
!> compare the eigenvalue resulting when using the 2-stage to the
!> one considered as reference using the standard 1-stage reduction
!> DSYTRD. For that, we call the standard DSYTRD and compute D1 using
!> DSTEQR, then we call the 2-stage DSYTRD_2STAGE with Upper and Lower
!> and we compute D2 and D3 using DSTEQR and then we replaced tests
!> 3 and 4 by tests 11 and 12. test 1 and 2 remain to verify that
!> the 1-stage results are OK and can be trusted.
!> This testing routine will converge to the DCHKST in the next
!> release when vectors and generation of Q will be implemented.
!>
!> DSYTRD factors A as U S U' , where ' means transpose,
!> S is symmetric tridiagonal, and U is orthogonal.
!> DSYTRD can use either just the lower or just the upper triangle
!> of A; DCHKST2STG checks both cases.
!> U is represented as a product of Householder
!> transformations, whose vectors are stored in the first
!> n-1 columns of V, and whose scale factors are in TAU.
!>
!> DSPTRD does the same as DSYTRD, except that A and V are stored
!> in format.
!>
!> DORGTR constructs the matrix U from the contents of V and TAU.
!>
!> DOPGTR constructs the matrix U from the contents of VP and TAU.
!>
!> DSTEQR factors S as Z D1 Z' , where Z is the orthogonal
!> matrix of eigenvectors and D1 is a diagonal matrix with
!> the eigenvalues on the diagonal. D2 is the matrix of
!> eigenvalues computed when Z is not computed.
!>
!> DSTERF computes D3, the matrix of eigenvalues, by the
!> PWK method, which does not yield eigenvectors.
!>
!> DPTEQR factors S as Z4 D4 Z4' , for a
!> symmetric positive definite tridiagonal matrix.
!> D5 is the matrix of eigenvalues computed when Z is not
!> computed.
!>
!> 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.
!>
!> DSTEDC factors S as Z D1 Z' , where Z is the orthogonal
!> matrix of eigenvectors and D1 is a diagonal matrix with
!> the eigenvalues on the diagonal ('I' option). It may also
!> update an input orthogonal matrix, usually the output
!> from DSYTRD/DORGTR or DSPTRD/DOPGTR ('V' option). It may
!> also just compute eigenvalues ('N' option).
!>
!> DSTEMR factors S as Z D1 Z' , where Z is the orthogonal
!> matrix of eigenvectors and D1 is a diagonal matrix with
!> the eigenvalues on the diagonal ('I' option). DSTEMR
!> uses the Relatively Robust Representation whenever possible.
!>
!> When DCHKST2STG is called, a number of matrix () and a
!> number of matrix are specified. For each size ()
!> 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) | A - V S V' | / ( |A| n ulp ) DSYTRD( UPLO='U', ... )
!>
!> (2) | I - UV' | / ( n ulp ) DORGTR( UPLO='U', ... )
!>
!> (3) | A - V S V' | / ( |A| n ulp ) DSYTRD( UPLO='L', ... )
!> replaced by | D1 - D2 | / ( |D1| ulp ) where D1 is the
!> eigenvalue matrix computed using S and D2 is the
!> eigenvalue matrix computed using S_2stage the output of
!> DSYTRD_2STAGE(, ,....). D1 and D2 are computed
!> via DSTEQR('N',...)
!>
!> (4) | I - UV' | / ( n ulp ) DORGTR( UPLO='L', ... )
!> replaced by | D1 - D3 | / ( |D1| ulp ) where D1 is the
!> eigenvalue matrix computed using S and D3 is the
!> eigenvalue matrix computed using S_2stage the output of
!> DSYTRD_2STAGE(, ,....). D1 and D3 are computed
!> via DSTEQR('N',...)
!>
!> (5-8) Same as 1-4, but for DSPTRD and DOPGTR.
!>
!> (9) | S - Z D Z' | / ( |S| n ulp ) DSTEQR('V',...)
!>
!> (10) | I - ZZ' | / ( n ulp ) DSTEQR('V',...)
!>
!> (11) | D1 - D2 | / ( |D1| ulp ) DSTEQR('N',...)
!>
!> (12) | D1 - D3 | / ( |D1| ulp ) DSTERF
!>
!> (13) 0 if the true eigenvalues (computed by sturm count)
!> of S are within THRESH of
!> those in D1. 2*THRESH if they are not. (Tested using
!> DSTECH)
!>
!> For S positive definite,
!>
!> (14) | S - Z4 D4 Z4' | / ( |S| n ulp ) DPTEQR('V',...)
!>
!> (15) | I - Z4 Z4' | / ( n ulp ) DPTEQR('V',...)
!>
!> (16) | D4 - D5 | / ( 100 |D4| ulp ) DPTEQR('N',...)
!>
!> When S is also diagonally dominant by the factor gamma < 1,
!>
!> (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
!> i
!> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
!> DSTEBZ( 'A', 'E', ...)
!>
!> (18) | WA1 - D3 | / ( |D3| ulp ) DSTEBZ( 'A', 'E', ...)
!>
!> (19) ( max { min | WA2(i)-WA3(j) | } +
!> i j
!> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
!> i j
!> DSTEBZ( 'I', 'E', ...)
!>
!> (20) | S - Y WA1 Y' | / ( |S| n ulp ) DSTEBZ, SSTEIN
!>
!> (21) | I - Y Y' | / ( n ulp ) DSTEBZ, SSTEIN
!>
!> (22) | S - Z D Z' | / ( |S| n ulp ) DSTEDC('I')
!>
!> (23) | I - ZZ' | / ( n ulp ) DSTEDC('I')
!>
!> (24) | S - Z D Z' | / ( |S| n ulp ) DSTEDC('V')
!>
!> (25) | I - ZZ' | / ( n ulp ) DSTEDC('V')
!>
!> (26) | D1 - D2 | / ( |D1| ulp ) DSTEDC('V') and
!> DSTEDC('N')
!>
!> Test 27 is disabled at the moment because DSTEMR does not
!> guarantee high relatvie accuracy.
!>
!> (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
!> i
!> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
!> DSTEMR('V', 'A')
!>
!> (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
!> i
!> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
!> DSTEMR('V', 'I')
!>
!> Tests 29 through 34 are disable at present because DSTEMR
!> does not handle partial spectrum requests.
!>
!> (29) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'I')
!>
!> (30) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'I')
!>
!> (31) ( max { min | WA2(i)-WA3(j) | } +
!> i j
!> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
!> i j
!> DSTEMR('N', 'I') vs. SSTEMR('V', 'I')
!>
!> (32) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'V')
!>
!> (33) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'V')
!>
!> (34) ( max { min | WA2(i)-WA3(j) | } +
!> i j
!> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
!> i j
!> DSTEMR('N', 'V') vs. SSTEMR('V', 'V')
!>
!> (35) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'A')
!>
!> (36) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'A')
!>
!> (37) ( max { min | WA2(i)-WA3(j) | } +
!> i j
!> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
!> i j
!> DSTEMR('N', 'A') vs. SSTEMR('V', 'A')
!>
!> The are specified by an array NN(1:NSIZES); the value of
!> each element NN(j) specifies one size.
!> The are specified by a logical array DOTYPE( 1:NTYPES );
!> if DOTYPE(j) is .TRUE., then matrix type 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 entries
!> 1, ..., ULP and random signs.
!> (ULP = (first number larger than 1) - 1 )
!> (4) A diagonal matrix with geometrically spaced entries
!> 1, ..., ULP and random signs.
!> (5) A diagonal matrix with entries 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 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) Same as (8), but diagonal elements are all positive.
!> (17) Same as (9), but diagonal elements are all positive.
!> (18) Same as (10), but diagonal elements are all positive.
!> (19) Same as (16), but multiplied by SQRT( overflow threshold )
!> (20) Same as (16), but multiplied by SQRT( underflow threshold )
!> (21) A diagonally dominant tridiagonal matrix with geometrically
!> spaced diagonal entries 1, ..., ULP.
!> | [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DCHKST2STG does nothing. It must be at least zero. !> |
| [in] | NN | !> NN is INTEGER array, 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. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DCHKST2STG !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DCHKST2STG to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array 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. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at !> least 1 and at least max( NN ). !> |
| [out] | AP | !> AP is DOUBLE PRECISION array of !> dimension( max(NN)*max(NN+1)/2 ) !> The matrix A stored in packed format. !> |
| [out] | SD | !> SD is DOUBLE PRECISION array 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. !> |
| [out] | SE | !> SE is DOUBLE PRECISION array 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. !> |
| [out] | D1 | !> D1 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The eigenvalues of A, as computed by DSTEQR simlutaneously !> with Z. On exit, the eigenvalues in D1 correspond with the !> matrix in A. !> |
| [out] | D2 | !> D2 is DOUBLE PRECISION array 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. !> |
| [out] | D3 | !> D3 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The eigenvalues of A, as computed by DSTERF. On exit, the !> eigenvalues in D3 correspond with the matrix in A. !> |
| [out] | D4 | !> D4 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The eigenvalues of A, as computed by DPTEQR(V). !> DPTEQR factors S as Z4 D4 Z4* !> On exit, the eigenvalues in D4 correspond with the matrix in A. !> |
| [out] | D5 | !> D5 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The eigenvalues of A, as computed by DPTEQR(N) !> when Z is not computed. On exit, the !> eigenvalues in D4 correspond with the matrix in A. !> |
| [out] | WA1 | !> WA1 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> All eigenvalues of A, computed to high !> absolute accuracy, with different range options. !> as computed by DSTEBZ. !> |
| [out] | WA2 | !> WA2 is DOUBLE PRECISION array 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 for the !> IL-th through IU-th eigenvalues. !> |
| [out] | WA3 | !> WA3 is DOUBLE PRECISION array of !> dimension( max(NN) ) !> Selected eigenvalues of A, computed to high !> absolute accuracy, with different range options. !> as computed by DSTEBZ. !> Determine the values VL and VU of the IL-th and IU-th !> eigenvalues and ask for all eigenvalues in this range. !> |
| [out] | WR | !> WR is DOUBLE PRECISION array of !> dimension( max(NN) ) !> All eigenvalues of A, computed to high !> absolute accuracy, with different options. !> as computed by DSTEBZ. !> |
| [out] | U | !> U is DOUBLE PRECISION array of !> dimension( LDU, max(NN) ). !> The orthogonal matrix computed by DSYTRD + DORGTR. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U, Z, and V. It must be at least 1 !> and at least max( NN ). !> |
| [out] | V | !> V is DOUBLE PRECISION array of !> dimension( LDU, max(NN) ). !> The Housholder 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.) !> |
| [out] | VP | !> VP is DOUBLE PRECISION array of !> dimension( max(NN)*max(NN+1)/2 ) !> The matrix V stored in packed format. !> |
| [out] | TAU | !> TAU is DOUBLE PRECISION array of !> dimension( max(NN) ) !> The Householder factors computed by DSYTRD in reducing A !> to tridiagonal form. !> |
| [out] | Z | !> Z is DOUBLE PRECISION array of !> dimension( LDU, max(NN) ). !> The orthogonal matrix of eigenvectors computed by DSTEQR, !> DPTEQR, and DSTEIN. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array of !> dimension( LWORK ) !> |
| [in] | LWORK | !> LWORK is INTEGER !> 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. !> |
| [out] | IWORK | !> IWORK is INTEGER array, !> Workspace. !> |
| [out] | LIWORK | !> LIWORK is INTEGER !> The number of entries in IWORK. This must be at least !> 6 + 6*Nmax + 5 * Nmax * lg Nmax !> where Nmax = max( NN(j), 2 ) and lg = log base 2. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (26) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid !> overflow. !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then everything ran OK. !> -1: NSIZES < 0 !> -2: Some NN(j) < 0 !> -3: NTYPES < 0 !> -5: THRESH < 0 !> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ). !> -23: LDU < 1 or LDU < NMAX. !> -29: LWORK too small. !> If DLATMR, SLATMS, DSYTRD, DORGTR, DSTEQR, SSTERF, !> or DORMC2 returns an error code, the !> absolute value of it is returned. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NTEST The number of tests performed, or which can !> be performed so far, for the current matrix. !> NTESTT The total number of tests performed so far. !> NBLOCK Blocksize as returned by ENVIR. !> NMAX Largest value in NN. !> NMATS The number of matrices generated so far. !> NERRS The number of tests which have exceeded THRESH !> so far. !> COND, IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTOVFL, RTUNFL Square roots of the previous 2 values. !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> |
Definition at line 608 of file dchkst2stg.f.
| subroutine dckcsd | ( | integer | nm, |
| integer, dimension( * ) | mval, | ||
| integer, dimension( * ) | pval, | ||
| integer, dimension( * ) | qval, | ||
| integer | nmats, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | mmax, | ||
| double precision, dimension( * ) | x, | ||
| double precision, dimension( * ) | xf, | ||
| double precision, dimension( * ) | u1, | ||
| double precision, dimension( * ) | u2, | ||
| double precision, dimension( * ) | v1t, | ||
| double precision, dimension( * ) | v2t, | ||
| double precision, dimension( * ) | theta, | ||
| integer, dimension( * ) | iwork, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( * ) | rwork, | ||
| integer | nin, | ||
| integer | nout, | ||
| integer | info ) |
DCKCSD
!> !> DCKCSD tests DORCSD: !> the CSD for an M-by-M orthogonal matrix X partitioned as !> [ X11 X12; X21 X22 ]. X11 is P-by-Q. !>
| [in] | NM | !> NM is INTEGER !> The number of values of M contained in the vector MVAL. !> |
| [in] | MVAL | !> MVAL is INTEGER array, dimension (NM) !> The values of the matrix row dimension M. !> |
| [in] | PVAL | !> PVAL is INTEGER array, dimension (NM) !> The values of the matrix row dimension P. !> |
| [in] | QVAL | !> QVAL is INTEGER array, dimension (NM) !> The values of the matrix column dimension Q. !> |
| [in] | NMATS | !> NMATS is INTEGER !> The number of matrix types to be tested for each combination !> of matrix dimensions. If NMATS >= NTYPES (the maximum !> number of matrix types), then all the different types are !> generated for testing. If NMATS < NTYPES, another input line !> is read to get the numbers of the matrix types to be used. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, dimension (4) !> On entry, the seed of the random number generator. The array !> elements should be between 0 and 4095, otherwise they will be !> reduced mod 4096, and ISEED(4) must be odd. !> On exit, the next seed in the random number sequence after !> all the test matrices have been generated. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> The threshold value for the test ratios. A result is !> included in the output file if RESULT >= THRESH. To have !> every test ratio printed, use THRESH = 0. !> |
| [in] | MMAX | !> MMAX is INTEGER !> The maximum value permitted for M, used in dimensioning the !> work arrays. !> |
| [out] | X | !> X is DOUBLE PRECISION array, dimension (MMAX*MMAX) !> |
| [out] | XF | !> XF is DOUBLE PRECISION array, dimension (MMAX*MMAX) !> |
| [out] | U1 | !> U1 is DOUBLE PRECISION array, dimension (MMAX*MMAX) !> |
| [out] | U2 | !> U2 is DOUBLE PRECISION array, dimension (MMAX*MMAX) !> |
| [out] | V1T | !> V1T is DOUBLE PRECISION array, dimension (MMAX*MMAX) !> |
| [out] | V2T | !> V2T is DOUBLE PRECISION array, dimension (MMAX*MMAX) !> |
| [out] | THETA | !> THETA is DOUBLE PRECISION array, dimension (MMAX) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (MMAX) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array !> |
| [in] | NIN | !> NIN is INTEGER !> The unit number for input. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The unit number for output. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0 : successful exit !> > 0 : If DLAROR returns an error code, the absolute value !> of it is returned. !> |
Definition at line 181 of file dckcsd.f.
| subroutine dckglm | ( | integer | nn, |
| integer, dimension( * ) | mval, | ||
| integer, dimension( * ) | pval, | ||
| integer, dimension( * ) | nval, | ||
| integer | nmats, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nmax, | ||
| double precision, dimension( * ) | a, | ||
| double precision, dimension( * ) | af, | ||
| double precision, dimension( * ) | b, | ||
| double precision, dimension( * ) | bf, | ||
| double precision, dimension( * ) | x, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( * ) | rwork, | ||
| integer | nin, | ||
| integer | nout, | ||
| integer | info ) |
DCKGLM
!> !> DCKGLM tests DGGGLM - subroutine for solving generalized linear !> model problem. !>
| [in] | NN | !> NN is INTEGER !> The number of values of N, M and P contained in the vectors !> NVAL, MVAL and PVAL. !> |
| [in] | MVAL | !> MVAL is INTEGER array, dimension (NN) !> The values of the matrix column dimension M. !> |
| [in] | PVAL | !> PVAL is INTEGER array, dimension (NN) !> The values of the matrix column dimension P. !> |
| [in] | NVAL | !> NVAL is INTEGER array, dimension (NN) !> The values of the matrix row dimension N. !> |
| [in] | NMATS | !> NMATS is INTEGER !> The number of matrix types to be tested for each combination !> of matrix dimensions. If NMATS >= NTYPES (the maximum !> number of matrix types), then all the different types are !> generated for testing. If NMATS < NTYPES, another input line !> is read to get the numbers of the matrix types to be used. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, dimension (4) !> On entry, the seed of the random number generator. The array !> elements should be between 0 and 4095, otherwise they will be !> reduced mod 4096, and ISEED(4) must be odd. !> On exit, the next seed in the random number sequence after !> all the test matrices have been generated. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> The threshold value for the test ratios. A result is !> included in the output file if RESID >= THRESH. To have !> every test ratio printed, use THRESH = 0. !> |
| [in] | NMAX | !> NMAX is INTEGER !> The maximum value permitted for M or N, used in dimensioning !> the work arrays. !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | AF | !> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | B | !> B is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | BF | !> BF is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | X | !> X is DOUBLE PRECISION array, dimension (4*NMAX) !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (NMAX) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [in] | NIN | !> NIN is INTEGER !> The unit number for input. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The unit number for output. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0 : successful exit !> > 0 : If DLATMS returns an error code, the absolute value !> of it is returned. !> |
Definition at line 164 of file dckglm.f.
| subroutine dckgqr | ( | integer | nm, |
| integer, dimension( * ) | mval, | ||
| integer | np, | ||
| integer, dimension( * ) | pval, | ||
| integer | nn, | ||
| integer, dimension( * ) | nval, | ||
| integer | nmats, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nmax, | ||
| double precision, dimension( * ) | a, | ||
| double precision, dimension( * ) | af, | ||
| double precision, dimension( * ) | aq, | ||
| double precision, dimension( * ) | ar, | ||
| double precision, dimension( * ) | taua, | ||
| double precision, dimension( * ) | b, | ||
| double precision, dimension( * ) | bf, | ||
| double precision, dimension( * ) | bz, | ||
| double precision, dimension( * ) | bt, | ||
| double precision, dimension( * ) | bwk, | ||
| double precision, dimension( * ) | taub, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( * ) | rwork, | ||
| integer | nin, | ||
| integer | nout, | ||
| integer | info ) |
DCKGQR
!> !> DCKGQR tests !> DGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B, !> DGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B. !>
| [in] | NM | !> NM is INTEGER !> The number of values of M contained in the vector MVAL. !> |
| [in] | MVAL | !> MVAL is INTEGER array, dimension (NM) !> The values of the matrix row(column) dimension M. !> |
| [in] | NP | !> NP is INTEGER !> The number of values of P contained in the vector PVAL. !> |
| [in] | PVAL | !> PVAL is INTEGER array, dimension (NP) !> The values of the matrix row(column) dimension P. !> |
| [in] | NN | !> NN is INTEGER !> The number of values of N contained in the vector NVAL. !> |
| [in] | NVAL | !> NVAL is INTEGER array, dimension (NN) !> The values of the matrix column(row) dimension N. !> |
| [in] | NMATS | !> NMATS is INTEGER !> The number of matrix types to be tested for each combination !> of matrix dimensions. If NMATS >= NTYPES (the maximum !> number of matrix types), then all the different types are !> generated for testing. If NMATS < NTYPES, another input line !> is read to get the numbers of the matrix types to be used. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, dimension (4) !> On entry, the seed of the random number generator. The array !> elements should be between 0 and 4095, otherwise they will be !> reduced mod 4096, and ISEED(4) must be odd. !> On exit, the next seed in the random number sequence after !> all the test matrices have been generated. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> The threshold value for the test ratios. A result is !> included in the output file if RESULT >= THRESH. To have !> every test ratio printed, use THRESH = 0. !> |
| [in] | NMAX | !> NMAX is INTEGER !> The maximum value permitted for M or N, used in dimensioning !> the work arrays. !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | AF | !> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | AQ | !> AQ is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | AR | !> AR is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | TAUA | !> TAUA is DOUBLE PRECISION array, dimension (NMAX) !> |
| [out] | B | !> B is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | BF | !> BF is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | BZ | !> BZ is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | BT | !> BT is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | BWK | !> BWK is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | TAUB | !> TAUB is DOUBLE PRECISION array, dimension (NMAX) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (NMAX) !> |
| [in] | NIN | !> NIN is INTEGER !> The unit number for input. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The unit number for output. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0 : successful exit !> > 0 : If DLATMS returns an error code, the absolute value !> of it is returned. !> |
Definition at line 207 of file dckgqr.f.
| subroutine dckgsv | ( | integer | nm, |
| integer, dimension( * ) | mval, | ||
| integer, dimension( * ) | pval, | ||
| integer, dimension( * ) | nval, | ||
| integer | nmats, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nmax, | ||
| double precision, dimension( * ) | a, | ||
| double precision, dimension( * ) | af, | ||
| double precision, dimension( * ) | b, | ||
| double precision, dimension( * ) | bf, | ||
| double precision, dimension( * ) | u, | ||
| double precision, dimension( * ) | v, | ||
| double precision, dimension( * ) | q, | ||
| double precision, dimension( * ) | alpha, | ||
| double precision, dimension( * ) | beta, | ||
| double precision, dimension( * ) | r, | ||
| integer, dimension( * ) | iwork, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( * ) | rwork, | ||
| integer | nin, | ||
| integer | nout, | ||
| integer | info ) |
DCKGSV
!> !> DCKGSV tests DGGSVD: !> the GSVD for M-by-N matrix A and P-by-N matrix B. !>
| [in] | NM | !> NM is INTEGER !> The number of values of M contained in the vector MVAL. !> |
| [in] | MVAL | !> MVAL is INTEGER array, dimension (NM) !> The values of the matrix row dimension M. !> |
| [in] | PVAL | !> PVAL is INTEGER array, dimension (NP) !> The values of the matrix row dimension P. !> |
| [in] | NVAL | !> NVAL is INTEGER array, dimension (NN) !> The values of the matrix column dimension N. !> |
| [in] | NMATS | !> NMATS is INTEGER !> The number of matrix types to be tested for each combination !> of matrix dimensions. If NMATS >= NTYPES (the maximum !> number of matrix types), then all the different types are !> generated for testing. If NMATS < NTYPES, another input line !> is read to get the numbers of the matrix types to be used. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, dimension (4) !> On entry, the seed of the random number generator. The array !> elements should be between 0 and 4095, otherwise they will be !> reduced mod 4096, and ISEED(4) must be odd. !> On exit, the next seed in the random number sequence after !> all the test matrices have been generated. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> The threshold value for the test ratios. A result is !> included in the output file if RESULT >= THRESH. To have !> every test ratio printed, use THRESH = 0. !> |
| [in] | NMAX | !> NMAX is INTEGER !> The maximum value permitted for M or N, used in dimensioning !> the work arrays. !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | AF | !> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | B | !> B is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | BF | !> BF is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | U | !> U is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | V | !> V is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | ALPHA | !> ALPHA is DOUBLE PRECISION array, dimension (NMAX) !> |
| [out] | BETA | !> BETA is DOUBLE PRECISION array, dimension (NMAX) !> |
| [out] | R | !> R is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (NMAX) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (NMAX) !> |
| [in] | NIN | !> NIN is INTEGER !> The unit number for input. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The unit number for output. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0 : successful exit !> > 0 : If DLATMS returns an error code, the absolute value !> of it is returned. !> |
Definition at line 195 of file dckgsv.f.
| subroutine dcklse | ( | integer | nn, |
| integer, dimension( * ) | mval, | ||
| integer, dimension( * ) | pval, | ||
| integer, dimension( * ) | nval, | ||
| integer | nmats, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nmax, | ||
| double precision, dimension( * ) | a, | ||
| double precision, dimension( * ) | af, | ||
| double precision, dimension( * ) | b, | ||
| double precision, dimension( * ) | bf, | ||
| double precision, dimension( * ) | x, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( * ) | rwork, | ||
| integer | nin, | ||
| integer | nout, | ||
| integer | info ) |
DCKLSE
!> !> DCKLSE tests DGGLSE - a subroutine for solving linear equality !> constrained least square problem (LSE). !>
| [in] | NN | !> NN is INTEGER !> The number of values of (M,P,N) contained in the vectors !> (MVAL, PVAL, NVAL). !> |
| [in] | MVAL | !> MVAL is INTEGER array, dimension (NN) !> The values of the matrix row(column) dimension M. !> |
| [in] | PVAL | !> PVAL is INTEGER array, dimension (NN) !> The values of the matrix row(column) dimension P. !> |
| [in] | NVAL | !> NVAL is INTEGER array, dimension (NN) !> The values of the matrix column(row) dimension N. !> |
| [in] | NMATS | !> NMATS is INTEGER !> The number of matrix types to be tested for each combination !> of matrix dimensions. If NMATS >= NTYPES (the maximum !> number of matrix types), then all the different types are !> generated for testing. If NMATS < NTYPES, another input line !> is read to get the numbers of the matrix types to be used. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, dimension (4) !> On entry, the seed of the random number generator. The array !> elements should be between 0 and 4095, otherwise they will be !> reduced mod 4096, and ISEED(4) must be odd. !> On exit, the next seed in the random number sequence after !> all the test matrices have been generated. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> The threshold value for the test ratios. A result is !> included in the output file if RESULT >= THRESH. To have !> every test ratio printed, use THRESH = 0. !> |
| [in] | NMAX | !> NMAX is INTEGER !> The maximum value permitted for M or N, used in dimensioning !> the work arrays. !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | AF | !> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | B | !> B is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | BF | !> BF is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | X | !> X is DOUBLE PRECISION array, dimension (5*NMAX) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX) !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (NMAX) !> |
| [in] | NIN | !> NIN is INTEGER !> The unit number for input. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The unit number for output. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0 : successful exit !> > 0 : If DLATMS returns an error code, the absolute value !> of it is returned. !> |
Definition at line 164 of file dcklse.f.
| subroutine dcsdts | ( | integer | m, |
| integer | p, | ||
| integer | q, | ||
| double precision, dimension( ldx, * ) | x, | ||
| double precision, dimension( ldx, * ) | xf, | ||
| integer | ldx, | ||
| double precision, dimension( ldu1, * ) | u1, | ||
| integer | ldu1, | ||
| double precision, dimension( ldu2, * ) | u2, | ||
| integer | ldu2, | ||
| double precision, dimension( ldv1t, * ) | v1t, | ||
| integer | ldv1t, | ||
| double precision, dimension( ldv2t, * ) | v2t, | ||
| integer | ldv2t, | ||
| double precision, dimension( * ) | theta, | ||
| integer, dimension( * ) | iwork, | ||
| double precision, dimension( lwork ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | rwork, | ||
| double precision, dimension( 15 ) | result ) |
DCSDTS
!> !> DCSDTS tests DORCSD, which, given an M-by-M partitioned orthogonal !> matrix X, !> Q M-Q !> X = [ X11 X12 ] P , !> [ X21 X22 ] M-P !> !> computes the CSD !> !> [ U1 ]**T * [ X11 X12 ] * [ V1 ] !> [ U2 ] [ X21 X22 ] [ V2 ] !> !> [ I 0 0 | 0 0 0 ] !> [ 0 C 0 | 0 -S 0 ] !> [ 0 0 0 | 0 0 -I ] !> = [---------------------] = [ D11 D12 ] , !> [ 0 0 0 | I 0 0 ] [ D21 D22 ] !> [ 0 S 0 | 0 C 0 ] !> [ 0 0 I | 0 0 0 ] !> !> and also DORCSD2BY1, which, given !> Q !> [ X11 ] P , !> [ X21 ] M-P !> !> computes the 2-by-1 CSD !> !> [ I 0 0 ] !> [ 0 C 0 ] !> [ 0 0 0 ] !> [ U1 ]**T * [ X11 ] * V1 = [----------] = [ D11 ] , !> [ U2 ] [ X21 ] [ 0 0 0 ] [ D21 ] !> [ 0 S 0 ] !> [ 0 0 I ] !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrix X. M >= 0. !> |
| [in] | P | !> P is INTEGER !> The number of rows of the matrix X11. P >= 0. !> |
| [in] | Q | !> Q is INTEGER !> The number of columns of the matrix X11. Q >= 0. !> |
| [in] | X | !> X is DOUBLE PRECISION array, dimension (LDX,M) !> The M-by-M matrix X. !> |
| [out] | XF | !> XF is DOUBLE PRECISION array, dimension (LDX,M) !> Details of the CSD of X, as returned by DORCSD; !> see DORCSD for further details. !> |
| [in] | LDX | !> LDX is INTEGER !> The leading dimension of the arrays X and XF. !> LDX >= max( 1,M ). !> |
| [out] | U1 | !> U1 is DOUBLE PRECISION array, dimension(LDU1,P) !> The P-by-P orthogonal matrix U1. !> |
| [in] | LDU1 | !> LDU1 is INTEGER !> The leading dimension of the array U1. LDU >= max(1,P). !> |
| [out] | U2 | !> U2 is DOUBLE PRECISION array, dimension(LDU2,M-P) !> The (M-P)-by-(M-P) orthogonal matrix U2. !> |
| [in] | LDU2 | !> LDU2 is INTEGER !> The leading dimension of the array U2. LDU >= max(1,M-P). !> |
| [out] | V1T | !> V1T is DOUBLE PRECISION array, dimension(LDV1T,Q) !> The Q-by-Q orthogonal matrix V1T. !> |
| [in] | LDV1T | !> LDV1T is INTEGER !> The leading dimension of the array V1T. LDV1T >= !> max(1,Q). !> |
| [out] | V2T | !> V2T is DOUBLE PRECISION array, dimension(LDV2T,M-Q) !> The (M-Q)-by-(M-Q) orthogonal matrix V2T. !> |
| [in] | LDV2T | !> LDV2T is INTEGER !> The leading dimension of the array V2T. LDV2T >= !> max(1,M-Q). !> |
| [out] | THETA | !> THETA is DOUBLE PRECISION array, dimension MIN(P,M-P,Q,M-Q) !> The CS values of X; the essentially diagonal matrices C and !> S are constructed from THETA; see subroutine DORCSD for !> details. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (M) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (15) !> The test ratios: !> First, the 2-by-2 CSD: !> RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 ) !> RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 ) !> RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 ) !> RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 ) !> RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP ) !> RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP ) !> RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP ) !> RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP ) !> RESULT(9) = 0 if THETA is in increasing order and !> all angles are in [0,pi/2] !> = ULPINV otherwise. !> Then, the 2-by-1 CSD: !> RESULT(10) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 ) !> RESULT(11) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 ) !> RESULT(12) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP ) !> RESULT(13) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP ) !> RESULT(14) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP ) !> RESULT(15) = 0 if THETA is in increasing order and !> all angles are in [0,pi/2] !> = ULPINV otherwise. !> ( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). ) !> |
Definition at line 226 of file dcsdts.f.
| subroutine ddrges | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | b, | ||
| double precision, dimension( lda, * ) | s, | ||
| double precision, dimension( lda, * ) | t, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( ldq, * ) | z, | ||
| double precision, dimension( * ) | alphar, | ||
| double precision, dimension( * ) | alphai, | ||
| double precision, dimension( * ) | beta, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( 13 ) | result, | ||
| logical, dimension( * ) | bwork, | ||
| integer | info ) |
DDRGES
!> !> DDRGES checks the nonsymmetric generalized eigenvalue (Schur form) !> problem driver DGGES. !> !> DGGES factors A and B as Q S Z' and Q T Z' , where ' means !> transpose, T is upper triangular, S is in generalized Schur form !> (block upper triangular, with 1x1 and 2x2 blocks on the diagonal, !> the 2x2 blocks corresponding to complex conjugate pairs of !> generalized eigenvalues), and Q and Z are orthogonal. It also !> computes the generalized eigenvalues (alpha(j),beta(j)), j=1,...,n, !> Thus, w(j) = alpha(j)/beta(j) is a root of the characteristic !> equation !> det( A - w(j) B ) = 0 !> Optionally it also reorder the eigenvalues so that a selected !> cluster of eigenvalues appears in the leading diagonal block of the !> Schur forms. !> !> When DDRGES is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each TYPE of matrix, a pair of matrices (A, B) will be generated !> and used for testing. For each matrix pair, the following 13 tests !> will be performed and compared with the threshold THRESH except !> the tests (5), (11) and (13). !> !> !> (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues) !> !> !> (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues) !> !> !> (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues) !> !> !> (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues) !> !> (5) if A is in Schur form (i.e. quasi-triangular form) !> (no sorting of eigenvalues) !> !> (6) if eigenvalues = diagonal blocks of the Schur form (S, T), !> i.e., test the maximum over j of D(j) where: !> !> if alpha(j) is real: !> |alpha(j) - S(j,j)| |beta(j) - T(j,j)| !> D(j) = ------------------------ + ----------------------- !> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|) !> !> if alpha(j) is complex: !> | det( s S - w T ) | !> D(j) = --------------------------------------------------- !> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T ) !> !> and S and T are here the 2 x 2 diagonal blocks of S and T !> corresponding to the j-th and j+1-th eigenvalues. !> (no sorting of eigenvalues) !> !> (7) | (A,B) - Q (S,T) Z' | / ( | (A,B) | n ulp ) !> (with sorting of eigenvalues). !> !> (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues). !> !> (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues). !> !> (10) if A is in Schur form (i.e. quasi-triangular form) !> (with sorting of eigenvalues). !> !> (11) if eigenvalues = diagonal blocks of the Schur form (S, T), !> i.e. test the maximum over j of D(j) where: !> !> if alpha(j) is real: !> |alpha(j) - S(j,j)| |beta(j) - T(j,j)| !> D(j) = ------------------------ + ----------------------- !> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|) !> !> if alpha(j) is complex: !> | det( s S - w T ) | !> D(j) = --------------------------------------------------- !> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T ) !> !> and S and T are here the 2 x 2 diagonal blocks of S and T !> corresponding to the j-th and j+1-th eigenvalues. !> (with sorting of eigenvalues). !> !> (12) if sorting worked and SDIM is the number of eigenvalues !> which were SELECTed. !> !> Test Matrices !> ============= !> !> The sizes of the test matrices are specified by an array !> NN(1:NSIZES); the value of each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); if !> DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) ( 0, 0 ) (a pair of zero matrices) !> !> (2) ( I, 0 ) (an identity and a zero matrix) !> !> (3) ( 0, I ) (an identity and a zero matrix) !> !> (4) ( I, I ) (a pair of identity matrices) !> !> t t !> (5) ( J , J ) (a pair of transposed Jordan blocks) !> !> t ( I 0 ) !> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t ) !> ( 0 I ) ( 0 J ) !> and I is a k x k identity and J a (k+1)x(k+1) !> Jordan block; k=(N-1)/2 !> !> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal !> matrix with those diagonal entries.) !> (8) ( I, D ) !> !> (9) ( big*D, small*I ) where is near overflow and small=1/big !> !> (10) ( small*D, big*I ) !> !> (11) ( big*I, small*D ) !> !> (12) ( small*I, big*D ) !> !> (13) ( big*D, big*I ) !> !> (14) ( small*D, small*I ) !> !> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and !> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 ) !> t t !> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices. !> !> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices !> with random O(1) entries above the diagonal !> and diagonal entries diag(T1) = !> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) = !> ( 0, N-3, N-4,..., 1, 0, 0 ) !> !> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 ) !> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 ) !> s = machine precision. !> !> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 ) !> !> N-5 !> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> !> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> where r1,..., r(N-4) are random. !> !> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular !> matrices. !> !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DDRGES does nothing. NSIZES >= 0. !> |
| [in] | NN | !> NN is INTEGER array, dimension (NSIZES) !> An array containing the sizes to be used for the matrices. !> Zero values will be skipped. NN >= 0. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DDRGES !> 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 on input. !> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DDRGES to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. THRESH >= 0. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, !> dimension(LDA, max(NN)) !> Used to hold the original A matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, B, S, and T. !> It must be at least 1 and at least max( NN ). !> |
| [in,out] | B | !> B is DOUBLE PRECISION array, !> dimension(LDA, max(NN)) !> Used to hold the original B matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [out] | S | !> S is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The Schur form matrix computed from A by DGGES. On exit, S !> contains the Schur form matrix corresponding to the matrix !> in A. !> |
| [out] | T | !> T is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The upper triangular matrix computed from B by DGGES. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ, max(NN)) !> The (left) orthogonal matrix computed by DGGES. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of Q and Z. It must !> be at least 1 and at least max( NN ). !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension( LDQ, max(NN) ) !> The (right) orthogonal matrix computed by DGGES. !> |
| [out] | ALPHAR | !> ALPHAR is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | ALPHAI | !> ALPHAI is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | BETA | !> BETA is DOUBLE PRECISION array, dimension (max(NN)) !> !> The generalized eigenvalues of (A,B) computed by DGGES. !> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th !> generalized eigenvalue of A and B. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK. !> LWORK >= MAX( 10*(N+1), 3*N*N ), where N is the largest !> matrix dimension. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (15) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid overflow. !> |
| [out] | BWORK | !> BWORK is LOGICAL array, dimension (N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: A routine returned an error code. INFO is the !> absolute value of the INFO value returned. !> |
Definition at line 399 of file ddrges.f.
| subroutine ddrges3 | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | b, | ||
| double precision, dimension( lda, * ) | s, | ||
| double precision, dimension( lda, * ) | t, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( ldq, * ) | z, | ||
| double precision, dimension( * ) | alphar, | ||
| double precision, dimension( * ) | alphai, | ||
| double precision, dimension( * ) | beta, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( 13 ) | result, | ||
| logical, dimension( * ) | bwork, | ||
| integer | info ) |
DDRGES3
!> !> DDRGES3 checks the nonsymmetric generalized eigenvalue (Schur form) !> problem driver DGGES3. !> !> DGGES3 factors A and B as Q S Z' and Q T Z' , where ' means !> transpose, T is upper triangular, S is in generalized Schur form !> (block upper triangular, with 1x1 and 2x2 blocks on the diagonal, !> the 2x2 blocks corresponding to complex conjugate pairs of !> generalized eigenvalues), and Q and Z are orthogonal. It also !> computes the generalized eigenvalues (alpha(j),beta(j)), j=1,...,n, !> Thus, w(j) = alpha(j)/beta(j) is a root of the characteristic !> equation !> det( A - w(j) B ) = 0 !> Optionally it also reorder the eigenvalues so that a selected !> cluster of eigenvalues appears in the leading diagonal block of the !> Schur forms. !> !> When DDRGES3 is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each TYPE of matrix, a pair of matrices (A, B) will be generated !> and used for testing. For each matrix pair, the following 13 tests !> will be performed and compared with the threshold THRESH except !> the tests (5), (11) and (13). !> !> !> (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues) !> !> !> (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues) !> !> !> (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues) !> !> !> (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues) !> !> (5) if A is in Schur form (i.e. quasi-triangular form) !> (no sorting of eigenvalues) !> !> (6) if eigenvalues = diagonal blocks of the Schur form (S, T), !> i.e., test the maximum over j of D(j) where: !> !> if alpha(j) is real: !> |alpha(j) - S(j,j)| |beta(j) - T(j,j)| !> D(j) = ------------------------ + ----------------------- !> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|) !> !> if alpha(j) is complex: !> | det( s S - w T ) | !> D(j) = --------------------------------------------------- !> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T ) !> !> and S and T are here the 2 x 2 diagonal blocks of S and T !> corresponding to the j-th and j+1-th eigenvalues. !> (no sorting of eigenvalues) !> !> (7) | (A,B) - Q (S,T) Z' | / ( | (A,B) | n ulp ) !> (with sorting of eigenvalues). !> !> (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues). !> !> (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues). !> !> (10) if A is in Schur form (i.e. quasi-triangular form) !> (with sorting of eigenvalues). !> !> (11) if eigenvalues = diagonal blocks of the Schur form (S, T), !> i.e. test the maximum over j of D(j) where: !> !> if alpha(j) is real: !> |alpha(j) - S(j,j)| |beta(j) - T(j,j)| !> D(j) = ------------------------ + ----------------------- !> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|) !> !> if alpha(j) is complex: !> | det( s S - w T ) | !> D(j) = --------------------------------------------------- !> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T ) !> !> and S and T are here the 2 x 2 diagonal blocks of S and T !> corresponding to the j-th and j+1-th eigenvalues. !> (with sorting of eigenvalues). !> !> (12) if sorting worked and SDIM is the number of eigenvalues !> which were SELECTed. !> !> Test Matrices !> ============= !> !> The sizes of the test matrices are specified by an array !> NN(1:NSIZES); the value of each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); if !> DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) ( 0, 0 ) (a pair of zero matrices) !> !> (2) ( I, 0 ) (an identity and a zero matrix) !> !> (3) ( 0, I ) (an identity and a zero matrix) !> !> (4) ( I, I ) (a pair of identity matrices) !> !> t t !> (5) ( J , J ) (a pair of transposed Jordan blocks) !> !> t ( I 0 ) !> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t ) !> ( 0 I ) ( 0 J ) !> and I is a k x k identity and J a (k+1)x(k+1) !> Jordan block; k=(N-1)/2 !> !> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal !> matrix with those diagonal entries.) !> (8) ( I, D ) !> !> (9) ( big*D, small*I ) where is near overflow and small=1/big !> !> (10) ( small*D, big*I ) !> !> (11) ( big*I, small*D ) !> !> (12) ( small*I, big*D ) !> !> (13) ( big*D, big*I ) !> !> (14) ( small*D, small*I ) !> !> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and !> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 ) !> t t !> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices. !> !> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices !> with random O(1) entries above the diagonal !> and diagonal entries diag(T1) = !> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) = !> ( 0, N-3, N-4,..., 1, 0, 0 ) !> !> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 ) !> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 ) !> s = machine precision. !> !> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 ) !> !> N-5 !> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> !> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> where r1,..., r(N-4) are random. !> !> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular !> matrices. !> !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DDRGES3 does nothing. NSIZES >= 0. !> |
| [in] | NN | !> NN is INTEGER array, dimension (NSIZES) !> An array containing the sizes to be used for the matrices. !> Zero values will be skipped. NN >= 0. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DDRGES3 !> 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 on input. !> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DDRGES3 to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. THRESH >= 0. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, !> dimension(LDA, max(NN)) !> Used to hold the original A matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, B, S, and T. !> It must be at least 1 and at least max( NN ). !> |
| [in,out] | B | !> B is DOUBLE PRECISION array, !> dimension(LDA, max(NN)) !> Used to hold the original B matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [out] | S | !> S is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The Schur form matrix computed from A by DGGES3. On exit, S !> contains the Schur form matrix corresponding to the matrix !> in A. !> |
| [out] | T | !> T is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> The upper triangular matrix computed from B by DGGES3. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ, max(NN)) !> The (left) orthogonal matrix computed by DGGES3. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of Q and Z. It must !> be at least 1 and at least max( NN ). !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension( LDQ, max(NN) ) !> The (right) orthogonal matrix computed by DGGES3. !> |
| [out] | ALPHAR | !> ALPHAR is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | ALPHAI | !> ALPHAI is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | BETA | !> BETA is DOUBLE PRECISION array, dimension (max(NN)) !> !> The generalized eigenvalues of (A,B) computed by DGGES3. !> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th !> generalized eigenvalue of A and B. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK. !> LWORK >= MAX( 10*(N+1), 3*N*N ), where N is the largest !> matrix dimension. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (15) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid overflow. !> |
| [out] | BWORK | !> BWORK is LOGICAL array, dimension (N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: A routine returned an error code. INFO is the !> absolute value of the INFO value returned. !> |
Definition at line 399 of file ddrges3.f.
| subroutine ddrgev | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | b, | ||
| double precision, dimension( lda, * ) | s, | ||
| double precision, dimension( lda, * ) | t, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( ldq, * ) | z, | ||
| double precision, dimension( ldqe, * ) | qe, | ||
| integer | ldqe, | ||
| double precision, dimension( * ) | alphar, | ||
| double precision, dimension( * ) | alphai, | ||
| double precision, dimension( * ) | beta, | ||
| double precision, dimension( * ) | alphr1, | ||
| double precision, dimension( * ) | alphi1, | ||
| double precision, dimension( * ) | beta1, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DDRGEV
!> !> DDRGEV checks the nonsymmetric generalized eigenvalue problem driver !> routine DGGEV. !> !> DGGEV computes for a pair of n-by-n nonsymmetric matrices (A,B) the !> generalized eigenvalues and, optionally, the left and right !> eigenvectors. !> !> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w !> or a ratio alpha/beta = w, such that A - w*B is singular. It is !> usually represented as the pair (alpha,beta), as there is reasonable !> interpretation for beta=0, and even for both being zero. !> !> A right generalized eigenvector corresponding to a generalized !> eigenvalue w for a pair of matrices (A,B) is a vector r such that !> (A - wB) * r = 0. A left generalized eigenvector is a vector l such !> that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l. !> !> When DDRGEV is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, a pair of matrices (A, B) will be generated !> and used for testing. For each matrix pair, the following tests !> will be performed and compared with the threshold THRESH. !> !> Results from DGGEV: !> !> (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of !> !> | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) ) !> !> where VL**H is the conjugate-transpose of VL. !> !> (2) | |VL(i)| - 1 | / ulp and whether largest component real !> !> VL(i) denotes the i-th column of VL. !> !> (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of !> !> | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) ) !> !> (4) | |VR(i)| - 1 | / ulp and whether largest component real !> !> VR(i) denotes the i-th column of VR. !> !> (5) W(full) = W(partial) !> W(full) denotes the eigenvalues computed when both l and r !> are also computed, and W(partial) denotes the eigenvalues !> computed when only W, only W and r, or only W and l are !> computed. !> !> (6) VL(full) = VL(partial) !> VL(full) denotes the left eigenvectors computed when both l !> and r are computed, and VL(partial) denotes the result !> when only l is computed. !> !> (7) VR(full) = VR(partial) !> VR(full) denotes the right eigenvectors computed when both l !> and r are also computed, and VR(partial) denotes the result !> when only l is computed. !> !> !> Test Matrices !> ---- -------- !> !> The sizes of the test matrices are specified by an array !> NN(1:NSIZES); the value of each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); if !> DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) ( 0, 0 ) (a pair of zero matrices) !> !> (2) ( I, 0 ) (an identity and a zero matrix) !> !> (3) ( 0, I ) (an identity and a zero matrix) !> !> (4) ( I, I ) (a pair of identity matrices) !> !> t t !> (5) ( J , J ) (a pair of transposed Jordan blocks) !> !> t ( I 0 ) !> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t ) !> ( 0 I ) ( 0 J ) !> and I is a k x k identity and J a (k+1)x(k+1) !> Jordan block; k=(N-1)/2 !> !> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal !> matrix with those diagonal entries.) !> (8) ( I, D ) !> !> (9) ( big*D, small*I ) where is near overflow and small=1/big !> !> (10) ( small*D, big*I ) !> !> (11) ( big*I, small*D ) !> !> (12) ( small*I, big*D ) !> !> (13) ( big*D, big*I ) !> !> (14) ( small*D, small*I ) !> !> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and !> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 ) !> t t !> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices. !> !> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices !> with random O(1) entries above the diagonal !> and diagonal entries diag(T1) = !> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) = !> ( 0, N-3, N-4,..., 1, 0, 0 ) !> !> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 ) !> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 ) !> s = machine precision. !> !> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 ) !> !> N-5 !> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> !> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> where r1,..., r(N-4) are random. !> !> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular !> matrices. !> !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DDRGES does nothing. NSIZES >= 0. !> |
| [in] | NN | !> NN is INTEGER array, dimension (NSIZES) !> An array containing the sizes to be used for the matrices. !> Zero values will be skipped. NN >= 0. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DDRGES !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DDRGES to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IERR not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, !> dimension(LDA, max(NN)) !> Used to hold the original A matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, B, S, and T. !> It must be at least 1 and at least max( NN ). !> |
| [in,out] | B | !> B is DOUBLE PRECISION array, !> dimension(LDA, max(NN)) !> Used to hold the original B matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [out] | S | !> S is DOUBLE PRECISION array, !> dimension (LDA, max(NN)) !> The Schur form matrix computed from A by DGGES. On exit, S !> contains the Schur form matrix corresponding to the matrix !> in A. !> |
| [out] | T | !> T is DOUBLE PRECISION array, !> dimension (LDA, max(NN)) !> The upper triangular matrix computed from B by DGGES. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, !> dimension (LDQ, max(NN)) !> The (left) eigenvectors matrix computed by DGGEV. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of Q and Z. It must !> be at least 1 and at least max( NN ). !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension( LDQ, max(NN) ) !> The (right) orthogonal matrix computed by DGGES. !> |
| [out] | QE | !> QE is DOUBLE PRECISION array, dimension( LDQ, max(NN) ) !> QE holds the computed right or left eigenvectors. !> |
| [in] | LDQE | !> LDQE is INTEGER !> The leading dimension of QE. LDQE >= max(1,max(NN)). !> |
| [out] | ALPHAR | !> ALPHAR is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | ALPHAI | !> ALPHAI is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | BETA | !> BETA is DOUBLE PRECISION array, dimension (max(NN)) !> !> The generalized eigenvalues of (A,B) computed by DGGEV. !> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th !> generalized eigenvalue of A and B. !> |
| [out] | ALPHR1 | !> ALPHR1 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | ALPHI1 | !> ALPHI1 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | BETA1 | !> BETA1 is DOUBLE PRECISION array, dimension (max(NN)) !> !> Like ALPHAR, ALPHAI, BETA, these arrays contain the !> eigenvalues of A and B, but those computed when DGGEV only !> computes a partial eigendecomposition, i.e. not the !> eigenvalues and left and right eigenvectors. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. LWORK >= MAX( 8*N, N*(N+1) ). !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid overflow. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: A routine returned an error code. INFO is the !> absolute value of the INFO value returned. !> |
Definition at line 404 of file ddrgev.f.
| subroutine ddrgev3 | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | b, | ||
| double precision, dimension( lda, * ) | s, | ||
| double precision, dimension( lda, * ) | t, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( ldq, * ) | z, | ||
| double precision, dimension( ldqe, * ) | qe, | ||
| integer | ldqe, | ||
| double precision, dimension( * ) | alphar, | ||
| double precision, dimension( * ) | alphai, | ||
| double precision, dimension( * ) | beta, | ||
| double precision, dimension( * ) | alphr1, | ||
| double precision, dimension( * ) | alphi1, | ||
| double precision, dimension( * ) | beta1, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DDRGEV3
!> !> DDRGEV3 checks the nonsymmetric generalized eigenvalue problem driver !> routine DGGEV3. !> !> DGGEV3 computes for a pair of n-by-n nonsymmetric matrices (A,B) the !> generalized eigenvalues and, optionally, the left and right !> eigenvectors. !> !> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w !> or a ratio alpha/beta = w, such that A - w*B is singular. It is !> usually represented as the pair (alpha,beta), as there is reasonable !> interpretation for beta=0, and even for both being zero. !> !> A right generalized eigenvector corresponding to a generalized !> eigenvalue w for a pair of matrices (A,B) is a vector r such that !> (A - wB) * r = 0. A left generalized eigenvector is a vector l such !> that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l. !> !> When DDRGEV3 is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, a pair of matrices (A, B) will be generated !> and used for testing. For each matrix pair, the following tests !> will be performed and compared with the threshold THRESH. !> !> Results from DGGEV3: !> !> (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of !> !> | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) ) !> !> where VL**H is the conjugate-transpose of VL. !> !> (2) | |VL(i)| - 1 | / ulp and whether largest component real !> !> VL(i) denotes the i-th column of VL. !> !> (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of !> !> | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) ) !> !> (4) | |VR(i)| - 1 | / ulp and whether largest component real !> !> VR(i) denotes the i-th column of VR. !> !> (5) W(full) = W(partial) !> W(full) denotes the eigenvalues computed when both l and r !> are also computed, and W(partial) denotes the eigenvalues !> computed when only W, only W and r, or only W and l are !> computed. !> !> (6) VL(full) = VL(partial) !> VL(full) denotes the left eigenvectors computed when both l !> and r are computed, and VL(partial) denotes the result !> when only l is computed. !> !> (7) VR(full) = VR(partial) !> VR(full) denotes the right eigenvectors computed when both l !> and r are also computed, and VR(partial) denotes the result !> when only l is computed. !> !> !> Test Matrices !> ---- -------- !> !> The sizes of the test matrices are specified by an array !> NN(1:NSIZES); the value of each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); if !> DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) ( 0, 0 ) (a pair of zero matrices) !> !> (2) ( I, 0 ) (an identity and a zero matrix) !> !> (3) ( 0, I ) (an identity and a zero matrix) !> !> (4) ( I, I ) (a pair of identity matrices) !> !> t t !> (5) ( J , J ) (a pair of transposed Jordan blocks) !> !> t ( I 0 ) !> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t ) !> ( 0 I ) ( 0 J ) !> and I is a k x k identity and J a (k+1)x(k+1) !> Jordan block; k=(N-1)/2 !> !> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal !> matrix with those diagonal entries.) !> (8) ( I, D ) !> !> (9) ( big*D, small*I ) where is near overflow and small=1/big !> !> (10) ( small*D, big*I ) !> !> (11) ( big*I, small*D ) !> !> (12) ( small*I, big*D ) !> !> (13) ( big*D, big*I ) !> !> (14) ( small*D, small*I ) !> !> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and !> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 ) !> t t !> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices. !> !> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices !> with random O(1) entries above the diagonal !> and diagonal entries diag(T1) = !> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) = !> ( 0, N-3, N-4,..., 1, 0, 0 ) !> !> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 ) !> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 ) !> s = machine precision. !> !> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 ) !> !> N-5 !> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> !> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 ) !> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 ) !> where r1,..., r(N-4) are random. !> !> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 ) !> diag(T2) = ( 0, 1, ..., 1, 0, 0 ) !> !> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular !> matrices. !> !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DDRGEV3 does nothing. NSIZES >= 0. !> |
| [in] | NN | !> NN is INTEGER array, dimension (NSIZES) !> An array containing the sizes to be used for the matrices. !> Zero values will be skipped. NN >= 0. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DDRGEV3 !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DDRGEV3 to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IERR not equal to 0.) !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, !> dimension(LDA, max(NN)) !> Used to hold the original A matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, B, S, and T. !> It must be at least 1 and at least max( NN ). !> |
| [in,out] | B | !> B is DOUBLE PRECISION array, !> dimension(LDA, max(NN)) !> Used to hold the original B matrix. Used as input only !> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and !> DOTYPE(MAXTYP+1)=.TRUE. !> |
| [out] | S | !> S is DOUBLE PRECISION array, !> dimension (LDA, max(NN)) !> The Schur form matrix computed from A by DGGEV3. On exit, S !> contains the Schur form matrix corresponding to the matrix !> in A. !> |
| [out] | T | !> T is DOUBLE PRECISION array, !> dimension (LDA, max(NN)) !> The upper triangular matrix computed from B by DGGEV3. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, !> dimension (LDQ, max(NN)) !> The (left) eigenvectors matrix computed by DGGEV3. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of Q and Z. It must !> be at least 1 and at least max( NN ). !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension( LDQ, max(NN) ) !> The (right) orthogonal matrix computed by DGGEV3. !> |
| [out] | QE | !> QE is DOUBLE PRECISION array, dimension( LDQ, max(NN) ) !> QE holds the computed right or left eigenvectors. !> |
| [in] | LDQE | !> LDQE is INTEGER !> The leading dimension of QE. LDQE >= max(1,max(NN)). !> |
| [out] | ALPHAR | !> ALPHAR is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | ALPHAI | !> ALPHAI is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | BETA | !> BETA is DOUBLE PRECISION array, dimension (max(NN)) !> !> The generalized eigenvalues of (A,B) computed by DGGEV3. !> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th !> generalized eigenvalue of A and B. !> |
| [out] | ALPHR1 | !> ALPHR1 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | ALPHI1 | !> ALPHI1 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | BETA1 | !> BETA1 is DOUBLE PRECISION array, dimension (max(NN)) !> !> Like ALPHAR, ALPHAI, BETA, these arrays contain the !> eigenvalues of A and B, but those computed when DGGEV3 only !> computes a partial eigendecomposition, i.e. not the !> eigenvalues and left and right eigenvectors. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. LWORK >= MAX( 8*N, N*(N+1) ). !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> The values computed by the tests described above. !> The values are currently limited to 1/ulp, to avoid overflow. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: A routine returned an error code. INFO is the !> absolute value of the INFO value returned. !> |
Definition at line 404 of file ddrgev3.f.
| subroutine ddrgsx | ( | integer | nsize, |
| integer | ncmax, | ||
| double precision | thresh, | ||
| integer | nin, | ||
| integer | nout, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | b, | ||
| double precision, dimension( lda, * ) | ai, | ||
| double precision, dimension( lda, * ) | bi, | ||
| double precision, dimension( lda, * ) | z, | ||
| double precision, dimension( lda, * ) | q, | ||
| double precision, dimension( * ) | alphar, | ||
| double precision, dimension( * ) | alphai, | ||
| double precision, dimension( * ) | beta, | ||
| double precision, dimension( ldc, * ) | c, | ||
| integer | ldc, | ||
| double precision, dimension( * ) | s, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| logical, dimension( * ) | bwork, | ||
| integer | info ) |
DDRGSX
!> !> DDRGSX checks the nonsymmetric generalized eigenvalue (Schur form) !> problem expert driver DGGESX. !> !> DGGESX factors A and B as Q S Z' and Q T Z', where ' means !> transpose, T is upper triangular, S is in generalized Schur form !> (block upper triangular, with 1x1 and 2x2 blocks on the diagonal, !> the 2x2 blocks corresponding to complex conjugate pairs of !> generalized eigenvalues), and Q and Z are orthogonal. It also !> computes the generalized eigenvalues (alpha(1),beta(1)), ..., !> (alpha(n),beta(n)). Thus, w(j) = alpha(j)/beta(j) is a root of the !> characteristic equation !> !> det( A - w(j) B ) = 0 !> !> Optionally it also reorders the eigenvalues so that a selected !> cluster of eigenvalues appears in the leading diagonal block of the !> Schur forms; computes a reciprocal condition number for the average !> of the selected eigenvalues; and computes a reciprocal condition !> number for the right and left deflating subspaces corresponding to !> the selected eigenvalues. !> !> When DDRGSX is called with NSIZE > 0, five (5) types of built-in !> matrix pairs are used to test the routine DGGESX. !> !> When DDRGSX is called with NSIZE = 0, it reads in test matrix data !> to test DGGESX. !> !> For each matrix pair, the following tests will be performed and !> compared with the threshold THRESH except for the tests (7) and (9): !> !> (1) | A - Q S Z' | / ( |A| n ulp ) !> !> (2) | B - Q T Z' | / ( |B| n ulp ) !> !> (3) | I - QQ' | / ( n ulp ) !> !> (4) | I - ZZ' | / ( n ulp ) !> !> (5) if A is in Schur form (i.e. quasi-triangular form) !> !> (6) maximum over j of D(j) where: !> !> if alpha(j) is real: !> |alpha(j) - S(j,j)| |beta(j) - T(j,j)| !> D(j) = ------------------------ + ----------------------- !> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|) !> !> if alpha(j) is complex: !> | det( s S - w T ) | !> D(j) = --------------------------------------------------- !> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T ) !> !> and S and T are here the 2 x 2 diagonal blocks of S and T !> corresponding to the j-th and j+1-th eigenvalues. !> !> (7) if sorting worked and SDIM is the number of eigenvalues !> which were selected. !> !> (8) the estimated value DIF does not differ from the true values of !> Difu and Difl more than a factor 10*THRESH. If the estimate DIF !> equals zero the corresponding true values of Difu and Difl !> should be less than EPS*norm(A, B). If the true value of Difu !> and Difl equal zero, the estimate DIF should be less than !> EPS*norm(A, B). !> !> (9) If INFO = N+3 is returned by DGGESX, the reordering !> and we check that DIF = PL = PR = 0 and that the true value of !> Difu and Difl is < EPS*norm(A, B). We count the events when !> INFO=N+3. !> !> For read-in test matrices, the above tests are run except that the !> exact value for DIF (and PL) is input data. Additionally, there is !> one more test run for read-in test matrices: !> !> (10) the estimated value PL does not differ from the true value of !> PLTRU more than a factor THRESH. If the estimate PL equals !> zero the corresponding true value of PLTRU should be less than !> EPS*norm(A, B). If the true value of PLTRU equal zero, the !> estimate PL should be less than EPS*norm(A, B). !> !> Note that for the built-in tests, a total of 10*NSIZE*(NSIZE-1) !> matrix pairs are generated and tested. NSIZE should be kept small. !> !> SVD (routine DGESVD) is used for computing the true value of DIF_u !> and DIF_l when testing the built-in test problems. !> !> Built-in Test Matrices !> ====================== !> !> All built-in test matrices are the 2 by 2 block of triangular !> matrices !> !> A = [ A11 A12 ] and B = [ B11 B12 ] !> [ A22 ] [ B22 ] !> !> where for different type of A11 and A22 are given as the following. !> A12 and B12 are chosen so that the generalized Sylvester equation !> !> A11*R - L*A22 = -A12 !> B11*R - L*B22 = -B12 !> !> have prescribed solution R and L. !> !> Type 1: A11 = J_m(1,-1) and A_22 = J_k(1-a,1). !> B11 = I_m, B22 = I_k !> where J_k(a,b) is the k-by-k Jordan block with ``a'' on !> diagonal and ``b'' on superdiagonal. !> !> Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and !> B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m !> A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and !> B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k !> !> Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each !> second diagonal block in A_11 and each third diagonal block !> in A_22 are made as 2 by 2 blocks. !> !> Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) ) !> for i=1,...,m, j=1,...,m and !> A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) ) !> for i=m+1,...,k, j=m+1,...,k !> !> Type 5: (A,B) and have potentially close or common eigenvalues and !> very large departure from block diagonality A_11 is chosen !> as the m x m leading submatrix of A_1: !> | 1 b | !> | -b 1 | !> | 1+d b | !> | -b 1+d | !> A_1 = | d 1 | !> | -1 d | !> | -d 1 | !> | -1 -d | !> | 1 | !> and A_22 is chosen as the k x k leading submatrix of A_2: !> | -1 b | !> | -b -1 | !> | 1-d b | !> | -b 1-d | !> A_2 = | d 1+b | !> | -1-b d | !> | -d 1+b | !> | -1+b -d | !> | 1-d | !> and matrix B are chosen as identity matrices (see DLATM5). !> !>
| [in] | NSIZE | !> NSIZE is INTEGER !> The maximum size of the matrices to use. NSIZE >= 0. !> If NSIZE = 0, no built-in tests matrices are used, but !> read-in test matrices are used to test DGGESX. !> |
| [in] | NCMAX | !> NCMAX is INTEGER !> Maximum allowable NMAX for generating Kroneker matrix !> in call to DLAKF2 !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. THRESH >= 0. !> |
| [in] | NIN | !> NIN is INTEGER !> The FORTRAN unit number for reading in the data file of !> problems to solve. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Used to store the matrix whose eigenvalues are to be !> computed. On exit, A contains the last matrix actually used. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, B, AI, BI, Z and Q, !> LDA >= max( 1, NSIZE ). For the read-in test, !> LDA >= max( 1, N ), N is the size of the test matrices. !> |
| [out] | B | !> B is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Used to store the matrix whose eigenvalues are to be !> computed. On exit, B contains the last matrix actually used. !> |
| [out] | AI | !> AI is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Copy of A, modified by DGGESX. !> |
| [out] | BI | !> BI is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Copy of B, modified by DGGESX. !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Z holds the left Schur vectors computed by DGGESX. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Q holds the right Schur vectors computed by DGGESX. !> |
| [out] | ALPHAR | !> ALPHAR is DOUBLE PRECISION array, dimension (NSIZE) !> |
| [out] | ALPHAI | !> ALPHAI is DOUBLE PRECISION array, dimension (NSIZE) !> |
| [out] | BETA | !> BETA is DOUBLE PRECISION array, dimension (NSIZE) !> !> On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues. !> |
| [out] | C | !> C is DOUBLE PRECISION array, dimension (LDC, LDC) !> Store the matrix generated by subroutine DLAKF2, this is the !> matrix formed by Kronecker products used for estimating !> DIF. !> |
| [in] | LDC | !> LDC is INTEGER !> The leading dimension of C. LDC >= max(1, LDA*LDA/2 ). !> |
| [out] | S | !> S is DOUBLE PRECISION array, dimension (LDC) !> Singular values of C !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK. !> LWORK >= MAX( 5*NSIZE*NSIZE/2 - 2, 10*(NSIZE+1) ) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (LIWORK) !> |
| [in] | LIWORK | !> LIWORK is INTEGER !> The dimension of the array IWORK. LIWORK >= NSIZE + 6. !> |
| [out] | BWORK | !> BWORK is LOGICAL array, dimension (LDA) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: A routine returned an error code. !> |
Definition at line 356 of file ddrgsx.f.
| subroutine ddrgvx | ( | integer | nsize, |
| double precision | thresh, | ||
| integer | nin, | ||
| integer | nout, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | b, | ||
| double precision, dimension( lda, * ) | ai, | ||
| double precision, dimension( lda, * ) | bi, | ||
| double precision, dimension( * ) | alphar, | ||
| double precision, dimension( * ) | alphai, | ||
| double precision, dimension( * ) | beta, | ||
| double precision, dimension( lda, * ) | vl, | ||
| double precision, dimension( lda, * ) | vr, | ||
| integer | ilo, | ||
| integer | ihi, | ||
| double precision, dimension( * ) | lscale, | ||
| double precision, dimension( * ) | rscale, | ||
| double precision, dimension( * ) | s, | ||
| double precision, dimension( * ) | dtru, | ||
| double precision, dimension( * ) | dif, | ||
| double precision, dimension( * ) | diftru, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| double precision, dimension( 4 ) | result, | ||
| logical, dimension( * ) | bwork, | ||
| integer | info ) |
DDRGVX
!>
!> DDRGVX checks the nonsymmetric generalized eigenvalue problem
!> expert driver DGGEVX.
!>
!> DGGEVX computes the generalized eigenvalues, (optionally) the left
!> and/or right eigenvectors, (optionally) computes a balancing
!> transformation to improve the conditioning, and (optionally)
!> reciprocal condition numbers for the eigenvalues and eigenvectors.
!>
!> When DDRGVX is called with NSIZE > 0, two types of test matrix pairs
!> are generated by the subroutine DLATM6 and test the driver DGGEVX.
!> The test matrices have the known exact condition numbers for
!> eigenvalues. For the condition numbers of the eigenvectors
!> corresponding the first and last eigenvalues are also know
!> ``exactly'' (see DLATM6).
!>
!> For each matrix pair, the following tests will be performed and
!> compared with the threshold THRESH.
!>
!> (1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
!>
!> | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
!>
!> where l**H is the conjugate tranpose of l.
!>
!> (2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
!>
!> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
!>
!> (3) The condition number S(i) of eigenvalues computed by DGGEVX
!> differs less than a factor THRESH from the exact S(i) (see
!> DLATM6).
!>
!> (4) DIF(i) computed by DTGSNA differs less than a factor 10*THRESH
!> from the exact value (for the 1st and 5th vectors only).
!>
!> Test Matrices
!> =============
!>
!> Two kinds of test matrix pairs
!>
!> (A, B) = inverse(YH) * (Da, Db) * inverse(X)
!>
!> are used in the tests:
!>
!> 1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
!> 0 2+a 0 0 0 0 1 0 0 0
!> 0 0 3+a 0 0 0 0 1 0 0
!> 0 0 0 4+a 0 0 0 0 1 0
!> 0 0 0 0 5+a , 0 0 0 0 1 , and
!>
!> 2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
!> 1 1 0 0 0 0 1 0 0 0
!> 0 0 1 0 0 0 0 1 0 0
!> 0 0 0 1+a 1+b 0 0 0 1 0
!> 0 0 0 -1-b 1+a , 0 0 0 0 1 .
!>
!> In both cases the same inverse(YH) and inverse(X) are used to compute
!> (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
!>
!> YH: = 1 0 -y y -y X = 1 0 -x -x x
!> 0 1 -y y -y 0 1 x -x -x
!> 0 0 1 0 0 0 0 1 0 0
!> 0 0 0 1 0 0 0 0 1 0
!> 0 0 0 0 1, 0 0 0 0 1 , where
!>
!> a, b, x and y will have all values independently of each other from
!> { sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
!> | [in] | NSIZE | !> NSIZE is INTEGER !> The number of sizes of matrices to use. NSIZE must be at !> least zero. If it is zero, no randomly generated matrices !> are tested, but any test matrices read from NIN will be !> tested. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NIN | !> NIN is INTEGER !> The FORTRAN unit number for reading in the data file of !> problems to solve. !> |
| [in] | NOUT | !> NOUT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Used to hold the matrix whose eigenvalues are to be !> computed. On exit, A contains the last matrix actually used. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, B, AI, BI, Ao, and Bo. !> It must be at least 1 and at least NSIZE. !> |
| [out] | B | !> B is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Used to hold the matrix whose eigenvalues are to be !> computed. On exit, B contains the last matrix actually used. !> |
| [out] | AI | !> AI is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Copy of A, modified by DGGEVX. !> |
| [out] | BI | !> BI is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> Copy of B, modified by DGGEVX. !> |
| [out] | ALPHAR | !> ALPHAR is DOUBLE PRECISION array, dimension (NSIZE) !> |
| [out] | ALPHAI | !> ALPHAI is DOUBLE PRECISION array, dimension (NSIZE) !> |
| [out] | BETA | !> BETA is DOUBLE PRECISION array, dimension (NSIZE) !> !> On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues. !> |
| [out] | VL | !> VL is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> VL holds the left eigenvectors computed by DGGEVX. !> |
| [out] | VR | !> VR is DOUBLE PRECISION array, dimension (LDA, NSIZE) !> VR holds the right eigenvectors computed by DGGEVX. !> |
| [out] | ILO | !> ILO is INTEGER !> |
| [out] | IHI | !> IHI is INTEGER !> |
| [out] | LSCALE | !> LSCALE is DOUBLE PRECISION array, dimension (N) !> |
| [out] | RSCALE | !> RSCALE is DOUBLE PRECISION array, dimension (N) !> |
| [out] | S | !> S is DOUBLE PRECISION array, dimension (N) !> |
| [out] | DTRU | !> DTRU is DOUBLE PRECISION array, dimension (N) !> |
| [out] | DIF | !> DIF is DOUBLE PRECISION array, dimension (N) !> |
| [out] | DIFTRU | !> DIFTRU is DOUBLE PRECISION array, dimension (N) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> Leading dimension of WORK. LWORK >= 2*N*N+12*N+16. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (LIWORK) !> |
| [in] | LIWORK | !> LIWORK is INTEGER !> Leading dimension of IWORK. Must be at least N+6. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (4) !> |
| [out] | BWORK | !> BWORK is LOGICAL array, dimension (N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: A routine returned an error code. !> |
Definition at line 296 of file ddrgvx.f.
| subroutine ddrvbd | ( | integer | nsizes, |
| integer, dimension( * ) | mm, | ||
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| double precision, dimension( lda, * ) | asav, | ||
| double precision, dimension( ldu, * ) | usav, | ||
| double precision, dimension( ldvt, * ) | vtsav, | ||
| double precision, dimension( * ) | s, | ||
| double precision, dimension( * ) | ssav, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | nout, | ||
| integer | info ) |
DDRVBD
!> !> DDRVBD checks the singular value decomposition (SVD) drivers !> DGESVD, DGESDD, DGESVDQ, DGESVJ, DGEJSV, and DGESVDX. !> !> Both DGESVD and DGESDD factor A = U diag(S) VT, where U and VT are !> orthogonal and diag(S) is diagonal with the entries of the array S !> on its diagonal. The entries of S are the singular values, !> nonnegative and stored in decreasing order. U and VT can be !> optionally not computed, overwritten on A, or computed partially. !> !> A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN. !> U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N. !> !> When DDRVBD is called, a number of matrix (M's and N's) !> and a number of matrix are specified. For each size (M,N) !> and each type of matrix, and for the minimal workspace as well as !> workspace adequate to permit blocking, an M x N matrix will be !> generated and used to test the SVD routines. For each matrix, A will !> be factored as A = U diag(S) VT and the following 12 tests computed: !> !> Test for DGESVD: !> !> (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp ) !> !> (2) | I - U'U | / ( M ulp ) !> !> (3) | I - VT VT' | / ( N ulp ) !> !> (4) S contains MNMIN nonnegative values in decreasing order. !> (Return 0 if true, 1/ULP if false.) !> !> (5) | U - Upartial | / ( M ulp ) where Upartial is a partially !> computed U. !> !> (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially !> computed VT. !> !> (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the !> vector of singular values from the partial SVD !> !> Test for DGESDD: !> !> (8) | A - U diag(S) VT | / ( |A| max(M,N) ulp ) !> !> (9) | I - U'U | / ( M ulp ) !> !> (10) | I - VT VT' | / ( N ulp ) !> !> (11) S contains MNMIN nonnegative values in decreasing order. !> (Return 0 if true, 1/ULP if false.) !> !> (12) | U - Upartial | / ( M ulp ) where Upartial is a partially !> computed U. !> !> (13) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially !> computed VT. !> !> (14) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the !> vector of singular values from the partial SVD !> !> Test for DGESVDQ: !> !> (36) | A - U diag(S) VT | / ( |A| max(M,N) ulp ) !> !> (37) | I - U'U | / ( M ulp ) !> !> (38) | I - VT VT' | / ( N ulp ) !> !> (39) S contains MNMIN nonnegative values in decreasing order. !> (Return 0 if true, 1/ULP if false.) !> !> Test for DGESVJ: !> !> (15) | A - U diag(S) VT | / ( |A| max(M,N) ulp ) !> !> (16) | I - U'U | / ( M ulp ) !> !> (17) | I - VT VT' | / ( N ulp ) !> !> (18) S contains MNMIN nonnegative values in decreasing order. !> (Return 0 if true, 1/ULP if false.) !> !> Test for DGEJSV: !> !> (19) | A - U diag(S) VT | / ( |A| max(M,N) ulp ) !> !> (20) | I - U'U | / ( M ulp ) !> !> (21) | I - VT VT' | / ( N ulp ) !> !> (22) S contains MNMIN nonnegative values in decreasing order. !> (Return 0 if true, 1/ULP if false.) !> !> Test for DGESVDX( 'V', 'V', 'A' )/DGESVDX( 'N', 'N', 'A' ) !> !> (23) | A - U diag(S) VT | / ( |A| max(M,N) ulp ) !> !> (24) | I - U'U | / ( M ulp ) !> !> (25) | I - VT VT' | / ( N ulp ) !> !> (26) S contains MNMIN nonnegative values in decreasing order. !> (Return 0 if true, 1/ULP if false.) !> !> (27) | U - Upartial | / ( M ulp ) where Upartial is a partially !> computed U. !> !> (28) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially !> computed VT. !> !> (29) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the !> vector of singular values from the partial SVD !> !> Test for DGESVDX( 'V', 'V', 'I' ) !> !> (30) | U' A VT''' - diag(S) | / ( |A| max(M,N) ulp ) !> !> (31) | I - U'U | / ( M ulp ) !> !> (32) | I - VT VT' | / ( N ulp ) !> !> Test for DGESVDX( 'V', 'V', 'V' ) !> !> (33) | U' A VT''' - diag(S) | / ( |A| max(M,N) ulp ) !> !> (34) | I - U'U | / ( M ulp ) !> !> (35) | I - VT VT' | / ( N ulp ) !> !> The are specified by the arrays MM(1:NSIZES) and !> NN(1:NSIZES); the value of each element pair (MM(j),NN(j)) !> specifies one size. The are specified by a logical array !> DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type !> will be generated. !> Currently, the list of possible types is: !> !> (1) The zero matrix. !> (2) The identity matrix. !> (3) A matrix of the form U D V, where U and V are orthogonal and !> D has evenly spaced entries 1, ..., ULP with random signs !> on the diagonal. !> (4) Same as (3), but multiplied by the underflow-threshold / ULP. !> (5) Same as (3), but multiplied by the overflow-threshold * ULP. !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of matrix sizes (M,N) contained in the vectors !> MM and NN. !> |
| [in] | MM | !> MM is INTEGER array, dimension (NSIZES) !> The values of the matrix row dimension M. !> |
| [in] | NN | !> NN is INTEGER array, dimension (NSIZES) !> The values of the matrix column dimension N. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DDRVBD !> 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 matrices are in A and B. !> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, dimension (NTYPES) !> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix !> 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+1) through !> DOTYPE(NTYPES) will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, dimension (4) !> On entry, 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(4) must be odd. !> On exit, ISEED is changed and can be used in the next call to !> DDRVBD to continue the same random number sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> The threshold value for the test ratios. A result is !> included in the output file if RESULT >= THRESH. The test !> ratios are scaled to be O(1), so THRESH should be a small !> multiple of 1, e.g., 10 or 100. To have every test ratio !> printed, use THRESH = 0. !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (LDA,NMAX) !> where NMAX is the maximum value of N in NN. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,MMAX), !> where MMAX is the maximum value of M in MM. !> |
| [out] | U | !> U is DOUBLE PRECISION array, dimension (LDU,MMAX) !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,MMAX). !> |
| [out] | VT | !> VT is DOUBLE PRECISION array, dimension (LDVT,NMAX) !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. LDVT >= max(1,NMAX). !> |
| [out] | ASAV | !> ASAV is DOUBLE PRECISION array, dimension (LDA,NMAX) !> |
| [out] | USAV | !> USAV is DOUBLE PRECISION array, dimension (LDU,MMAX) !> |
| [out] | VTSAV | !> VTSAV is DOUBLE PRECISION array, dimension (LDVT,NMAX) !> |
| [out] | S | !> S is DOUBLE PRECISION array, dimension !> (max(min(MM,NN))) !> |
| [out] | SSAV | !> SSAV is DOUBLE PRECISION array, dimension !> (max(min(MM,NN))) !> |
| [out] | E | !> E is DOUBLE PRECISION array, dimension !> (max(min(MM,NN))) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. This must be at least !> max(3*MN+MX,5*MN-4)+2*MN**2 for all pairs !> pairs (MN,MX)=( min(MM(j),NN(j), max(MM(j),NN(j)) ) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension at least 8*min(M,N) !> |
| [in] | NOUT | !> NOUT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then everything ran OK. !> -1: NSIZES < 0 !> -2: Some MM(j) < 0 !> -3: Some NN(j) < 0 !> -4: NTYPES < 0 !> -7: THRESH < 0 !> -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ). !> -12: LDU < 1 or LDU < MMAX. !> -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ). !> -21: LWORK too small. !> If DLATMS, or DGESVD returns an error code, the !> absolute value of it is returned. !> |
Definition at line 363 of file ddrvbd.f.
| subroutine ddrves | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | h, | ||
| double precision, dimension( lda, * ) | ht, | ||
| double precision, dimension( * ) | wr, | ||
| double precision, dimension( * ) | wi, | ||
| double precision, dimension( * ) | wrt, | ||
| double precision, dimension( * ) | wit, | ||
| double precision, dimension( ldvs, * ) | vs, | ||
| integer | ldvs, | ||
| double precision, dimension( 13 ) | result, | ||
| double precision, dimension( * ) | work, | ||
| integer | nwork, | ||
| integer, dimension( * ) | iwork, | ||
| logical, dimension( * ) | bwork, | ||
| integer | info ) |
DDRVES
!> !> DDRVES checks the nonsymmetric eigenvalue (Schur form) problem !> driver DGEES. !> !> When DDRVES is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, one matrix will be generated and used !> to test the nonsymmetric eigenroutines. For each matrix, 13 !> tests will be performed: !> !> (1) 0 if T is in Schur form, 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (2) | A - VS T VS' | / ( n |A| ulp ) !> !> Here VS is the matrix of Schur eigenvectors, and T is in Schur !> form (no sorting of eigenvalues). !> !> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues). !> !> (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T !> 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (5) 0 if T(with VS) = T(without VS), !> 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS), !> 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (7) 0 if T is in Schur form, 1/ulp otherwise !> (with sorting of eigenvalues) !> !> (8) | A - VS T VS' | / ( n |A| ulp ) !> !> Here VS is the matrix of Schur eigenvectors, and T is in Schur !> form (with sorting of eigenvalues). !> !> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues). !> !> (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T !> 1/ulp otherwise !> (with sorting of eigenvalues) !> !> (11) 0 if T(with VS) = T(without VS), !> 1/ulp otherwise !> (with sorting of eigenvalues) !> !> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS), !> 1/ulp otherwise !> (with sorting of eigenvalues) !> !> (13) if sorting worked and SDIM is the number of !> eigenvalues which were SELECTed !> !> The are specified by an array NN(1:NSIZES); the value of !> each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) The zero matrix. !> (2) The identity matrix. !> (3) A (transposed) Jordan block, with 1's on the diagonal. !> !> (4) A diagonal matrix with evenly spaced entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (5) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (6) A diagonal matrix with entries 1, ULP, ..., ULP !> and random signs. !> !> (7) Same as (4), but multiplied by a constant near !> the overflow threshold !> (8) Same as (4), but multiplied by a constant near !> the underflow threshold !> !> (9) A matrix of the form U' T U, where U is orthogonal and !> T has evenly spaced entries 1, ..., ULP with random signs !> on the diagonal and random O(1) entries in the upper !> triangle. !> !> (10) A matrix of the form U' T U, where U is orthogonal and !> T has geometrically spaced entries 1, ..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (11) A matrix of the form U' T U, where U is orthogonal and !> T has entries 1, ULP,..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (12) A matrix of the form U' T U, where U is orthogonal and !> T has real or complex conjugate paired eigenvalues randomly !> chosen from ( ULP, 1 ) and random O(1) entries in the upper !> triangle. !> !> (13) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (14) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has geometrically spaced entries !> 1, ..., ULP with random signs on the diagonal and random !> O(1) entries in the upper triangle. !> !> (15) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has entries 1, ULP,..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (16) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has real or complex conjugate paired !> eigenvalues randomly chosen from ( ULP, 1 ) and random !> O(1) entries in the upper triangle. !> !> (17) Same as (16), but multiplied by a constant !> near the overflow threshold !> (18) Same as (16), but multiplied by a constant !> near the underflow threshold !> !> (19) Nonsymmetric matrix with random entries chosen from (-1,1). !> If N is at least 4, all entries in first two rows and last !> row, and first column and last two columns are zero. !> (20) Same as (19), but multiplied by a constant !> near the overflow threshold !> (21) Same as (19), but multiplied by a constant !> near the underflow threshold !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DDRVES does nothing. It must be at least zero. !> |
| [in] | NN | !> NN is INTEGER array, 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. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DDRVES !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DDRVES to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns INFO not equal to 0.) !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Used to hold the matrix whose eigenvalues are to be !> computed. On exit, A contains the last matrix actually used. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, and H. LDA must be at !> least 1 and at least max(NN). !> |
| [out] | H | !> H is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Another copy of the test matrix A, modified by DGEES. !> |
| [out] | HT | !> HT is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Yet another copy of the test matrix A, modified by DGEES. !> |
| [out] | WR | !> WR is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | WI | !> WI is DOUBLE PRECISION array, dimension (max(NN)) !> !> The real and imaginary parts of the eigenvalues of A. !> On exit, WR + WI*i are the eigenvalues of the matrix in A. !> |
| [out] | WRT | !> WRT is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | WIT | !> WIT is DOUBLE PRECISION array, dimension (max(NN)) !> !> Like WR, WI, these arrays contain the eigenvalues of A, !> but those computed when DGEES only computes a partial !> eigendecomposition, i.e. not Schur vectors !> |
| [out] | VS | !> VS is DOUBLE PRECISION array, dimension (LDVS, max(NN)) !> VS holds the computed Schur vectors. !> |
| [in] | LDVS | !> LDVS is INTEGER !> Leading dimension of VS. Must be at least max(1,max(NN)). !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (13) !> The values computed by the 13 tests described above. !> The values are currently limited to 1/ulp, to avoid overflow. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (NWORK) !> |
| [in] | NWORK | !> NWORK is INTEGER !> The number of entries in WORK. This must be at least !> 5*NN(j)+2*NN(j)**2 for all j. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (max(NN)) !> |
| [out] | BWORK | !> BWORK is LOGICAL array, dimension (max(NN)) !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then everything ran OK. !> -1: NSIZES < 0 !> -2: Some NN(j) < 0 !> -3: NTYPES < 0 !> -6: THRESH < 0 !> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ). !> -17: LDVS < 1 or LDVS < NMAX, where NMAX is max( NN(j) ). !> -20: NWORK too small. !> If DLATMR, SLATMS, SLATME or DGEES returns an error code, !> the absolute value of it is returned. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NMAX Largest value in NN. !> NERRS The number of tests which have exceeded THRESH !> COND, CONDS, !> IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTULP, RTULPI Square roots of the previous 4 values. !> !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> KCONDS(j) Selectw whether CONDS is to be 1 or !> 1/sqrt(ulp). (0 means irrelevant.) !> |
Definition at line 385 of file ddrves.f.
| subroutine ddrvev | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | h, | ||
| double precision, dimension( * ) | wr, | ||
| double precision, dimension( * ) | wi, | ||
| double precision, dimension( * ) | wr1, | ||
| double precision, dimension( * ) | wi1, | ||
| double precision, dimension( ldvl, * ) | vl, | ||
| integer | ldvl, | ||
| double precision, dimension( ldvr, * ) | vr, | ||
| integer | ldvr, | ||
| double precision, dimension( ldlre, * ) | lre, | ||
| integer | ldlre, | ||
| double precision, dimension( 7 ) | result, | ||
| double precision, dimension( * ) | work, | ||
| integer | nwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
DDRVEV
!> !> DDRVEV checks the nonsymmetric eigenvalue problem driver DGEEV. !> !> When DDRVEV is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, one matrix will be generated and used !> to test the nonsymmetric eigenroutines. For each matrix, 7 !> tests will be performed: !> !> (1) | A * VR - VR * W | / ( n |A| ulp ) !> !> Here VR is the matrix of unit right eigenvectors. !> W is a block diagonal matrix, with a 1x1 block for each !> real eigenvalue and a 2x2 block for each complex conjugate !> pair. If eigenvalues j and j+1 are a complex conjugate pair, !> so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the !> 2 x 2 block corresponding to the pair will be: !> !> ( wr wi ) !> ( -wi wr ) !> !> Such a block multiplying an n x 2 matrix ( ur ui ) on the !> right will be the same as multiplying ur + i*ui by wr + i*wi. !> !> (2) | A**H * VL - VL * W**H | / ( n |A| ulp ) !> !> Here VL is the matrix of unit left eigenvectors, A**H is the !> conjugate transpose of A, and W is as above. !> !> (3) | |VR(i)| - 1 | / ulp and whether largest component real !> !> VR(i) denotes the i-th column of VR. !> !> (4) | |VL(i)| - 1 | / ulp and whether largest component real !> !> VL(i) denotes the i-th column of VL. !> !> (5) W(full) = W(partial) !> !> W(full) denotes the eigenvalues computed when both VR and VL !> are also computed, and W(partial) denotes the eigenvalues !> computed when only W, only W and VR, or only W and VL are !> computed. !> !> (6) VR(full) = VR(partial) !> !> VR(full) denotes the right eigenvectors computed when both VR !> and VL are computed, and VR(partial) denotes the result !> when only VR is computed. !> !> (7) VL(full) = VL(partial) !> !> VL(full) denotes the left eigenvectors computed when both VR !> and VL are also computed, and VL(partial) denotes the result !> when only VL is computed. !> !> The are specified by an array NN(1:NSIZES); the value of !> each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) The zero matrix. !> (2) The identity matrix. !> (3) A (transposed) Jordan block, with 1's on the diagonal. !> !> (4) A diagonal matrix with evenly spaced entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (5) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (6) A diagonal matrix with entries 1, ULP, ..., ULP !> and random signs. !> !> (7) Same as (4), but multiplied by a constant near !> the overflow threshold !> (8) Same as (4), but multiplied by a constant near !> the underflow threshold !> !> (9) A matrix of the form U' T U, where U is orthogonal and !> T has evenly spaced entries 1, ..., ULP with random signs !> on the diagonal and random O(1) entries in the upper !> triangle. !> !> (10) A matrix of the form U' T U, where U is orthogonal and !> T has geometrically spaced entries 1, ..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (11) A matrix of the form U' T U, where U is orthogonal and !> T has entries 1, ULP,..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (12) A matrix of the form U' T U, where U is orthogonal and !> T has real or complex conjugate paired eigenvalues randomly !> chosen from ( ULP, 1 ) and random O(1) entries in the upper !> triangle. !> !> (13) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (14) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has geometrically spaced entries !> 1, ..., ULP with random signs on the diagonal and random !> O(1) entries in the upper triangle. !> !> (15) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has entries 1, ULP,..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (16) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has real or complex conjugate paired !> eigenvalues randomly chosen from ( ULP, 1 ) and random !> O(1) entries in the upper triangle. !> !> (17) Same as (16), but multiplied by a constant !> near the overflow threshold !> (18) Same as (16), but multiplied by a constant !> near the underflow threshold !> !> (19) Nonsymmetric matrix with random entries chosen from (-1,1). !> If N is at least 4, all entries in first two rows and last !> row, and first column and last two columns are zero. !> (20) Same as (19), but multiplied by a constant !> near the overflow threshold !> (21) Same as (19), but multiplied by a constant !> near the underflow threshold !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. If it is zero, !> DDRVEV does nothing. It must be at least zero. !> |
| [in] | NN | !> NN is INTEGER array, 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. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. If it is zero, DDRVEV !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DDRVEV to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns INFO not equal to 0.) !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Used to hold the matrix whose eigenvalues are to be !> computed. On exit, A contains the last matrix actually used. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, and H. LDA must be at !> least 1 and at least max(NN). !> |
| [out] | H | !> H is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Another copy of the test matrix A, modified by DGEEV. !> |
| [out] | WR | !> WR is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | WI | !> WI is DOUBLE PRECISION array, dimension (max(NN)) !> !> The real and imaginary parts of the eigenvalues of A. !> On exit, WR + WI*i are the eigenvalues of the matrix in A. !> |
| [out] | WR1 | !> WR1 is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | WI1 | !> WI1 is DOUBLE PRECISION array, dimension (max(NN)) !> !> Like WR, WI, these arrays contain the eigenvalues of A, !> but those computed when DGEEV only computes a partial !> eigendecomposition, i.e. not the eigenvalues and left !> and right eigenvectors. !> |
| [out] | VL | !> VL is DOUBLE PRECISION array, dimension (LDVL, max(NN)) !> VL holds the computed left eigenvectors. !> |
| [in] | LDVL | !> LDVL is INTEGER !> Leading dimension of VL. Must be at least max(1,max(NN)). !> |
| [out] | VR | !> VR is DOUBLE PRECISION array, dimension (LDVR, max(NN)) !> VR holds the computed right eigenvectors. !> |
| [in] | LDVR | !> LDVR is INTEGER !> Leading dimension of VR. Must be at least max(1,max(NN)). !> |
| [out] | LRE | !> LRE is DOUBLE PRECISION array, dimension (LDLRE,max(NN)) !> LRE holds the computed right or left eigenvectors. !> |
| [in] | LDLRE | !> LDLRE is INTEGER !> Leading dimension of LRE. Must be at least max(1,max(NN)). !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (7) !> The values computed by the seven tests described above. !> The values are currently limited to 1/ulp, to avoid overflow. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (NWORK) !> |
| [in] | NWORK | !> NWORK is INTEGER !> The number of entries in WORK. This must be at least !> 5*NN(j)+2*NN(j)**2 for all j. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (max(NN)) !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then everything ran OK. !> -1: NSIZES < 0 !> -2: Some NN(j) < 0 !> -3: NTYPES < 0 !> -6: THRESH < 0 !> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ). !> -16: LDVL < 1 or LDVL < NMAX, where NMAX is max( NN(j) ). !> -18: LDVR < 1 or LDVR < NMAX, where NMAX is max( NN(j) ). !> -20: LDLRE < 1 or LDLRE < NMAX, where NMAX is max( NN(j) ). !> -23: NWORK too small. !> If DLATMR, SLATMS, SLATME or DGEEV returns an error code, !> the absolute value of it is returned. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NMAX Largest value in NN. !> NERRS The number of tests which have exceeded THRESH !> COND, CONDS, !> IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTULP, RTULPI Square roots of the previous 4 values. !> !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> KCONDS(j) Selectw whether CONDS is to be 1 or !> 1/sqrt(ulp). (0 means irrelevant.) !> |
Definition at line 402 of file ddrvev.f.
| subroutine ddrvsg | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( ldz, * ) | z, | ||
| integer | ldz, | ||
| double precision, dimension( lda, * ) | ab, | ||
| double precision, dimension( ldb, * ) | bb, | ||
| double precision, dimension( * ) | ap, | ||
| double precision, dimension( * ) | bp, | ||
| double precision, dimension( * ) | work, | ||
| integer | nwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DDRVSG
!> !> DDRVSG checks the real symmetric generalized eigenproblem !> drivers. !> !> DSYGV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem. !> !> DSYGVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem using a divide and conquer algorithm. !> !> DSYGVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem. !> !> DSPGV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem in packed storage. !> !> DSPGVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem in packed storage using a divide and !> conquer algorithm. !> !> DSPGVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem in packed storage. !> !> DSBGV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite banded !> generalized eigenproblem. !> !> DSBGVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite banded !> generalized eigenproblem using a divide and conquer !> algorithm. !> !> DSBGVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite banded !> generalized eigenproblem. !> !> When DDRVSG is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, one matrix A of the given type will be !> generated; a random well-conditioned matrix B is also generated !> and the pair (A,B) is used to test the drivers. !> !> For each pair (A,B), the following tests are performed: !> !> (1) DSYGV with ITYPE = 1 and UPLO ='U': !> !> | A Z - B Z D | / ( |A| |Z| n ulp ) !> !> (2) as (1) but calling DSPGV !> (3) as (1) but calling DSBGV !> (4) as (1) but with UPLO = 'L' !> (5) as (4) but calling DSPGV !> (6) as (4) but calling DSBGV !> !> (7) DSYGV with ITYPE = 2 and UPLO ='U': !> !> | A B Z - Z D | / ( |A| |Z| n ulp ) !> !> (8) as (7) but calling DSPGV !> (9) as (7) but with UPLO = 'L' !> (10) as (9) but calling DSPGV !> !> (11) DSYGV with ITYPE = 3 and UPLO ='U': !> !> | B A Z - Z D | / ( |A| |Z| n ulp ) !> !> (12) as (11) but calling DSPGV !> (13) as (11) but with UPLO = 'L' !> (14) as (13) but calling DSPGV !> !> DSYGVD, DSPGVD and DSBGVD performed the same 14 tests. !> !> DSYGVX, DSPGVX and DSBGVX performed the above 14 tests with !> the parameter RANGE = 'A', 'N' and 'I', respectively. !> !> The are specified by an array NN(1:NSIZES); the value !> of each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type will be generated. !> This type is used for the matrix A which has half-bandwidth KA. !> B is generated as a well-conditioned positive definite matrix !> with half-bandwidth KB (<= KA). !> Currently, the list of possible types for A is: !> !> (1) The zero matrix. !> (2) The identity matrix. !> !> (3) A diagonal matrix with evenly spaced entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (4) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (5) A diagonal matrix with entries !> 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 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) Same as (8), but with KA = 1 and KB = 1 !> (17) Same as (8), but with KA = 2 and KB = 1 !> (18) Same as (8), but with KA = 2 and KB = 2 !> (19) Same as (8), but with KA = 3 and KB = 1 !> (20) Same as (8), but with KA = 3 and KB = 2 !> (21) Same as (8), but with KA = 3 and KB = 3 !>
!> NSIZES INTEGER !> The number of sizes of matrices to use. If it is zero, !> DDRVSG does nothing. It must be at least zero. !> Not modified. !> !> NN INTEGER array, 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. !> Not modified. !> !> NTYPES INTEGER !> The number of elements in DOTYPE. If it is zero, DDRVSG !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> Not modified. !> !> DOTYPE LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> Not modified. !> !> ISEED INTEGER array, 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(4) 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 DDRVSG to continue the same random number !> sequence. !> Modified. !> !> THRESH DOUBLE PRECISION !> A test will count as if the , 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. !> Not modified. !> !> NOUNIT INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> Not modified. !> !> A DOUBLE PRECISION array, dimension (LDA , max(NN)) !> Used to hold the matrix whose eigenvalues are to be !> computed. On exit, A contains the last matrix actually !> used. !> Modified. !> !> LDA INTEGER !> The leading dimension of A and AB. It must be at !> least 1 and at least max( NN ). !> Not modified. !> !> B DOUBLE PRECISION array, dimension (LDB , max(NN)) !> Used to hold the symmetric positive definite matrix for !> the generailzed problem. !> On exit, B contains the last matrix actually !> used. !> Modified. !> !> LDB INTEGER !> The leading dimension of B and BB. It must be at !> least 1 and at least max( NN ). !> Not modified. !> !> D DOUBLE PRECISION array, dimension (max(NN)) !> The eigenvalues of A. On exit, the eigenvalues in D !> correspond with the matrix in A. !> Modified. !> !> Z DOUBLE PRECISION array, dimension (LDZ, max(NN)) !> The matrix of eigenvectors. !> Modified. !> !> LDZ INTEGER !> The leading dimension of Z. It must be at least 1 and !> at least max( NN ). !> Not modified. !> !> AB DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Workspace. !> Modified. !> !> BB DOUBLE PRECISION array, dimension (LDB, max(NN)) !> Workspace. !> Modified. !> !> AP DOUBLE PRECISION array, dimension (max(NN)**2) !> Workspace. !> Modified. !> !> BP DOUBLE PRECISION array, dimension (max(NN)**2) !> Workspace. !> Modified. !> !> WORK DOUBLE PRECISION array, dimension (NWORK) !> Workspace. !> Modified. !> !> NWORK INTEGER !> The number of entries in WORK. This must be at least !> 1+5*N+2*N*lg(N)+3*N**2 where N = max( NN(j) ) and !> lg( N ) = smallest integer k such that 2**k >= N. !> Not modified. !> !> IWORK INTEGER array, dimension (LIWORK) !> Workspace. !> Modified. !> !> LIWORK INTEGER !> The number of entries in WORK. This must be at least 6*N. !> Not modified. !> !> RESULT DOUBLE PRECISION array, dimension (70) !> The values computed by the 70 tests described above. !> Modified. !> !> INFO INTEGER !> If 0, then everything ran OK. !> -1: NSIZES < 0 !> -2: Some NN(j) < 0 !> -3: NTYPES < 0 !> -5: THRESH < 0 !> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ). !> -16: LDZ < 1 or LDZ < NMAX. !> -21: NWORK too small. !> -23: LIWORK too small. !> If DLATMR, SLATMS, DSYGV, DSPGV, DSBGV, SSYGVD, SSPGVD, !> DSBGVD, DSYGVX, DSPGVX or SSBGVX returns an error code, !> the absolute value of it is returned. !> Modified. !> !> ---------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NTEST The number of tests that have been run !> on this matrix. !> NTESTT The total number of tests for this call. !> NMAX Largest value in NN. !> NMATS The number of matrices generated so far. !> NERRS The number of tests which have exceeded THRESH !> so far (computed by DLAFTS). !> COND, IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTOVFL, RTUNFL Square roots of the previous 2 values. !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !>
Definition at line 352 of file ddrvsg.f.
| subroutine ddrvsg2stg | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | d2, | ||
| double precision, dimension( ldz, * ) | z, | ||
| integer | ldz, | ||
| double precision, dimension( lda, * ) | ab, | ||
| double precision, dimension( ldb, * ) | bb, | ||
| double precision, dimension( * ) | ap, | ||
| double precision, dimension( * ) | bp, | ||
| double precision, dimension( * ) | work, | ||
| integer | nwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DDRVSG2STG
!> !> DDRVSG2STG checks the real symmetric generalized eigenproblem !> drivers. !> !> DSYGV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem. !> !> DSYGVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem using a divide and conquer algorithm. !> !> DSYGVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem. !> !> DSPGV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem in packed storage. !> !> DSPGVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem in packed storage using a divide and !> conquer algorithm. !> !> DSPGVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite generalized !> eigenproblem in packed storage. !> !> DSBGV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite banded !> generalized eigenproblem. !> !> DSBGVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite banded !> generalized eigenproblem using a divide and conquer !> algorithm. !> !> DSBGVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric-definite banded !> generalized eigenproblem. !> !> When DDRVSG2STG is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, one matrix A of the given type will be !> generated; a random well-conditioned matrix B is also generated !> and the pair (A,B) is used to test the drivers. !> !> For each pair (A,B), the following tests are performed: !> !> (1) DSYGV with ITYPE = 1 and UPLO ='U': !> !> | A Z - B Z D | / ( |A| |Z| n ulp ) !> | D - D2 | / ( |D| ulp ) where D is computed by !> DSYGV and D2 is computed by !> DSYGV_2STAGE. This test is !> only performed for DSYGV !> !> (2) as (1) but calling DSPGV !> (3) as (1) but calling DSBGV !> (4) as (1) but with UPLO = 'L' !> (5) as (4) but calling DSPGV !> (6) as (4) but calling DSBGV !> !> (7) DSYGV with ITYPE = 2 and UPLO ='U': !> !> | A B Z - Z D | / ( |A| |Z| n ulp ) !> !> (8) as (7) but calling DSPGV !> (9) as (7) but with UPLO = 'L' !> (10) as (9) but calling DSPGV !> !> (11) DSYGV with ITYPE = 3 and UPLO ='U': !> !> | B A Z - Z D | / ( |A| |Z| n ulp ) !> !> (12) as (11) but calling DSPGV !> (13) as (11) but with UPLO = 'L' !> (14) as (13) but calling DSPGV !> !> DSYGVD, DSPGVD and DSBGVD performed the same 14 tests. !> !> DSYGVX, DSPGVX and DSBGVX performed the above 14 tests with !> the parameter RANGE = 'A', 'N' and 'I', respectively. !> !> The are specified by an array NN(1:NSIZES); the value !> of each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type will be generated. !> This type is used for the matrix A which has half-bandwidth KA. !> B is generated as a well-conditioned positive definite matrix !> with half-bandwidth KB (<= KA). !> Currently, the list of possible types for A is: !> !> (1) The zero matrix. !> (2) The identity matrix. !> !> (3) A diagonal matrix with evenly spaced entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (4) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (5) A diagonal matrix with entries !> 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 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) Same as (8), but with KA = 1 and KB = 1 !> (17) Same as (8), but with KA = 2 and KB = 1 !> (18) Same as (8), but with KA = 2 and KB = 2 !> (19) Same as (8), but with KA = 3 and KB = 1 !> (20) Same as (8), but with KA = 3 and KB = 2 !> (21) Same as (8), but with KA = 3 and KB = 3 !>
!> NSIZES INTEGER !> The number of sizes of matrices to use. If it is zero, !> DDRVSG2STG does nothing. It must be at least zero. !> Not modified. !> !> NN INTEGER array, 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. !> Not modified. !> !> NTYPES INTEGER !> The number of elements in DOTYPE. If it is zero, DDRVSG2STG !> 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(1:MAXTYP) is .FALSE. and !> DOTYPE(MAXTYP+1) is .TRUE. . !> Not modified. !> !> DOTYPE LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> Not modified. !> !> ISEED INTEGER array, 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(4) 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 DDRVSG2STG to continue the same random number !> sequence. !> Modified. !> !> THRESH DOUBLE PRECISION !> A test will count as if the , 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. !> Not modified. !> !> NOUNIT INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns IINFO not equal to 0.) !> Not modified. !> !> A DOUBLE PRECISION array, dimension (LDA , max(NN)) !> Used to hold the matrix whose eigenvalues are to be !> computed. On exit, A contains the last matrix actually !> used. !> Modified. !> !> LDA INTEGER !> The leading dimension of A and AB. It must be at !> least 1 and at least max( NN ). !> Not modified. !> !> B DOUBLE PRECISION array, dimension (LDB , max(NN)) !> Used to hold the symmetric positive definite matrix for !> the generailzed problem. !> On exit, B contains the last matrix actually !> used. !> Modified. !> !> LDB INTEGER !> The leading dimension of B and BB. It must be at !> least 1 and at least max( NN ). !> Not modified. !> !> D DOUBLE PRECISION array, dimension (max(NN)) !> The eigenvalues of A. On exit, the eigenvalues in D !> correspond with the matrix in A. !> Modified. !> !> Z DOUBLE PRECISION array, dimension (LDZ, max(NN)) !> The matrix of eigenvectors. !> Modified. !> !> LDZ INTEGER !> The leading dimension of Z. It must be at least 1 and !> at least max( NN ). !> Not modified. !> !> AB DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Workspace. !> Modified. !> !> BB DOUBLE PRECISION array, dimension (LDB, max(NN)) !> Workspace. !> Modified. !> !> AP DOUBLE PRECISION array, dimension (max(NN)**2) !> Workspace. !> Modified. !> !> BP DOUBLE PRECISION array, dimension (max(NN)**2) !> Workspace. !> Modified. !> !> WORK DOUBLE PRECISION array, dimension (NWORK) !> Workspace. !> Modified. !> !> NWORK INTEGER !> The number of entries in WORK. This must be at least !> 1+5*N+2*N*lg(N)+3*N**2 where N = max( NN(j) ) and !> lg( N ) = smallest integer k such that 2**k >= N. !> Not modified. !> !> IWORK INTEGER array, dimension (LIWORK) !> Workspace. !> Modified. !> !> LIWORK INTEGER !> The number of entries in WORK. This must be at least 6*N. !> Not modified. !> !> RESULT DOUBLE PRECISION array, dimension (70) !> The values computed by the 70 tests described above. !> Modified. !> !> INFO INTEGER !> If 0, then everything ran OK. !> -1: NSIZES < 0 !> -2: Some NN(j) < 0 !> -3: NTYPES < 0 !> -5: THRESH < 0 !> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ). !> -16: LDZ < 1 or LDZ < NMAX. !> -21: NWORK too small. !> -23: LIWORK too small. !> If DLATMR, SLATMS, DSYGV, DSPGV, DSBGV, SSYGVD, SSPGVD, !> DSBGVD, DSYGVX, DSPGVX or SSBGVX returns an error code, !> the absolute value of it is returned. !> Modified. !> !> ---------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NTEST The number of tests that have been run !> on this matrix. !> NTESTT The total number of tests for this call. !> NMAX Largest value in NN. !> NMATS The number of matrices generated so far. !> NERRS The number of tests which have exceeded THRESH !> so far (computed by DLAFTS). !> COND, IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTOVFL, RTUNFL Square roots of the previous 2 values. !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !>
Definition at line 358 of file ddrvsg2stg.f.
| subroutine ddrvst | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | d1, | ||
| double precision, dimension( * ) | d2, | ||
| double precision, dimension( * ) | d3, | ||
| double precision, dimension( * ) | d4, | ||
| double precision, dimension( * ) | eveigs, | ||
| double precision, dimension( * ) | wa1, | ||
| double precision, dimension( * ) | wa2, | ||
| double precision, dimension( * ) | wa3, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldu, * ) | v, | ||
| double precision, dimension( * ) | tau, | ||
| double precision, dimension( ldu, * ) | z, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DDRVST
!> !> DDRVST checks the symmetric eigenvalue problem drivers. !> !> DSTEV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric tridiagonal matrix. !> !> DSTEVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric tridiagonal matrix. !> !> DSTEVR computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric tridiagonal matrix !> using the Relatively Robust Representation where it can. !> !> DSYEV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix. !> !> DSYEVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix. !> !> DSYEVR computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix !> using the Relatively Robust Representation where it can. !> !> DSPEV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix in packed !> storage. !> !> DSPEVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix in packed !> storage. !> !> DSBEV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric band matrix. !> !> DSBEVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric band matrix. !> !> DSYEVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix using !> a divide and conquer algorithm. !> !> DSPEVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix in packed !> storage, using a divide and conquer algorithm. !> !> DSBEVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric band matrix, !> using a divide and conquer algorithm. !> !> When DDRVST is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, one matrix will be generated and used !> to test the appropriate drivers. For each matrix and each !> driver routine called, 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 are specified by an array NN(1:NSIZES); the value of !> each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type 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 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 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 ) !>
!> NSIZES INTEGER
!> The number of sizes of matrices to use. If it is zero,
!> DDRVST does nothing. It must be at least zero.
!> Not modified.
!>
!> NN INTEGER array, 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.
!> Not modified.
!>
!> NTYPES INTEGER
!> 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(1:MAXTYP) is .FALSE. and
!> DOTYPE(MAXTYP+1) is .TRUE. .
!> Not modified.
!>
!> DOTYPE LOGICAL array, 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+1) through DOTYPE(NTYPES)
!> will be ignored.
!> Not modified.
!>
!> ISEED INTEGER array, 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(4) 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.
!> Modified.
!>
!> THRESH DOUBLE PRECISION
!> A test will count as if the , 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.
!> Not modified.
!>
!> NOUNIT INTEGER
!> The FORTRAN unit number for printing out error messages
!> (e.g., if a routine returns IINFO not equal to 0.)
!> Not modified.
!>
!> A DOUBLE PRECISION array, dimension (LDA , max(NN))
!> Used to hold the matrix whose eigenvalues are to be
!> computed. On exit, A contains the last matrix actually
!> used.
!> Modified.
!>
!> LDA INTEGER
!> The leading dimension of A. It must be at
!> least 1 and at least max( NN ).
!> Not modified.
!>
!> D1 DOUBLE PRECISION array, dimension (max(NN))
!> The eigenvalues of A, as computed by DSTEQR simlutaneously
!> with Z. On exit, the eigenvalues in D1 correspond with the
!> matrix in A.
!> Modified.
!>
!> D2 DOUBLE PRECISION array, 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.
!> Modified.
!>
!> D3 DOUBLE PRECISION array, dimension (max(NN))
!> The eigenvalues of A, as computed by DSTERF. On exit, the
!> eigenvalues in D3 correspond with the matrix in A.
!> Modified.
!>
!> D4 DOUBLE PRECISION array, dimension
!>
!> EVEIGS DOUBLE PRECISION array, dimension (max(NN))
!> The eigenvalues as computed by DSTEV('N', ... )
!> (I reserve the right to change this to the output of
!> whichever algorithm computes the most accurate eigenvalues).
!>
!> WA1 DOUBLE PRECISION array, dimension
!>
!> WA2 DOUBLE PRECISION array, dimension
!>
!> WA3 DOUBLE PRECISION array, dimension
!>
!> U DOUBLE PRECISION array, dimension (LDU, max(NN))
!> The orthogonal matrix computed by DSYTRD + DORGTR.
!> Modified.
!>
!> LDU INTEGER
!> The leading dimension of U, Z, and V. It must be at
!> least 1 and at least max( NN ).
!> Not modified.
!>
!> V DOUBLE PRECISION array, dimension (LDU, max(NN))
!> The Housholder vectors computed by DSYTRD in reducing A to
!> tridiagonal form.
!> Modified.
!>
!> TAU DOUBLE PRECISION array, dimension (max(NN))
!> The Householder factors computed by DSYTRD in reducing A
!> to tridiagonal form.
!> Modified.
!>
!> Z DOUBLE PRECISION array, dimension (LDU, max(NN))
!> The orthogonal matrix of eigenvectors computed by DSTEQR,
!> DPTEQR, and DSTEIN.
!> Modified.
!>
!> WORK DOUBLE PRECISION array, dimension (LWORK)
!> Workspace.
!> Modified.
!>
!> LWORK INTEGER
!> 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.
!> Not modified.
!>
!> IWORK INTEGER array,
!> dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
!> where Nmax = max( NN(j), 2 ) and lg = log base 2.
!> Workspace.
!> Modified.
!>
!> RESULT DOUBLE PRECISION array, dimension (105)
!> The values computed by the tests described above.
!> The values are currently limited to 1/ulp, to avoid
!> overflow.
!> Modified.
!>
!> INFO INTEGER
!> If 0, then everything ran OK.
!> -1: NSIZES < 0
!> -2: Some NN(j) < 0
!> -3: NTYPES < 0
!> -5: THRESH < 0
!> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
!> -16: LDU < 1 or LDU < NMAX.
!> -21: LWORK too small.
!> If DLATMR, DLATMS, DSYTRD, DORGTR, DSTEQR, DSTERF,
!> or DORMTR returns an error code, the
!> absolute value of it is returned.
!> Modified.
!>
!>-----------------------------------------------------------------------
!>
!> Some Local Variables and Parameters:
!> ---- ----- --------- --- ----------
!> ZERO, ONE Real 0 and 1.
!> MAXTYP The number of types defined.
!> NTEST The number of tests performed, or which can
!> be performed so far, for the current matrix.
!> NTESTT The total number of tests performed so far.
!> NMAX Largest value in NN.
!> NMATS The number of matrices generated so far.
!> NERRS The number of tests which have exceeded THRESH
!> so far (computed by DLAFTS).
!> COND, IMODE Values to be passed to the matrix generators.
!> ANORM Norm of A; passed to matrix generators.
!>
!> OVFL, UNFL Overflow and underflow thresholds.
!> ULP, ULPINV Finest relative precision and its inverse.
!> RTOVFL, RTUNFL Square roots of the previous 2 values.
!> The following four arrays decode JTYPE:
!> KTYPE(j) The general type (1-10) for type .
!> KMODE(j) The MODE value to be passed to the matrix
!> generator for type .
!> KMAGN(j) The order of magnitude ( O(1),
!> O(overflow^(1/2) ), O(underflow^(1/2) )
!>
!> The tests performed are: Routine tested
!> 1= | A - U S U' | / ( |A| n ulp ) DSTEV('V', ... )
!> 2= | I - U U' | / ( n ulp ) DSTEV('V', ... )
!> 3= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEV('N', ... )
!> 4= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','A', ... )
!> 5= | I - U U' | / ( n ulp ) DSTEVX('V','A', ... )
!> 6= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVX('N','A', ... )
!> 7= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','A', ... )
!> 8= | I - U U' | / ( n ulp ) DSTEVR('V','A', ... )
!> 9= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVR('N','A', ... )
!> 10= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','I', ... )
!> 11= | I - U U' | / ( n ulp ) DSTEVX('V','I', ... )
!> 12= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVX('N','I', ... )
!> 13= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','V', ... )
!> 14= | I - U U' | / ( n ulp ) DSTEVX('V','V', ... )
!> 15= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVX('N','V', ... )
!> 16= | A - U S U' | / ( |A| n ulp ) DSTEVD('V', ... )
!> 17= | I - U U' | / ( n ulp ) DSTEVD('V', ... )
!> 18= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVD('N', ... )
!> 19= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','I', ... )
!> 20= | I - U U' | / ( n ulp ) DSTEVR('V','I', ... )
!> 21= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVR('N','I', ... )
!> 22= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','V', ... )
!> 23= | I - U U' | / ( n ulp ) DSTEVR('V','V', ... )
!> 24= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVR('N','V', ... )
!>
!> 25= | A - U S U' | / ( |A| n ulp ) DSYEV('L','V', ... )
!> 26= | I - U U' | / ( n ulp ) DSYEV('L','V', ... )
!> 27= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEV('L','N', ... )
!> 28= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','A', ... )
!> 29= | I - U U' | / ( n ulp ) DSYEVX('L','V','A', ... )
!> 30= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX('L','N','A', ... )
!> 31= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','I', ... )
!> 32= | I - U U' | / ( n ulp ) DSYEVX('L','V','I', ... )
!> 33= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX('L','N','I', ... )
!> 34= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','V', ... )
!> 35= | I - U U' | / ( n ulp ) DSYEVX('L','V','V', ... )
!> 36= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX('L','N','V', ... )
!> 37= | A - U S U' | / ( |A| n ulp ) DSPEV('L','V', ... )
!> 38= | I - U U' | / ( n ulp ) DSPEV('L','V', ... )
!> 39= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEV('L','N', ... )
!> 40= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','A', ... )
!> 41= | I - U U' | / ( n ulp ) DSPEVX('L','V','A', ... )
!> 42= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','A', ... )
!> 43= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','I', ... )
!> 44= | I - U U' | / ( n ulp ) DSPEVX('L','V','I', ... )
!> 45= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','I', ... )
!> 46= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','V', ... )
!> 47= | I - U U' | / ( n ulp ) DSPEVX('L','V','V', ... )
!> 48= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','V', ... )
!> 49= | A - U S U' | / ( |A| n ulp ) DSBEV('L','V', ... )
!> 50= | I - U U' | / ( n ulp ) DSBEV('L','V', ... )
!> 51= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEV('L','N', ... )
!> 52= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','A', ... )
!> 53= | I - U U' | / ( n ulp ) DSBEVX('L','V','A', ... )
!> 54= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX('L','N','A', ... )
!> 55= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','I', ... )
!> 56= | I - U U' | / ( n ulp ) DSBEVX('L','V','I', ... )
!> 57= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX('L','N','I', ... )
!> 58= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','V', ... )
!> 59= | I - U U' | / ( n ulp ) DSBEVX('L','V','V', ... )
!> 60= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX('L','N','V', ... )
!> 61= | A - U S U' | / ( |A| n ulp ) DSYEVD('L','V', ... )
!> 62= | I - U U' | / ( n ulp ) DSYEVD('L','V', ... )
!> 63= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVD('L','N', ... )
!> 64= | A - U S U' | / ( |A| n ulp ) DSPEVD('L','V', ... )
!> 65= | I - U U' | / ( n ulp ) DSPEVD('L','V', ... )
!> 66= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVD('L','N', ... )
!> 67= | A - U S U' | / ( |A| n ulp ) DSBEVD('L','V', ... )
!> 68= | I - U U' | / ( n ulp ) DSBEVD('L','V', ... )
!> 69= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVD('L','N', ... )
!> 70= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','A', ... )
!> 71= | I - U U' | / ( n ulp ) DSYEVR('L','V','A', ... )
!> 72= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR('L','N','A', ... )
!> 73= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','I', ... )
!> 74= | I - U U' | / ( n ulp ) DSYEVR('L','V','I', ... )
!> 75= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR('L','N','I', ... )
!> 76= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','V', ... )
!> 77= | I - U U' | / ( n ulp ) DSYEVR('L','V','V', ... )
!> 78= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR('L','N','V', ... )
!>
!> Tests 25 through 78 are repeated (as tests 79 through 132)
!> with UPLO='U'
!>
!> To be added in 1999
!>
!> 79= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','A', ... )
!> 80= | I - U U' | / ( n ulp ) DSPEVR('L','V','A', ... )
!> 81= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','A', ... )
!> 82= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','I', ... )
!> 83= | I - U U' | / ( n ulp ) DSPEVR('L','V','I', ... )
!> 84= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','I', ... )
!> 85= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','V', ... )
!> 86= | I - U U' | / ( n ulp ) DSPEVR('L','V','V', ... )
!> 87= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','V', ... )
!> 88= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','A', ... )
!> 89= | I - U U' | / ( n ulp ) DSBEVR('L','V','A', ... )
!> 90= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','A', ... )
!> 91= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','I', ... )
!> 92= | I - U U' | / ( n ulp ) DSBEVR('L','V','I', ... )
!> 93= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','I', ... )
!> 94= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','V', ... )
!> 95= | I - U U' | / ( n ulp ) DSBEVR('L','V','V', ... )
!> 96= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','V', ... )
!> Definition at line 449 of file ddrvst.f.
| subroutine ddrvst2stg | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | d1, | ||
| double precision, dimension( * ) | d2, | ||
| double precision, dimension( * ) | d3, | ||
| double precision, dimension( * ) | d4, | ||
| double precision, dimension( * ) | eveigs, | ||
| double precision, dimension( * ) | wa1, | ||
| double precision, dimension( * ) | wa2, | ||
| double precision, dimension( * ) | wa3, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldu, * ) | v, | ||
| double precision, dimension( * ) | tau, | ||
| double precision, dimension( ldu, * ) | z, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| double precision, dimension( * ) | result, | ||
| integer | info ) |
DDRVST2STG
!> !> DDRVST2STG checks the symmetric eigenvalue problem drivers. !> !> DSTEV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric tridiagonal matrix. !> !> DSTEVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric tridiagonal matrix. !> !> DSTEVR computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric tridiagonal matrix !> using the Relatively Robust Representation where it can. !> !> DSYEV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix. !> !> DSYEVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix. !> !> DSYEVR computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix !> using the Relatively Robust Representation where it can. !> !> DSPEV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix in packed !> storage. !> !> DSPEVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix in packed !> storage. !> !> DSBEV computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric band matrix. !> !> DSBEVX computes selected eigenvalues and, optionally, !> eigenvectors of a real symmetric band matrix. !> !> DSYEVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix using !> a divide and conquer algorithm. !> !> DSPEVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric matrix in packed !> storage, using a divide and conquer algorithm. !> !> DSBEVD computes all eigenvalues and, optionally, !> eigenvectors of a real symmetric band matrix, !> using a divide and conquer algorithm. !> !> When DDRVST2STG is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, one matrix will be generated and used !> to test the appropriate drivers. For each matrix and each !> driver routine called, 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 are specified by an array NN(1:NSIZES); the value of !> each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type 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 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 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 ) !>
!> NSIZES INTEGER
!> The number of sizes of matrices to use. If it is zero,
!> DDRVST2STG does nothing. It must be at least zero.
!> Not modified.
!>
!> NN INTEGER array, 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.
!> Not modified.
!>
!> NTYPES INTEGER
!> The number of elements in DOTYPE. If it is zero, DDRVST2STG
!> 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(1:MAXTYP) is .FALSE. and
!> DOTYPE(MAXTYP+1) is .TRUE. .
!> Not modified.
!>
!> DOTYPE LOGICAL array, 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+1) through DOTYPE(NTYPES)
!> will be ignored.
!> Not modified.
!>
!> ISEED INTEGER array, 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(4) 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 DDRVST2STG to continue the same random number
!> sequence.
!> Modified.
!>
!> THRESH DOUBLE PRECISION
!> A test will count as if the , 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.
!> Not modified.
!>
!> NOUNIT INTEGER
!> The FORTRAN unit number for printing out error messages
!> (e.g., if a routine returns IINFO not equal to 0.)
!> Not modified.
!>
!> A DOUBLE PRECISION array, dimension (LDA , max(NN))
!> Used to hold the matrix whose eigenvalues are to be
!> computed. On exit, A contains the last matrix actually
!> used.
!> Modified.
!>
!> LDA INTEGER
!> The leading dimension of A. It must be at
!> least 1 and at least max( NN ).
!> Not modified.
!>
!> D1 DOUBLE PRECISION array, dimension (max(NN))
!> The eigenvalues of A, as computed by DSTEQR simlutaneously
!> with Z. On exit, the eigenvalues in D1 correspond with the
!> matrix in A.
!> Modified.
!>
!> D2 DOUBLE PRECISION array, 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.
!> Modified.
!>
!> D3 DOUBLE PRECISION array, dimension (max(NN))
!> The eigenvalues of A, as computed by DSTERF. On exit, the
!> eigenvalues in D3 correspond with the matrix in A.
!> Modified.
!>
!> D4 DOUBLE PRECISION array, dimension
!>
!> EVEIGS DOUBLE PRECISION array, dimension (max(NN))
!> The eigenvalues as computed by DSTEV('N', ... )
!> (I reserve the right to change this to the output of
!> whichever algorithm computes the most accurate eigenvalues).
!>
!> WA1 DOUBLE PRECISION array, dimension
!>
!> WA2 DOUBLE PRECISION array, dimension
!>
!> WA3 DOUBLE PRECISION array, dimension
!>
!> U DOUBLE PRECISION array, dimension (LDU, max(NN))
!> The orthogonal matrix computed by DSYTRD + DORGTR.
!> Modified.
!>
!> LDU INTEGER
!> The leading dimension of U, Z, and V. It must be at
!> least 1 and at least max( NN ).
!> Not modified.
!>
!> V DOUBLE PRECISION array, dimension (LDU, max(NN))
!> The Housholder vectors computed by DSYTRD in reducing A to
!> tridiagonal form.
!> Modified.
!>
!> TAU DOUBLE PRECISION array, dimension (max(NN))
!> The Householder factors computed by DSYTRD in reducing A
!> to tridiagonal form.
!> Modified.
!>
!> Z DOUBLE PRECISION array, dimension (LDU, max(NN))
!> The orthogonal matrix of eigenvectors computed by DSTEQR,
!> DPTEQR, and DSTEIN.
!> Modified.
!>
!> WORK DOUBLE PRECISION array, dimension (LWORK)
!> Workspace.
!> Modified.
!>
!> LWORK INTEGER
!> 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.
!> Not modified.
!>
!> IWORK INTEGER array,
!> dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
!> where Nmax = max( NN(j), 2 ) and lg = log base 2.
!> Workspace.
!> Modified.
!>
!> RESULT DOUBLE PRECISION array, dimension (105)
!> The values computed by the tests described above.
!> The values are currently limited to 1/ulp, to avoid
!> overflow.
!> Modified.
!>
!> INFO INTEGER
!> If 0, then everything ran OK.
!> -1: NSIZES < 0
!> -2: Some NN(j) < 0
!> -3: NTYPES < 0
!> -5: THRESH < 0
!> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
!> -16: LDU < 1 or LDU < NMAX.
!> -21: LWORK too small.
!> If DLATMR, DLATMS, DSYTRD, DORGTR, DSTEQR, DSTERF,
!> or DORMTR returns an error code, the
!> absolute value of it is returned.
!> Modified.
!>
!>-----------------------------------------------------------------------
!>
!> Some Local Variables and Parameters:
!> ---- ----- --------- --- ----------
!> ZERO, ONE Real 0 and 1.
!> MAXTYP The number of types defined.
!> NTEST The number of tests performed, or which can
!> be performed so far, for the current matrix.
!> NTESTT The total number of tests performed so far.
!> NMAX Largest value in NN.
!> NMATS The number of matrices generated so far.
!> NERRS The number of tests which have exceeded THRESH
!> so far (computed by DLAFTS).
!> COND, IMODE Values to be passed to the matrix generators.
!> ANORM Norm of A; passed to matrix generators.
!>
!> OVFL, UNFL Overflow and underflow thresholds.
!> ULP, ULPINV Finest relative precision and its inverse.
!> RTOVFL, RTUNFL Square roots of the previous 2 values.
!> The following four arrays decode JTYPE:
!> KTYPE(j) The general type (1-10) for type .
!> KMODE(j) The MODE value to be passed to the matrix
!> generator for type .
!> KMAGN(j) The order of magnitude ( O(1),
!> O(overflow^(1/2) ), O(underflow^(1/2) )
!>
!> The tests performed are: Routine tested
!> 1= | A - U S U' | / ( |A| n ulp ) DSTEV('V', ... )
!> 2= | I - U U' | / ( n ulp ) DSTEV('V', ... )
!> 3= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEV('N', ... )
!> 4= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','A', ... )
!> 5= | I - U U' | / ( n ulp ) DSTEVX('V','A', ... )
!> 6= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVX('N','A', ... )
!> 7= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','A', ... )
!> 8= | I - U U' | / ( n ulp ) DSTEVR('V','A', ... )
!> 9= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVR('N','A', ... )
!> 10= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','I', ... )
!> 11= | I - U U' | / ( n ulp ) DSTEVX('V','I', ... )
!> 12= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVX('N','I', ... )
!> 13= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','V', ... )
!> 14= | I - U U' | / ( n ulp ) DSTEVX('V','V', ... )
!> 15= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVX('N','V', ... )
!> 16= | A - U S U' | / ( |A| n ulp ) DSTEVD('V', ... )
!> 17= | I - U U' | / ( n ulp ) DSTEVD('V', ... )
!> 18= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVD('N', ... )
!> 19= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','I', ... )
!> 20= | I - U U' | / ( n ulp ) DSTEVR('V','I', ... )
!> 21= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVR('N','I', ... )
!> 22= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','V', ... )
!> 23= | I - U U' | / ( n ulp ) DSTEVR('V','V', ... )
!> 24= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVR('N','V', ... )
!>
!> 25= | A - U S U' | / ( |A| n ulp ) DSYEV('L','V', ... )
!> 26= | I - U U' | / ( n ulp ) DSYEV('L','V', ... )
!> 27= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEV_2STAGE('L','N', ... )
!> 28= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','A', ... )
!> 29= | I - U U' | / ( n ulp ) DSYEVX('L','V','A', ... )
!> 30= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX_2STAGE('L','N','A', ... )
!> 31= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','I', ... )
!> 32= | I - U U' | / ( n ulp ) DSYEVX('L','V','I', ... )
!> 33= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX_2STAGE('L','N','I', ... )
!> 34= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','V', ... )
!> 35= | I - U U' | / ( n ulp ) DSYEVX('L','V','V', ... )
!> 36= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX_2STAGE('L','N','V', ... )
!> 37= | A - U S U' | / ( |A| n ulp ) DSPEV('L','V', ... )
!> 38= | I - U U' | / ( n ulp ) DSPEV('L','V', ... )
!> 39= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEV('L','N', ... )
!> 40= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','A', ... )
!> 41= | I - U U' | / ( n ulp ) DSPEVX('L','V','A', ... )
!> 42= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','A', ... )
!> 43= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','I', ... )
!> 44= | I - U U' | / ( n ulp ) DSPEVX('L','V','I', ... )
!> 45= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','I', ... )
!> 46= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','V', ... )
!> 47= | I - U U' | / ( n ulp ) DSPEVX('L','V','V', ... )
!> 48= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','V', ... )
!> 49= | A - U S U' | / ( |A| n ulp ) DSBEV('L','V', ... )
!> 50= | I - U U' | / ( n ulp ) DSBEV('L','V', ... )
!> 51= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEV_2STAGE('L','N', ... )
!> 52= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','A', ... )
!> 53= | I - U U' | / ( n ulp ) DSBEVX('L','V','A', ... )
!> 54= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX_2STAGE('L','N','A', ... )
!> 55= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','I', ... )
!> 56= | I - U U' | / ( n ulp ) DSBEVX('L','V','I', ... )
!> 57= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX_2STAGE('L','N','I', ... )
!> 58= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','V', ... )
!> 59= | I - U U' | / ( n ulp ) DSBEVX('L','V','V', ... )
!> 60= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX_2STAGE('L','N','V', ... )
!> 61= | A - U S U' | / ( |A| n ulp ) DSYEVD('L','V', ... )
!> 62= | I - U U' | / ( n ulp ) DSYEVD('L','V', ... )
!> 63= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVD_2STAGE('L','N', ... )
!> 64= | A - U S U' | / ( |A| n ulp ) DSPEVD('L','V', ... )
!> 65= | I - U U' | / ( n ulp ) DSPEVD('L','V', ... )
!> 66= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVD('L','N', ... )
!> 67= | A - U S U' | / ( |A| n ulp ) DSBEVD('L','V', ... )
!> 68= | I - U U' | / ( n ulp ) DSBEVD('L','V', ... )
!> 69= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVD_2STAGE('L','N', ... )
!> 70= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','A', ... )
!> 71= | I - U U' | / ( n ulp ) DSYEVR('L','V','A', ... )
!> 72= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR_2STAGE('L','N','A', ... )
!> 73= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','I', ... )
!> 74= | I - U U' | / ( n ulp ) DSYEVR('L','V','I', ... )
!> 75= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR_2STAGE('L','N','I', ... )
!> 76= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','V', ... )
!> 77= | I - U U' | / ( n ulp ) DSYEVR('L','V','V', ... )
!> 78= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR_2STAGE('L','N','V', ... )
!>
!> Tests 25 through 78 are repeated (as tests 79 through 132)
!> with UPLO='U'
!>
!> To be added in 1999
!>
!> 79= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','A', ... )
!> 80= | I - U U' | / ( n ulp ) DSPEVR('L','V','A', ... )
!> 81= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','A', ... )
!> 82= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','I', ... )
!> 83= | I - U U' | / ( n ulp ) DSPEVR('L','V','I', ... )
!> 84= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','I', ... )
!> 85= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','V', ... )
!> 86= | I - U U' | / ( n ulp ) DSPEVR('L','V','V', ... )
!> 87= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','V', ... )
!> 88= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','A', ... )
!> 89= | I - U U' | / ( n ulp ) DSBEVR('L','V','A', ... )
!> 90= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','A', ... )
!> 91= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','I', ... )
!> 92= | I - U U' | / ( n ulp ) DSBEVR('L','V','I', ... )
!> 93= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','I', ... )
!> 94= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','V', ... )
!> 95= | I - U U' | / ( n ulp ) DSBEVR('L','V','V', ... )
!> 96= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','V', ... )
!> Definition at line 449 of file ddrvst2stg.f.
| subroutine ddrvsx | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | niunit, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | h, | ||
| double precision, dimension( lda, * ) | ht, | ||
| double precision, dimension( * ) | wr, | ||
| double precision, dimension( * ) | wi, | ||
| double precision, dimension( * ) | wrt, | ||
| double precision, dimension( * ) | wit, | ||
| double precision, dimension( * ) | wrtmp, | ||
| double precision, dimension( * ) | witmp, | ||
| double precision, dimension( ldvs, * ) | vs, | ||
| integer | ldvs, | ||
| double precision, dimension( ldvs, * ) | vs1, | ||
| double precision, dimension( 17 ) | result, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| logical, dimension( * ) | bwork, | ||
| integer | info ) |
DDRVSX
!> !> DDRVSX checks the nonsymmetric eigenvalue (Schur form) problem !> expert driver DGEESX. !> !> DDRVSX uses both test matrices generated randomly depending on !> data supplied in the calling sequence, as well as on data !> read from an input file and including precomputed condition !> numbers to which it compares the ones it computes. !> !> When DDRVSX is called, a number of matrix () and a !> number of matrix are specified. For each size () !> and each type of matrix, one matrix will be generated and used !> to test the nonsymmetric eigenroutines. For each matrix, 15 !> tests will be performed: !> !> (1) 0 if T is in Schur form, 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (2) | A - VS T VS' | / ( n |A| ulp ) !> !> Here VS is the matrix of Schur eigenvectors, and T is in Schur !> form (no sorting of eigenvalues). !> !> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues). !> !> (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T !> 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (5) 0 if T(with VS) = T(without VS), !> 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS), !> 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (7) 0 if T is in Schur form, 1/ulp otherwise !> (with sorting of eigenvalues) !> !> (8) | A - VS T VS' | / ( n |A| ulp ) !> !> Here VS is the matrix of Schur eigenvectors, and T is in Schur !> form (with sorting of eigenvalues). !> !> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues). !> !> (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T !> 1/ulp otherwise !> If workspace sufficient, also compare WR, WI with and !> without reciprocal condition numbers !> (with sorting of eigenvalues) !> !> (11) 0 if T(with VS) = T(without VS), !> 1/ulp otherwise !> If workspace sufficient, also compare T with and without !> reciprocal condition numbers !> (with sorting of eigenvalues) !> !> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS), !> 1/ulp otherwise !> If workspace sufficient, also compare VS with and without !> reciprocal condition numbers !> (with sorting of eigenvalues) !> !> (13) if sorting worked and SDIM is the number of !> eigenvalues which were SELECTed !> If workspace sufficient, also compare SDIM with and !> without reciprocal condition numbers !> !> (14) if RCONDE the same no matter if VS and/or RCONDV computed !> !> (15) if RCONDV the same no matter if VS and/or RCONDE computed !> !> The are specified by an array NN(1:NSIZES); the value of !> each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) The zero matrix. !> (2) The identity matrix. !> (3) A (transposed) Jordan block, with 1's on the diagonal. !> !> (4) A diagonal matrix with evenly spaced entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (5) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (6) A diagonal matrix with entries 1, ULP, ..., ULP !> and random signs. !> !> (7) Same as (4), but multiplied by a constant near !> the overflow threshold !> (8) Same as (4), but multiplied by a constant near !> the underflow threshold !> !> (9) A matrix of the form U' T U, where U is orthogonal and !> T has evenly spaced entries 1, ..., ULP with random signs !> on the diagonal and random O(1) entries in the upper !> triangle. !> !> (10) A matrix of the form U' T U, where U is orthogonal and !> T has geometrically spaced entries 1, ..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (11) A matrix of the form U' T U, where U is orthogonal and !> T has entries 1, ULP,..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (12) A matrix of the form U' T U, where U is orthogonal and !> T has real or complex conjugate paired eigenvalues randomly !> chosen from ( ULP, 1 ) and random O(1) entries in the upper !> triangle. !> !> (13) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (14) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has geometrically spaced entries !> 1, ..., ULP with random signs on the diagonal and random !> O(1) entries in the upper triangle. !> !> (15) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has entries 1, ULP,..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (16) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has real or complex conjugate paired !> eigenvalues randomly chosen from ( ULP, 1 ) and random !> O(1) entries in the upper triangle. !> !> (17) Same as (16), but multiplied by a constant !> near the overflow threshold !> (18) Same as (16), but multiplied by a constant !> near the underflow threshold !> !> (19) Nonsymmetric matrix with random entries chosen from (-1,1). !> If N is at least 4, all entries in first two rows and last !> row, and first column and last two columns are zero. !> (20) Same as (19), but multiplied by a constant !> near the overflow threshold !> (21) Same as (19), but multiplied by a constant !> near the underflow threshold !> !> In addition, an input file will be read from logical unit number !> NIUNIT. The file contains matrices along with precomputed !> eigenvalues and reciprocal condition numbers for the eigenvalue !> average and right invariant subspace. For these matrices, in !> addition to tests (1) to (15) we will compute the following two !> tests: !> !> (16) |RCONDE - RCDEIN| / cond(RCONDE) !> !> RCONDE is the reciprocal average eigenvalue condition number !> computed by DGEESX and RCDEIN (the precomputed true value) !> is supplied as input. cond(RCONDE) is the condition number !> of RCONDE, and takes errors in computing RCONDE into account, !> so that the resulting quantity should be O(ULP). cond(RCONDE) !> is essentially given by norm(A)/RCONDV. !> !> (17) |RCONDV - RCDVIN| / cond(RCONDV) !> !> RCONDV is the reciprocal right invariant subspace condition !> number computed by DGEESX and RCDVIN (the precomputed true !> value) is supplied as input. cond(RCONDV) is the condition !> number of RCONDV, and takes errors in computing RCONDV into !> account, so that the resulting quantity should be O(ULP). !> cond(RCONDV) is essentially given by norm(A)/RCONDE. !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. NSIZES must be at !> least zero. If it is zero, no randomly generated matrices !> are tested, but any test matrices read from NIUNIT will be !> tested. !> |
| [in] | NN | !> NN is INTEGER array, 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. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. NTYPES must be at least !> zero. If it is zero, no randomly generated test matrices !> are tested, but and test matrices read from NIUNIT will be !> tested. 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(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DDRVSX to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NIUNIT | !> NIUNIT is INTEGER !> The FORTRAN unit number for reading in the data file of !> problems to solve. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns INFO not equal to 0.) !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Used to hold the matrix whose eigenvalues are to be !> computed. On exit, A contains the last matrix actually used. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, and H. LDA must be at !> least 1 and at least max( NN ). !> |
| [out] | H | !> H is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Another copy of the test matrix A, modified by DGEESX. !> |
| [out] | HT | !> HT is DOUBLE PRECISION array, dimension (LDA, max(NN)) !> Yet another copy of the test matrix A, modified by DGEESX. !> |
| [out] | WR | !> WR is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | WI | !> WI is DOUBLE PRECISION array, dimension (max(NN)) !> !> The real and imaginary parts of the eigenvalues of A. !> On exit, WR + WI*i are the eigenvalues of the matrix in A. !> |
| [out] | WRT | !> WRT is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | WIT | !> WIT is DOUBLE PRECISION array, dimension (max(NN)) !> !> Like WR, WI, these arrays contain the eigenvalues of A, !> but those computed when DGEESX only computes a partial !> eigendecomposition, i.e. not Schur vectors !> |
| [out] | WRTMP | !> WRTMP is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | WITMP | !> WITMP is DOUBLE PRECISION array, dimension (max(NN)) !> !> More temporary storage for eigenvalues. !> |
| [out] | VS | !> VS is DOUBLE PRECISION array, dimension (LDVS, max(NN)) !> VS holds the computed Schur vectors. !> |
| [in] | LDVS | !> LDVS is INTEGER !> Leading dimension of VS. Must be at least max(1,max(NN)). !> |
| [out] | VS1 | !> VS1 is DOUBLE PRECISION array, dimension (LDVS, max(NN)) !> VS1 holds another copy of the computed Schur vectors. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (17) !> The values computed by the 17 tests described above. !> The values are currently limited to 1/ulp, to avoid overflow. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. This must be at least !> max(3*NN(j),2*NN(j)**2) for all j. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (max(NN)*max(NN)) !> |
| [out] | BWORK | !> BWORK is LOGICAL array, dimension (max(NN)) !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, successful exit. !> <0, input parameter -INFO is incorrect !> >0, DLATMR, SLATMS, SLATME or DGET24 returned an error !> code and INFO is its absolute value !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NMAX Largest value in NN. !> NERRS The number of tests which have exceeded THRESH !> COND, CONDS, !> IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTULP, RTULPI Square roots of the previous 4 values. !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> KCONDS(j) Selectw whether CONDS is to be 1 or !> 1/sqrt(ulp). (0 means irrelevant.) !> |
Definition at line 450 of file ddrvsx.f.
| subroutine ddrvvx | ( | integer | nsizes, |
| integer, dimension( * ) | nn, | ||
| integer | ntypes, | ||
| logical, dimension( * ) | dotype, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | niunit, | ||
| integer | nounit, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | h, | ||
| double precision, dimension( * ) | wr, | ||
| double precision, dimension( * ) | wi, | ||
| double precision, dimension( * ) | wr1, | ||
| double precision, dimension( * ) | wi1, | ||
| double precision, dimension( ldvl, * ) | vl, | ||
| integer | ldvl, | ||
| double precision, dimension( ldvr, * ) | vr, | ||
| integer | ldvr, | ||
| double precision, dimension( ldlre, * ) | lre, | ||
| integer | ldlre, | ||
| double precision, dimension( * ) | rcondv, | ||
| double precision, dimension( * ) | rcndv1, | ||
| double precision, dimension( * ) | rcdvin, | ||
| double precision, dimension( * ) | rconde, | ||
| double precision, dimension( * ) | rcnde1, | ||
| double precision, dimension( * ) | rcdein, | ||
| double precision, dimension( * ) | scale, | ||
| double precision, dimension( * ) | scale1, | ||
| double precision, dimension( 11 ) | result, | ||
| double precision, dimension( * ) | work, | ||
| integer | nwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
DDRVVX
!> !> DDRVVX checks the nonsymmetric eigenvalue problem expert driver !> DGEEVX. !> !> DDRVVX uses both test matrices generated randomly depending on !> data supplied in the calling sequence, as well as on data !> read from an input file and including precomputed condition !> numbers to which it compares the ones it computes. !> !> When DDRVVX is called, a number of matrix () and a !> number of matrix are specified in the calling sequence. !> For each size () and each type of matrix, one matrix will be !> generated and used to test the nonsymmetric eigenroutines. For !> each matrix, 9 tests will be performed: !> !> (1) | A * VR - VR * W | / ( n |A| ulp ) !> !> Here VR is the matrix of unit right eigenvectors. !> W is a block diagonal matrix, with a 1x1 block for each !> real eigenvalue and a 2x2 block for each complex conjugate !> pair. If eigenvalues j and j+1 are a complex conjugate pair, !> so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the !> 2 x 2 block corresponding to the pair will be: !> !> ( wr wi ) !> ( -wi wr ) !> !> Such a block multiplying an n x 2 matrix ( ur ui ) on the !> right will be the same as multiplying ur + i*ui by wr + i*wi. !> !> (2) | A**H * VL - VL * W**H | / ( n |A| ulp ) !> !> Here VL is the matrix of unit left eigenvectors, A**H is the !> conjugate transpose of A, and W is as above. !> !> (3) | |VR(i)| - 1 | / ulp and largest component real !> !> VR(i) denotes the i-th column of VR. !> !> (4) | |VL(i)| - 1 | / ulp and largest component real !> !> VL(i) denotes the i-th column of VL. !> !> (5) W(full) = W(partial) !> !> W(full) denotes the eigenvalues computed when VR, VL, RCONDV !> and RCONDE are also computed, and W(partial) denotes the !> eigenvalues computed when only some of VR, VL, RCONDV, and !> RCONDE are computed. !> !> (6) VR(full) = VR(partial) !> !> VR(full) denotes the right eigenvectors computed when VL, RCONDV !> and RCONDE are computed, and VR(partial) denotes the result !> when only some of VL and RCONDV are computed. !> !> (7) VL(full) = VL(partial) !> !> VL(full) denotes the left eigenvectors computed when VR, RCONDV !> and RCONDE are computed, and VL(partial) denotes the result !> when only some of VR and RCONDV are computed. !> !> (8) 0 if SCALE, ILO, IHI, ABNRM (full) = !> SCALE, ILO, IHI, ABNRM (partial) !> 1/ulp otherwise !> !> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced. !> (full) is when VR, VL, RCONDE and RCONDV are also computed, and !> (partial) is when some are not computed. !> !> (9) RCONDV(full) = RCONDV(partial) !> !> RCONDV(full) denotes the reciprocal condition numbers of the !> right eigenvectors computed when VR, VL and RCONDE are also !> computed. RCONDV(partial) denotes the reciprocal condition !> numbers when only some of VR, VL and RCONDE are computed. !> !> The are specified by an array NN(1:NSIZES); the value of !> each element NN(j) specifies one size. !> The are specified by a logical array DOTYPE( 1:NTYPES ); !> if DOTYPE(j) is .TRUE., then matrix type will be generated. !> Currently, the list of possible types is: !> !> (1) The zero matrix. !> (2) The identity matrix. !> (3) A (transposed) Jordan block, with 1's on the diagonal. !> !> (4) A diagonal matrix with evenly spaced entries !> 1, ..., ULP and random signs. !> (ULP = (first number larger than 1) - 1 ) !> (5) A diagonal matrix with geometrically spaced entries !> 1, ..., ULP and random signs. !> (6) A diagonal matrix with entries 1, ULP, ..., ULP !> and random signs. !> !> (7) Same as (4), but multiplied by a constant near !> the overflow threshold !> (8) Same as (4), but multiplied by a constant near !> the underflow threshold !> !> (9) A matrix of the form U' T U, where U is orthogonal and !> T has evenly spaced entries 1, ..., ULP with random signs !> on the diagonal and random O(1) entries in the upper !> triangle. !> !> (10) A matrix of the form U' T U, where U is orthogonal and !> T has geometrically spaced entries 1, ..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (11) A matrix of the form U' T U, where U is orthogonal and !> T has entries 1, ULP,..., ULP with random !> signs on the diagonal and random O(1) entries in the upper !> triangle. !> !> (12) A matrix of the form U' T U, where U is orthogonal and !> T has real or complex conjugate paired eigenvalues randomly !> chosen from ( ULP, 1 ) and random O(1) entries in the upper !> triangle. !> !> (13) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (14) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has geometrically spaced entries !> 1, ..., ULP with random signs on the diagonal and random !> O(1) entries in the upper triangle. !> !> (15) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has entries 1, ULP,..., ULP !> with random signs on the diagonal and random O(1) entries !> in the upper triangle. !> !> (16) A matrix of the form X' T X, where X has condition !> SQRT( ULP ) and T has real or complex conjugate paired !> eigenvalues randomly chosen from ( ULP, 1 ) and random !> O(1) entries in the upper triangle. !> !> (17) Same as (16), but multiplied by a constant !> near the overflow threshold !> (18) Same as (16), but multiplied by a constant !> near the underflow threshold !> !> (19) Nonsymmetric matrix with random entries chosen from (-1,1). !> If N is at least 4, all entries in first two rows and last !> row, and first column and last two columns are zero. !> (20) Same as (19), but multiplied by a constant !> near the overflow threshold !> (21) Same as (19), but multiplied by a constant !> near the underflow threshold !> !> In addition, an input file will be read from logical unit number !> NIUNIT. The file contains matrices along with precomputed !> eigenvalues and reciprocal condition numbers for the eigenvalues !> and right eigenvectors. For these matrices, in addition to tests !> (1) to (9) we will compute the following two tests: !> !> (10) |RCONDV - RCDVIN| / cond(RCONDV) !> !> RCONDV is the reciprocal right eigenvector condition number !> computed by DGEEVX and RCDVIN (the precomputed true value) !> is supplied as input. cond(RCONDV) is the condition number of !> RCONDV, and takes errors in computing RCONDV into account, so !> that the resulting quantity should be O(ULP). cond(RCONDV) is !> essentially given by norm(A)/RCONDE. !> !> (11) |RCONDE - RCDEIN| / cond(RCONDE) !> !> RCONDE is the reciprocal eigenvalue condition number !> computed by DGEEVX and RCDEIN (the precomputed true value) !> is supplied as input. cond(RCONDE) is the condition number !> of RCONDE, and takes errors in computing RCONDE into account, !> so that the resulting quantity should be O(ULP). cond(RCONDE) !> is essentially given by norm(A)/RCONDV. !>
| [in] | NSIZES | !> NSIZES is INTEGER !> The number of sizes of matrices to use. NSIZES must be at !> least zero. If it is zero, no randomly generated matrices !> are tested, but any test matrices read from NIUNIT will be !> tested. !> |
| [in] | NN | !> NN is INTEGER array, 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. !> |
| [in] | NTYPES | !> NTYPES is INTEGER !> The number of elements in DOTYPE. NTYPES must be at least !> zero. If it is zero, no randomly generated test matrices !> are tested, but and test matrices read from NIUNIT will be !> tested. 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(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. . !> |
| [in] | DOTYPE | !> DOTYPE is LOGICAL array, 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+1) through DOTYPE(NTYPES) !> will be ignored. !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, 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(4) 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 DDRVVX to continue the same random number !> sequence. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NIUNIT | !> NIUNIT is INTEGER !> The FORTRAN unit number for reading in the data file of !> problems to solve. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns INFO not equal to 0.) !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension !> (LDA, max(NN,12)) !> Used to hold the matrix whose eigenvalues are to be !> computed. On exit, A contains the last matrix actually used. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the arrays A and H. !> LDA >= max(NN,12), since 12 is the dimension of the largest !> matrix in the precomputed input file. !> |
| [out] | H | !> H is DOUBLE PRECISION array, dimension !> (LDA, max(NN,12)) !> Another copy of the test matrix A, modified by DGEEVX. !> |
| [out] | WR | !> WR is DOUBLE PRECISION array, dimension (max(NN)) !> |
| [out] | WI | !> WI is DOUBLE PRECISION array, dimension (max(NN)) !> !> The real and imaginary parts of the eigenvalues of A. !> On exit, WR + WI*i are the eigenvalues of the matrix in A. !> |
| [out] | WR1 | !> WR1 is DOUBLE PRECISION array, dimension (max(NN,12)) !> |
| [out] | WI1 | !> WI1 is DOUBLE PRECISION array, dimension (max(NN,12)) !> !> Like WR, WI, these arrays contain the eigenvalues of A, !> but those computed when DGEEVX only computes a partial !> eigendecomposition, i.e. not the eigenvalues and left !> and right eigenvectors. !> |
| [out] | VL | !> VL is DOUBLE PRECISION array, dimension !> (LDVL, max(NN,12)) !> VL holds the computed left eigenvectors. !> |
| [in] | LDVL | !> LDVL is INTEGER !> Leading dimension of VL. Must be at least max(1,max(NN,12)). !> |
| [out] | VR | !> VR is DOUBLE PRECISION array, dimension !> (LDVR, max(NN,12)) !> VR holds the computed right eigenvectors. !> |
| [in] | LDVR | !> LDVR is INTEGER !> Leading dimension of VR. Must be at least max(1,max(NN,12)). !> |
| [out] | LRE | !> LRE is DOUBLE PRECISION array, dimension !> (LDLRE, max(NN,12)) !> LRE holds the computed right or left eigenvectors. !> |
| [in] | LDLRE | !> LDLRE is INTEGER !> Leading dimension of LRE. Must be at least max(1,max(NN,12)) !> |
| [out] | RCONDV | !> RCONDV is DOUBLE PRECISION array, dimension (N) !> RCONDV holds the computed reciprocal condition numbers !> for eigenvectors. !> |
| [out] | RCNDV1 | !> RCNDV1 is DOUBLE PRECISION array, dimension (N) !> RCNDV1 holds more computed reciprocal condition numbers !> for eigenvectors. !> |
| [out] | RCDVIN | !> RCDVIN is DOUBLE PRECISION array, dimension (N) !> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal !> condition numbers for eigenvectors to be compared with !> RCONDV. !> |
| [out] | RCONDE | !> RCONDE is DOUBLE PRECISION array, dimension (N) !> RCONDE holds the computed reciprocal condition numbers !> for eigenvalues. !> |
| [out] | RCNDE1 | !> RCNDE1 is DOUBLE PRECISION array, dimension (N) !> RCNDE1 holds more computed reciprocal condition numbers !> for eigenvalues. !> |
| [out] | RCDEIN | !> RCDEIN is DOUBLE PRECISION array, dimension (N) !> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal !> condition numbers for eigenvalues to be compared with !> RCONDE. !> |
| [out] | SCALE | !> SCALE is DOUBLE PRECISION array, dimension (N) !> Holds information describing balancing of matrix. !> |
| [out] | SCALE1 | !> SCALE1 is DOUBLE PRECISION array, dimension (N) !> Holds information describing balancing of matrix. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (11) !> The values computed by the seven tests described above. !> The values are currently limited to 1/ulp, to avoid overflow. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (NWORK) !> |
| [in] | NWORK | !> NWORK is INTEGER !> The number of entries in WORK. This must be at least !> max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) = !> max( 360 ,6*NN(j)+2*NN(j)**2) for all j. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (2*max(NN,12)) !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, then successful exit. !> If <0, then input parameter -INFO is incorrect. !> If >0, DLATMR, SLATMS, SLATME or DGET23 returned an error !> code, and INFO is its absolute value. !> !>----------------------------------------------------------------------- !> !> Some Local Variables and Parameters: !> ---- ----- --------- --- ---------- !> !> ZERO, ONE Real 0 and 1. !> MAXTYP The number of types defined. !> NMAX Largest value in NN or 12. !> NERRS The number of tests which have exceeded THRESH !> COND, CONDS, !> IMODE Values to be passed to the matrix generators. !> ANORM Norm of A; passed to matrix generators. !> !> OVFL, UNFL Overflow and underflow thresholds. !> ULP, ULPINV Finest relative precision and its inverse. !> RTULP, RTULPI Square roots of the previous 4 values. !> !> The following four arrays decode JTYPE: !> KTYPE(j) The general type (1-10) for type . !> KMODE(j) The MODE value to be passed to the matrix !> generator for type . !> KMAGN(j) The order of magnitude ( O(1), !> O(overflow^(1/2) ), O(underflow^(1/2) ) !> KCONDS(j) Selectw whether CONDS is to be 1 or !> 1/sqrt(ulp). (0 means irrelevant.) !> |
Definition at line 516 of file ddrvvx.f.
| subroutine derrbd | ( | character*3 | path, |
| integer | nunit ) |
DERRBD
!> !> DERRBD tests the error exits for DGEBD2, DGEBRD, DORGBR, DORMBR, !> DBDSQR, DBDSDC and DBDSVDX. !>
| [in] | PATH | !> PATH is CHARACTER*3 !> The LAPACK path name for the routines to be tested. !> |
| [in] | NUNIT | !> NUNIT is INTEGER !> The unit number for output. !> |
Definition at line 54 of file derrbd.f.
| subroutine derrec | ( | character*3 | path, |
| integer | nunit ) |
DERREC
!> !> DERREC tests the error exits for the routines for eigen- condition !> estimation for DOUBLE PRECISION matrices: !> DTRSYL, DTREXC, DTRSNA and DTRSEN. !>
| [in] | PATH | !> PATH is CHARACTER*3 !> The LAPACK path name for the routines to be tested. !> |
| [in] | NUNIT | !> NUNIT is INTEGER !> The unit number for output. !> |
Definition at line 55 of file derrec.f.
| subroutine derred | ( | character*3 | path, |
| integer | nunit ) |
DERRED
!> !> DERRED tests the error exits for the eigenvalue driver routines for !> DOUBLE PRECISION matrices: !> !> PATH driver description !> ---- ------ ----------- !> SEV DGEEV find eigenvalues/eigenvectors for nonsymmetric A !> SES DGEES find eigenvalues/Schur form for nonsymmetric A !> SVX DGEEVX SGEEV + balancing and condition estimation !> SSX DGEESX SGEES + balancing and condition estimation !> DBD DGESVD compute SVD of an M-by-N matrix A !> DGESDD compute SVD of an M-by-N matrix A (by divide and !> conquer) !> DGEJSV compute SVD of an M-by-N matrix A where M >= N !> DGESVDX compute SVD of an M-by-N matrix A(by bisection !> and inverse iteration) !> DGESVDQ compute SVD of an M-by-N matrix A(with a !> QR-Preconditioned ) !>
| [in] | PATH | !> PATH is CHARACTER*3 !> The LAPACK path name for the routines to be tested. !> |
| [in] | NUNIT | !> NUNIT is INTEGER !> The unit number for output. !> |
Definition at line 69 of file derred.f.
| subroutine derrgg | ( | character*3 | path, |
| integer | nunit ) |
DERRGG
!> !> DERRGG tests the error exits for DGGES, DGGESX, DGGEV, DGGEVX, !> DGGGLM, DGGHRD, DGGLSE, DGGQRF, DGGRQF, DGGSVD3, !> DGGSVP3, DHGEQZ, DORCSD, DTGEVC, DTGEXC, DTGSEN, DTGSJA, DTGSNA, !> DGGES3, DGGEV3, and DTGSYL. !>
| [in] | PATH | !> PATH is CHARACTER*3 !> The LAPACK path name for the routines to be tested. !> |
| [in] | NUNIT | !> NUNIT is INTEGER !> The unit number for output. !> |
Definition at line 56 of file derrgg.f.
| subroutine derrhs | ( | character*3 | path, |
| integer | nunit ) |
DERRHS
!> !> DERRHS tests the error exits for DGEBAK, SGEBAL, SGEHRD, DORGHR, !> DORMHR, DHSEQR, SHSEIN, and DTREVC. !>
| [in] | PATH | !> PATH is CHARACTER*3 !> The LAPACK path name for the routines to be tested. !> |
| [in] | NUNIT | !> NUNIT is INTEGER !> The unit number for output. !> |
Definition at line 54 of file derrhs.f.
| subroutine derrst | ( | character*3 | path, |
| integer | nunit ) |
DERRST
!> !> DERRST tests the error exits for DSYTRD, DORGTR, DORMTR, DSPTRD, !> DOPGTR, DOPMTR, DSTEQR, SSTERF, SSTEBZ, SSTEIN, DPTEQR, DSBTRD, !> DSYEV, SSYEVX, SSYEVD, DSBEV, SSBEVX, SSBEVD, !> DSPEV, SSPEVX, SSPEVD, DSTEV, SSTEVX, SSTEVD, and SSTEDC. !> DSYEVD_2STAGE, DSYEVR_2STAGE, DSYEVX_2STAGE, !> DSYEV_2STAGE, DSBEV_2STAGE, DSBEVD_2STAGE, !> DSBEVX_2STAGE, DSYTRD_2STAGE, DSYTRD_SY2SB, !> DSYTRD_SB2ST !>
| [in] | PATH | !> PATH is CHARACTER*3 !> The LAPACK path name for the routines to be tested. !> |
| [in] | NUNIT | !> NUNIT is INTEGER !> The unit number for output. !> |
Definition at line 60 of file derrst.f.
| subroutine dget02 | ( | character | trans, |
| integer | m, | ||
| integer | n, | ||
| integer | nrhs, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldx, * ) | x, | ||
| integer | ldx, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision, dimension( * ) | rwork, | ||
| double precision | resid ) |
DGET02
!> !> DGET02 computes the residual for a solution of a system of linear !> equations op(A)*X = B: !> RESID = norm(B - op(A)*X) / ( norm(op(A)) * norm(X) * EPS ), !> where op(A) = A or A**T, depending on TRANS, and EPS is the !> machine epsilon. !> The norm used is the 1-norm. !>
| [in] | TRANS | !> TRANS is CHARACTER*1 !> Specifies the form of the system of equations: !> = 'N': A * X = B (No transpose) !> = 'T': A**T * X = B (Transpose) !> = 'C': A**H * X = B (Conjugate transpose = Transpose) !> |
| [in] | M | !> M is INTEGER !> The number of rows of the matrix A. M >= 0. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrix A. N >= 0. !> |
| [in] | NRHS | !> NRHS is INTEGER !> The number of columns of B, the matrix of right hand sides. !> NRHS >= 0. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> The original M x N matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !> |
| [in] | X | !> X is DOUBLE PRECISION array, dimension (LDX,NRHS) !> The computed solution vectors for the system of linear !> equations. !> |
| [in] | LDX | !> LDX is INTEGER !> The leading dimension of the array X. If TRANS = 'N', !> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M). !> |
| [in,out] | B | !> B is DOUBLE PRECISION array, dimension (LDB,NRHS) !> On entry, the right hand side vectors for the system of !> linear equations. !> On exit, B is overwritten with the difference B - A*X. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the array B. IF TRANS = 'N', !> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N). !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (M) !> |
| [out] | RESID | !> RESID is DOUBLE PRECISION !> The maximum over the number of right hand sides of !> norm(B - op(A)*X) / ( norm(op(A)) * norm(X) * EPS ). !> |
Definition at line 133 of file dget02.f.
| subroutine dget10 | ( | integer | m, |
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision, dimension( * ) | work, | ||
| double precision | result ) |
DGET10
!> !> DGET10 compares two matrices A and B and computes the ratio !> RESULT = norm( A - B ) / ( norm(A) * M * EPS ) !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrices A and B. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices A and B. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> The m by n matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB,N) !> The m by n matrix B. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the array B. LDB >= max(1,M). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (M) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION !> RESULT = norm( A - B ) / ( norm(A) * M * EPS ) !> |
Definition at line 92 of file dget10.f.
| subroutine dget22 | ( | character | transa, |
| character | transe, | ||
| character | transw, | ||
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lde, * ) | e, | ||
| integer | lde, | ||
| double precision, dimension( * ) | wr, | ||
| double precision, dimension( * ) | wi, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( 2 ) | result ) |
DGET22
!> !> DGET22 does an eigenvector check. !> !> The basic test is: !> !> RESULT(1) = | A E - E W | / ( |A| |E| ulp ) !> !> using the 1-norm. It also tests the normalization of E: !> !> RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp ) !> j !> !> where E(j) is the j-th eigenvector, and m-norm is the max-norm of a !> vector. If an eigenvector is complex, as determined from WI(j) !> nonzero, then the max-norm of the vector ( er + i*ei ) is the maximum !> of !> |er(1)| + |ei(1)|, ... , |er(n)| + |ei(n)| !> !> W is a block diagonal matrix, with a 1 by 1 block for each real !> eigenvalue and a 2 by 2 block for each complex conjugate pair. !> If eigenvalues j and j+1 are a complex conjugate pair, so that !> WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the 2 by 2 !> block corresponding to the pair will be: !> !> ( wr wi ) !> ( -wi wr ) !> !> Such a block multiplying an n by 2 matrix ( ur ui ) on the right !> will be the same as multiplying ur + i*ui by wr + i*wi. !> !> To handle various schemes for storage of left eigenvectors, there are !> options to use A-transpose instead of A, E-transpose instead of E, !> and/or W-transpose instead of W. !>
| [in] | TRANSA | !> TRANSA is CHARACTER*1 !> Specifies whether or not A is transposed. !> = 'N': No transpose !> = 'T': Transpose !> = 'C': Conjugate transpose (= Transpose) !> |
| [in] | TRANSE | !> TRANSE is CHARACTER*1 !> Specifies whether or not E is transposed. !> = 'N': No transpose, eigenvectors are in columns of E !> = 'T': Transpose, eigenvectors are in rows of E !> = 'C': Conjugate transpose (= Transpose) !> |
| [in] | TRANSW | !> TRANSW is CHARACTER*1 !> Specifies whether or not W is transposed. !> = 'N': No transpose !> = 'T': Transpose, use -WI(j) instead of WI(j) !> = 'C': Conjugate transpose, use -WI(j) instead of WI(j) !> |
| [in] | N | !> N is INTEGER !> The order of the matrix A. N >= 0. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> The matrix whose eigenvectors are in E. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,N). !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (LDE,N) !> The matrix of eigenvectors. If TRANSE = 'N', the eigenvectors !> are stored in the columns of E, if TRANSE = 'T' or 'C', the !> eigenvectors are stored in the rows of E. !> |
| [in] | LDE | !> LDE is INTEGER !> The leading dimension of the array E. LDE >= max(1,N). !> |
| [in] | WR | !> WR is DOUBLE PRECISION array, dimension (N) !> |
| [in] | WI | !> WI is DOUBLE PRECISION array, dimension (N) !> !> The real and imaginary parts of the eigenvalues of A. !> Purely real eigenvalues are indicated by WI(j) = 0. !> Complex conjugate pairs are indicated by WR(j)=WR(j+1) and !> WI(j) = - WI(j+1) non-zero; the real part is assumed to be !> stored in the j-th row/column and the imaginary part in !> the (j+1)-th row/column. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (N*(N+1)) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> RESULT(1) = | A E - E W | / ( |A| |E| ulp ) !> RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp ) !> j !> |
Definition at line 166 of file dget22.f.
| subroutine dget23 | ( | logical | comp, |
| character | balanc, | ||
| integer | jtype, | ||
| double precision | thresh, | ||
| integer, dimension( 4 ) | iseed, | ||
| integer | nounit, | ||
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | h, | ||
| double precision, dimension( * ) | wr, | ||
| double precision, dimension( * ) | wi, | ||
| double precision, dimension( * ) | wr1, | ||
| double precision, dimension( * ) | wi1, | ||
| double precision, dimension( ldvl, * ) | vl, | ||
| integer | ldvl, | ||
| double precision, dimension( ldvr, * ) | vr, | ||
| integer | ldvr, | ||
| double precision, dimension( ldlre, * ) | lre, | ||
| integer | ldlre, | ||
| double precision, dimension( * ) | rcondv, | ||
| double precision, dimension( * ) | rcndv1, | ||
| double precision, dimension( * ) | rcdvin, | ||
| double precision, dimension( * ) | rconde, | ||
| double precision, dimension( * ) | rcnde1, | ||
| double precision, dimension( * ) | rcdein, | ||
| double precision, dimension( * ) | scale, | ||
| double precision, dimension( * ) | scale1, | ||
| double precision, dimension( 11 ) | result, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
DGET23
!> !> DGET23 checks the nonsymmetric eigenvalue problem driver SGEEVX. !> If COMP = .FALSE., the first 8 of the following tests will be !> performed on the input matrix A, and also test 9 if LWORK is !> sufficiently large. !> if COMP is .TRUE. all 11 tests will be performed. !> !> (1) | A * VR - VR * W | / ( n |A| ulp ) !> !> Here VR is the matrix of unit right eigenvectors. !> W is a block diagonal matrix, with a 1x1 block for each !> real eigenvalue and a 2x2 block for each complex conjugate !> pair. If eigenvalues j and j+1 are a complex conjugate pair, !> so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the !> 2 x 2 block corresponding to the pair will be: !> !> ( wr wi ) !> ( -wi wr ) !> !> Such a block multiplying an n x 2 matrix ( ur ui ) on the !> right will be the same as multiplying ur + i*ui by wr + i*wi. !> !> (2) | A**H * VL - VL * W**H | / ( n |A| ulp ) !> !> Here VL is the matrix of unit left eigenvectors, A**H is the !> conjugate transpose of A, and W is as above. !> !> (3) | |VR(i)| - 1 | / ulp and largest component real !> !> VR(i) denotes the i-th column of VR. !> !> (4) | |VL(i)| - 1 | / ulp and largest component real !> !> VL(i) denotes the i-th column of VL. !> !> (5) 0 if W(full) = W(partial), 1/ulp otherwise !> !> W(full) denotes the eigenvalues computed when VR, VL, RCONDV !> and RCONDE are also computed, and W(partial) denotes the !> eigenvalues computed when only some of VR, VL, RCONDV, and !> RCONDE are computed. !> !> (6) 0 if VR(full) = VR(partial), 1/ulp otherwise !> !> VR(full) denotes the right eigenvectors computed when VL, RCONDV !> and RCONDE are computed, and VR(partial) denotes the result !> when only some of VL and RCONDV are computed. !> !> (7) 0 if VL(full) = VL(partial), 1/ulp otherwise !> !> VL(full) denotes the left eigenvectors computed when VR, RCONDV !> and RCONDE are computed, and VL(partial) denotes the result !> when only some of VR and RCONDV are computed. !> !> (8) 0 if SCALE, ILO, IHI, ABNRM (full) = !> SCALE, ILO, IHI, ABNRM (partial) !> 1/ulp otherwise !> !> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced. !> (full) is when VR, VL, RCONDE and RCONDV are also computed, and !> (partial) is when some are not computed. !> !> (9) 0 if RCONDV(full) = RCONDV(partial), 1/ulp otherwise !> !> RCONDV(full) denotes the reciprocal condition numbers of the !> right eigenvectors computed when VR, VL and RCONDE are also !> computed. RCONDV(partial) denotes the reciprocal condition !> numbers when only some of VR, VL and RCONDE are computed. !> !> (10) |RCONDV - RCDVIN| / cond(RCONDV) !> !> RCONDV is the reciprocal right eigenvector condition number !> computed by DGEEVX and RCDVIN (the precomputed true value) !> is supplied as input. cond(RCONDV) is the condition number of !> RCONDV, and takes errors in computing RCONDV into account, so !> that the resulting quantity should be O(ULP). cond(RCONDV) is !> essentially given by norm(A)/RCONDE. !> !> (11) |RCONDE - RCDEIN| / cond(RCONDE) !> !> RCONDE is the reciprocal eigenvalue condition number !> computed by DGEEVX and RCDEIN (the precomputed true value) !> is supplied as input. cond(RCONDE) is the condition number !> of RCONDE, and takes errors in computing RCONDE into account, !> so that the resulting quantity should be O(ULP). cond(RCONDE) !> is essentially given by norm(A)/RCONDV. !>
| [in] | COMP | !> COMP is LOGICAL !> COMP describes which input tests to perform: !> = .FALSE. if the computed condition numbers are not to !> be tested against RCDVIN and RCDEIN !> = .TRUE. if they are to be compared !> |
| [in] | BALANC | !> BALANC is CHARACTER !> Describes the balancing option to be tested. !> = 'N' for no permuting or diagonal scaling !> = 'P' for permuting but no diagonal scaling !> = 'S' for no permuting but diagonal scaling !> = 'B' for permuting and diagonal scaling !> |
| [in] | JTYPE | !> JTYPE is INTEGER !> Type of input matrix. Used to label output if error occurs. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | ISEED | !> ISEED is INTEGER array, dimension (4) !> If COMP = .FALSE., the random number generator seed !> used to produce matrix. !> If COMP = .TRUE., ISEED(1) = the number of the example. !> Used to label output if error occurs. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns INFO not equal to 0.) !> |
| [in] | N | !> N is INTEGER !> The dimension of A. N must be at least 0. !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> Used to hold the matrix whose eigenvalues are to be !> computed. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, and H. LDA must be at !> least 1 and at least N. !> |
| [out] | H | !> H is DOUBLE PRECISION array, dimension (LDA,N) !> Another copy of the test matrix A, modified by DGEEVX. !> |
| [out] | WR | !> WR is DOUBLE PRECISION array, dimension (N) !> |
| [out] | WI | !> WI is DOUBLE PRECISION array, dimension (N) !> !> The real and imaginary parts of the eigenvalues of A. !> On exit, WR + WI*i are the eigenvalues of the matrix in A. !> |
| [out] | WR1 | !> WR1 is DOUBLE PRECISION array, dimension (N) !> |
| [out] | WI1 | !> WI1 is DOUBLE PRECISION array, dimension (N) !> !> Like WR, WI, these arrays contain the eigenvalues of A, !> but those computed when DGEEVX only computes a partial !> eigendecomposition, i.e. not the eigenvalues and left !> and right eigenvectors. !> |
| [out] | VL | !> VL is DOUBLE PRECISION array, dimension (LDVL,N) !> VL holds the computed left eigenvectors. !> |
| [in] | LDVL | !> LDVL is INTEGER !> Leading dimension of VL. Must be at least max(1,N). !> |
| [out] | VR | !> VR is DOUBLE PRECISION array, dimension (LDVR,N) !> VR holds the computed right eigenvectors. !> |
| [in] | LDVR | !> LDVR is INTEGER !> Leading dimension of VR. Must be at least max(1,N). !> |
| [out] | LRE | !> LRE is DOUBLE PRECISION array, dimension (LDLRE,N) !> LRE holds the computed right or left eigenvectors. !> |
| [in] | LDLRE | !> LDLRE is INTEGER !> Leading dimension of LRE. Must be at least max(1,N). !> |
| [out] | RCONDV | !> RCONDV is DOUBLE PRECISION array, dimension (N) !> RCONDV holds the computed reciprocal condition numbers !> for eigenvectors. !> |
| [out] | RCNDV1 | !> RCNDV1 is DOUBLE PRECISION array, dimension (N) !> RCNDV1 holds more computed reciprocal condition numbers !> for eigenvectors. !> |
| [in] | RCDVIN | !> RCDVIN is DOUBLE PRECISION array, dimension (N) !> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal !> condition numbers for eigenvectors to be compared with !> RCONDV. !> |
| [out] | RCONDE | !> RCONDE is DOUBLE PRECISION array, dimension (N) !> RCONDE holds the computed reciprocal condition numbers !> for eigenvalues. !> |
| [out] | RCNDE1 | !> RCNDE1 is DOUBLE PRECISION array, dimension (N) !> RCNDE1 holds more computed reciprocal condition numbers !> for eigenvalues. !> |
| [in] | RCDEIN | !> RCDEIN is DOUBLE PRECISION array, dimension (N) !> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal !> condition numbers for eigenvalues to be compared with !> RCONDE. !> |
| [out] | SCALE | !> SCALE is DOUBLE PRECISION array, dimension (N) !> Holds information describing balancing of matrix. !> |
| [out] | SCALE1 | !> SCALE1 is DOUBLE PRECISION array, dimension (N) !> Holds information describing balancing of matrix. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (11) !> The values computed by the 11 tests described above. !> The values are currently limited to 1/ulp, to avoid !> overflow. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK. This must be at least !> 3*N, and 6*N+N**2 if tests 9, 10 or 11 are to be performed. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (2*N) !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, successful exit. !> If <0, input parameter -INFO had an incorrect value. !> If >0, DGEEVX returned an error code, the absolute !> value of which is returned. !> |
Definition at line 373 of file dget23.f.
| subroutine dget24 | ( | logical | comp, |
| integer | jtype, | ||
| double precision | thresh, | ||
| integer, dimension( 4 ) | iseed, | ||
| integer | nounit, | ||
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( lda, * ) | h, | ||
| double precision, dimension( lda, * ) | ht, | ||
| double precision, dimension( * ) | wr, | ||
| double precision, dimension( * ) | wi, | ||
| double precision, dimension( * ) | wrt, | ||
| double precision, dimension( * ) | wit, | ||
| double precision, dimension( * ) | wrtmp, | ||
| double precision, dimension( * ) | witmp, | ||
| double precision, dimension( ldvs, * ) | vs, | ||
| integer | ldvs, | ||
| double precision, dimension( ldvs, * ) | vs1, | ||
| double precision | rcdein, | ||
| double precision | rcdvin, | ||
| integer | nslct, | ||
| integer, dimension( * ) | islct, | ||
| double precision, dimension( 17 ) | result, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| logical, dimension( * ) | bwork, | ||
| integer | info ) |
DGET24
!> !> DGET24 checks the nonsymmetric eigenvalue (Schur form) problem !> expert driver DGEESX. !> !> If COMP = .FALSE., the first 13 of the following tests will be !> be performed on the input matrix A, and also tests 14 and 15 !> if LWORK is sufficiently large. !> If COMP = .TRUE., all 17 test will be performed. !> !> (1) 0 if T is in Schur form, 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (2) | A - VS T VS' | / ( n |A| ulp ) !> !> Here VS is the matrix of Schur eigenvectors, and T is in Schur !> form (no sorting of eigenvalues). !> !> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues). !> !> (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T !> 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (5) 0 if T(with VS) = T(without VS), !> 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS), !> 1/ulp otherwise !> (no sorting of eigenvalues) !> !> (7) 0 if T is in Schur form, 1/ulp otherwise !> (with sorting of eigenvalues) !> !> (8) | A - VS T VS' | / ( n |A| ulp ) !> !> Here VS is the matrix of Schur eigenvectors, and T is in Schur !> form (with sorting of eigenvalues). !> !> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues). !> !> (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T !> 1/ulp otherwise !> If workspace sufficient, also compare WR, WI with and !> without reciprocal condition numbers !> (with sorting of eigenvalues) !> !> (11) 0 if T(with VS) = T(without VS), !> 1/ulp otherwise !> If workspace sufficient, also compare T with and without !> reciprocal condition numbers !> (with sorting of eigenvalues) !> !> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS), !> 1/ulp otherwise !> If workspace sufficient, also compare VS with and without !> reciprocal condition numbers !> (with sorting of eigenvalues) !> !> (13) if sorting worked and SDIM is the number of !> eigenvalues which were SELECTed !> If workspace sufficient, also compare SDIM with and !> without reciprocal condition numbers !> !> (14) if RCONDE the same no matter if VS and/or RCONDV computed !> !> (15) if RCONDV the same no matter if VS and/or RCONDE computed !> !> (16) |RCONDE - RCDEIN| / cond(RCONDE) !> !> RCONDE is the reciprocal average eigenvalue condition number !> computed by DGEESX and RCDEIN (the precomputed true value) !> is supplied as input. cond(RCONDE) is the condition number !> of RCONDE, and takes errors in computing RCONDE into account, !> so that the resulting quantity should be O(ULP). cond(RCONDE) !> is essentially given by norm(A)/RCONDV. !> !> (17) |RCONDV - RCDVIN| / cond(RCONDV) !> !> RCONDV is the reciprocal right invariant subspace condition !> number computed by DGEESX and RCDVIN (the precomputed true !> value) is supplied as input. cond(RCONDV) is the condition !> number of RCONDV, and takes errors in computing RCONDV into !> account, so that the resulting quantity should be O(ULP). !> cond(RCONDV) is essentially given by norm(A)/RCONDE. !>
| [in] | COMP | !> COMP is LOGICAL !> COMP describes which input tests to perform: !> = .FALSE. if the computed condition numbers are not to !> be tested against RCDVIN and RCDEIN !> = .TRUE. if they are to be compared !> |
| [in] | JTYPE | !> JTYPE is INTEGER !> Type of input matrix. Used to label output if error occurs. !> |
| [in] | ISEED | !> ISEED is INTEGER array, dimension (4) !> If COMP = .FALSE., the random number generator seed !> used to produce matrix. !> If COMP = .TRUE., ISEED(1) = the number of the example. !> Used to label output if error occurs. !> |
| [in] | THRESH | !> THRESH is DOUBLE PRECISION !> A test will count as if the , 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. !> |
| [in] | NOUNIT | !> NOUNIT is INTEGER !> The FORTRAN unit number for printing out error messages !> (e.g., if a routine returns INFO not equal to 0.) !> |
| [in] | N | !> N is INTEGER !> The dimension of A. N must be at least 0. !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, dimension (LDA, N) !> Used to hold the matrix whose eigenvalues are to be !> computed. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A, and H. LDA must be at !> least 1 and at least N. !> |
| [out] | H | !> H is DOUBLE PRECISION array, dimension (LDA, N) !> Another copy of the test matrix A, modified by DGEESX. !> |
| [out] | HT | !> HT is DOUBLE PRECISION array, dimension (LDA, N) !> Yet another copy of the test matrix A, modified by DGEESX. !> |
| [out] | WR | !> WR is DOUBLE PRECISION array, dimension (N) !> |
| [out] | WI | !> WI is DOUBLE PRECISION array, dimension (N) !> !> The real and imaginary parts of the eigenvalues of A. !> On exit, WR + WI*i are the eigenvalues of the matrix in A. !> |
| [out] | WRT | !> WRT is DOUBLE PRECISION array, dimension (N) !> |
| [out] | WIT | !> WIT is DOUBLE PRECISION array, dimension (N) !> !> Like WR, WI, these arrays contain the eigenvalues of A, !> but those computed when DGEESX only computes a partial !> eigendecomposition, i.e. not Schur vectors !> |
| [out] | WRTMP | !> WRTMP is DOUBLE PRECISION array, dimension (N) !> |
| [out] | WITMP | !> WITMP is DOUBLE PRECISION array, dimension (N) !> !> Like WR, WI, these arrays contain the eigenvalues of A, !> but sorted by increasing real part. !> |
| [out] | VS | !> VS is DOUBLE PRECISION array, dimension (LDVS, N) !> VS holds the computed Schur vectors. !> |
| [in] | LDVS | !> LDVS is INTEGER !> Leading dimension of VS. Must be at least max(1, N). !> |
| [out] | VS1 | !> VS1 is DOUBLE PRECISION array, dimension (LDVS, N) !> VS1 holds another copy of the computed Schur vectors. !> |
| [in] | RCDEIN | !> RCDEIN is DOUBLE PRECISION !> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal !> condition number for the average of selected eigenvalues. !> |
| [in] | RCDVIN | !> RCDVIN is DOUBLE PRECISION !> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal !> condition number for the selected right invariant subspace. !> |
| [in] | NSLCT | !> NSLCT is INTEGER !> When COMP = .TRUE. the number of selected eigenvalues !> corresponding to the precomputed values RCDEIN and RCDVIN. !> |
| [in] | ISLCT | !> ISLCT is INTEGER array, dimension (NSLCT) !> When COMP = .TRUE. ISLCT selects the eigenvalues of the !> input matrix corresponding to the precomputed values RCDEIN !> and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the !> eigenvalue with the J-th largest real part is selected. !> Not referenced if COMP = .FALSE. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (17) !> The values computed by the 17 tests described above. !> The values are currently limited to 1/ulp, to avoid !> overflow. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The number of entries in WORK to be passed to DGEESX. This !> must be at least 3*N, and N+N**2 if tests 14--16 are to !> be performed. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (N*N) !> |
| [out] | BWORK | !> BWORK is LOGICAL array, dimension (N) !> |
| [out] | INFO | !> INFO is INTEGER !> If 0, successful exit. !> If <0, input parameter -INFO had an incorrect value. !> If >0, DGEESX returned an error code, the absolute !> value of which is returned. !> |
Definition at line 339 of file dget24.f.
| subroutine dget31 | ( | double precision | rmax, |
| integer | lmax, | ||
| integer, dimension( 2 ) | ninfo, | ||
| integer | knt ) |
DGET31
!> !> DGET31 tests DLALN2, a routine for solving !> !> (ca A - w D)X = sB !> !> where A is an NA by NA matrix (NA=1 or 2 only), w is a real (NW=1) or !> complex (NW=2) constant, ca is a real constant, D is an NA by NA real !> diagonal matrix, and B is an NA by NW matrix (when NW=2 the second !> column of B contains the imaginary part of the solution). The code !> returns X and s, where s is a scale factor, less than or equal to 1, !> which is chosen to avoid overflow in X. !> !> If any singular values of ca A-w D are less than another input !> parameter SMIN, they are perturbed up to SMIN. !> !> The test condition is that the scaled residual !> !> norm( (ca A-w D)*X - s*B ) / !> ( max( ulp*norm(ca A-w D), SMIN )*norm(X) ) !> !> should be on the order of 1. Here, ulp is the machine precision. !> Also, it is verified that SCALE is less than or equal to 1, and that !> XNORM = infinity-norm(X). !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION !> Value of the largest test ratio. !> |
| [out] | LMAX | !> LMAX is INTEGER !> Example number where largest test ratio achieved. !> |
| [out] | NINFO | !> NINFO is INTEGER array, dimension (3) !> NINFO(1) = number of examples with INFO less than 0 !> NINFO(2) = number of examples with INFO greater than 0 !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
Definition at line 90 of file dget31.f.
| subroutine dget32 | ( | double precision | rmax, |
| integer | lmax, | ||
| integer | ninfo, | ||
| integer | knt ) |
DGET32
!> !> DGET32 tests DLASY2, a routine for solving !> !> op(TL)*X + ISGN*X*op(TR) = SCALE*B !> !> where TL is N1 by N1, TR is N2 by N2, and N1,N2 =1 or 2 only. !> X and B are N1 by N2, op() is an optional transpose, an !> ISGN = 1 or -1. SCALE is chosen less than or equal to 1 to !> avoid overflow in X. !> !> The test condition is that the scaled residual !> !> norm( op(TL)*X + ISGN*X*op(TR) = SCALE*B ) !> / ( max( ulp*norm(TL), ulp*norm(TR)) * norm(X), SMLNUM ) !> !> should be on the order of 1. Here, ulp is the machine precision. !> Also, it is verified that SCALE is less than or equal to 1, and !> that XNORM = infinity-norm(X). !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION !> Value of the largest test ratio. !> |
| [out] | LMAX | !> LMAX is INTEGER !> Example number where largest test ratio achieved. !> |
| [out] | NINFO | !> NINFO is INTEGER !> Number of examples returned with INFO.NE.0. !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
Definition at line 81 of file dget32.f.
| subroutine dget33 | ( | double precision | rmax, |
| integer | lmax, | ||
| integer | ninfo, | ||
| integer | knt ) |
DGET33
!> !> DGET33 tests DLANV2, a routine for putting 2 by 2 blocks into !> standard form. In other words, it computes a two by two rotation !> [[C,S] [-S,C]] where in !> !> [ C S ][T(1,1) T(1,2)][ C -S ] = [ T11 T12 ] !> [-S C ][T(2,1) T(2,2)][ S C ] [ T21 T22 ] !> !> either !> 1) T21=0 (real eigenvalues), or !> 2) T11=T22 and T21*T12<0 (complex conjugate eigenvalues). !> We also verify that the residual is small. !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION !> Value of the largest test ratio. !> |
| [out] | LMAX | !> LMAX is INTEGER !> Example number where largest test ratio achieved. !> |
| [out] | NINFO | !> NINFO is INTEGER !> Number of examples returned with INFO .NE. 0. !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
Definition at line 75 of file dget33.f.
| subroutine dget34 | ( | double precision | rmax, |
| integer | lmax, | ||
| integer, dimension( 2 ) | ninfo, | ||
| integer | knt ) |
DGET34
!> !> DGET34 tests DLAEXC, a routine for swapping adjacent blocks (either !> 1 by 1 or 2 by 2) on the diagonal of a matrix in real Schur form. !> Thus, DLAEXC computes an orthogonal matrix Q such that !> !> Q' * [ A B ] * Q = [ C1 B1 ] !> [ 0 C ] [ 0 A1 ] !> !> where C1 is similar to C and A1 is similar to A. Both A and C are !> assumed to be in standard form (equal diagonal entries and !> offdiagonal with differing signs) and A1 and C1 are returned with the !> same properties. !> !> The test code verifies these last assertions, as well as that !> the residual in the above equation is small. !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION !> Value of the largest test ratio. !> |
| [out] | LMAX | !> LMAX is INTEGER !> Example number where largest test ratio achieved. !> |
| [out] | NINFO | !> NINFO is INTEGER array, dimension (2) !> NINFO(J) is the number of examples where INFO=J occurred. !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
Definition at line 81 of file dget34.f.
| subroutine dget35 | ( | double precision | rmax, |
| integer | lmax, | ||
| integer | ninfo, | ||
| integer | knt ) |
DGET35
!> !> DGET35 tests DTRSYL, a routine for solving the Sylvester matrix !> equation !> !> op(A)*X + ISGN*X*op(B) = scale*C, !> !> A and B are assumed to be in Schur canonical form, op() represents an !> optional transpose, and ISGN can be -1 or +1. Scale is an output !> less than or equal to 1, chosen to avoid overflow in X. !> !> The test code verifies that the following residual is order 1: !> !> norm(op(A)*X + ISGN*X*op(B) - scale*C) / !> (EPS*max(norm(A),norm(B))*norm(X)) !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION !> Value of the largest test ratio. !> |
| [out] | LMAX | !> LMAX is INTEGER !> Example number where largest test ratio achieved. !> |
| [out] | NINFO | !> NINFO is INTEGER !> Number of examples where INFO is nonzero. !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
Definition at line 77 of file dget35.f.
| subroutine dget36 | ( | double precision | rmax, |
| integer | lmax, | ||
| integer, dimension( 3 ) | ninfo, | ||
| integer | knt, | ||
| integer | nin ) |
DGET36
!> !> DGET36 tests DTREXC, a routine for moving blocks (either 1 by 1 or !> 2 by 2) on the diagonal of a matrix in real Schur form. Thus, DLAEXC !> computes an orthogonal matrix Q such that !> !> Q' * T1 * Q = T2 !> !> and where one of the diagonal blocks of T1 (the one at row IFST) has !> been moved to position ILST. !> !> The test code verifies that the residual Q'*T1*Q-T2 is small, that T2 !> is in Schur form, and that the final position of the IFST block is !> ILST (within +-1). !> !> The test matrices are read from a file with logical unit number NIN. !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION !> Value of the largest test ratio. !> |
| [out] | LMAX | !> LMAX is INTEGER !> Example number where largest test ratio achieved. !> |
| [out] | NINFO | !> NINFO is INTEGER array, dimension (3) !> NINFO(J) is the number of examples where INFO=J. !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
| [in] | NIN | !> NIN is INTEGER !> Input logical unit number. !> |
Definition at line 87 of file dget36.f.
| subroutine dget37 | ( | double precision, dimension( 3 ) | rmax, |
| integer, dimension( 3 ) | lmax, | ||
| integer, dimension( 3 ) | ninfo, | ||
| integer | knt, | ||
| integer | nin ) |
DGET37
!> !> DGET37 tests DTRSNA, a routine for estimating condition numbers of !> eigenvalues and/or right eigenvectors of a matrix. !> !> The test matrices are read from a file with logical unit number NIN. !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION array, dimension (3) !> Value of the largest test ratio. !> RMAX(1) = largest ratio comparing different calls to DTRSNA !> RMAX(2) = largest error in reciprocal condition !> numbers taking their conditioning into account !> RMAX(3) = largest error in reciprocal condition !> numbers not taking their conditioning into !> account (may be larger than RMAX(2)) !> |
| [out] | LMAX | !> LMAX is INTEGER array, dimension (3) !> LMAX(i) is example number where largest test ratio !> RMAX(i) is achieved. Also: !> If DGEHRD returns INFO nonzero on example i, LMAX(1)=i !> If DHSEQR returns INFO nonzero on example i, LMAX(2)=i !> If DTRSNA returns INFO nonzero on example i, LMAX(3)=i !> |
| [out] | NINFO | !> NINFO is INTEGER array, dimension (3) !> NINFO(1) = No. of times DGEHRD returned INFO nonzero !> NINFO(2) = No. of times DHSEQR returned INFO nonzero !> NINFO(3) = No. of times DTRSNA returned INFO nonzero !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
| [in] | NIN | !> NIN is INTEGER !> Input logical unit number !> |
Definition at line 89 of file dget37.f.
| subroutine dget38 | ( | double precision, dimension( 3 ) | rmax, |
| integer, dimension( 3 ) | lmax, | ||
| integer, dimension( 3 ) | ninfo, | ||
| integer | knt, | ||
| integer | nin ) |
DGET38
!> !> DGET38 tests DTRSEN, a routine for estimating condition numbers of a !> cluster of eigenvalues and/or its associated right invariant subspace !> !> The test matrices are read from a file with logical unit number NIN. !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION array, dimension (3) !> Values of the largest test ratios. !> RMAX(1) = largest residuals from DHST01 or comparing !> different calls to DTRSEN !> RMAX(2) = largest error in reciprocal condition !> numbers taking their conditioning into account !> RMAX(3) = largest error in reciprocal condition !> numbers not taking their conditioning into !> account (may be larger than RMAX(2)) !> |
| [out] | LMAX | !> LMAX is INTEGER array, dimension (3) !> LMAX(i) is example number where largest test ratio !> RMAX(i) is achieved. Also: !> If DGEHRD returns INFO nonzero on example i, LMAX(1)=i !> If DHSEQR returns INFO nonzero on example i, LMAX(2)=i !> If DTRSEN returns INFO nonzero on example i, LMAX(3)=i !> |
| [out] | NINFO | !> NINFO is INTEGER array, dimension (3) !> NINFO(1) = No. of times DGEHRD returned INFO nonzero !> NINFO(2) = No. of times DHSEQR returned INFO nonzero !> NINFO(3) = No. of times DTRSEN returned INFO nonzero !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
| [in] | NIN | !> NIN is INTEGER !> Input logical unit number. !> |
Definition at line 90 of file dget38.f.
| subroutine dget39 | ( | double precision | rmax, |
| integer | lmax, | ||
| integer | ninfo, | ||
| integer | knt ) |
DGET39
!> !> DGET39 tests DLAQTR, a routine for solving the real or !> special complex quasi upper triangular system !> !> op(T)*p = scale*c, !> or !> op(T + iB)*(p+iq) = scale*(c+id), !> !> in real arithmetic. T is upper quasi-triangular. !> If it is complex, then the first diagonal block of T must be !> 1 by 1, B has the special structure !> !> B = [ b(1) b(2) ... b(n) ] !> [ w ] !> [ w ] !> [ . ] !> [ w ] !> !> op(A) = A or A', where A' denotes the conjugate transpose of !> the matrix A. !> !> On input, X = [ c ]. On output, X = [ p ]. !> [ d ] [ q ] !> !> Scale is an output less than or equal to 1, chosen to avoid !> overflow in X. !> This subroutine is specially designed for the condition number !> estimation in the eigenproblem routine DTRSNA. !> !> The test code verifies that the following residual is order 1: !> !> ||(T+i*B)*(x1+i*x2) - scale*(d1+i*d2)|| !> ----------------------------------------- !> max(ulp*(||T||+||B||)*(||x1||+||x2||), !> (||T||+||B||)*smlnum/ulp, !> smlnum) !> !> (The (||T||+||B||)*smlnum/ulp term accounts for possible !> (gradual or nongradual) underflow in x1 and x2.) !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION !> Value of the largest test ratio. !> |
| [out] | LMAX | !> LMAX is INTEGER !> Example number where largest test ratio achieved. !> |
| [out] | NINFO | !> NINFO is INTEGER !> Number of examples where INFO is nonzero. !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
Definition at line 102 of file dget39.f.
| subroutine dget40 | ( | double precision | rmax, |
| integer | lmax, | ||
| integer, dimension( 3 ) | ninfo, | ||
| integer | knt, | ||
| integer | nin ) |
DGET40
!> !> DGET40 tests DTGEXC, a routine for swapping adjacent blocks (either !> 1 by 1 or 2 by 2) on the diagonal of a pencil in real generalized Schur form. !> Thus, DTGEXC computes an orthogonal matrices Q and Z such that !> !> Q' * ( [ A B ], [ D E ] ) * Z = ( [ C1 B1 ], [ F1 E1 ] ) !> ( [ 0 C ] [ F ] ) ( [ 0 A1 ] [ D1] ) !> !> where (C1,F1) is similar to (C,F) and (A1,D1) is similar to (A,D). !> Both (A,D) and (C,F) are assumed to be in standard form !> and (A1,D1) and (C1,F1) are returned with the !> same properties. !>
| [out] | RMAX | !> RMAX is DOUBLE PRECISION !> Value of the largest test ratio. !> |
| [out] | LMAX | !> LMAX is INTEGER !> Example number where largest test ratio achieved. !> |
| [out] | NINFO | !> NINFO is INTEGER(3) !> Number of examples where INFO is nonzero. !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
| [out] | NIN | !> NINFO is INTEGER !> |
Definition at line 82 of file dget40.f.
| subroutine dget51 | ( | integer | itype, |
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldv, * ) | v, | ||
| integer | ldv, | ||
| double precision, dimension( * ) | work, | ||
| double precision | result ) |
DGET51
!> !> DGET51 generally checks a decomposition of the form !> !> A = U B V' !> !> where ' means transpose and U and V are orthogonal. !> !> Specifically, if ITYPE=1 !> !> RESULT = | A - U B V' | / ( |A| n ulp ) !> !> If ITYPE=2, then: !> !> RESULT = | A - B | / ( |A| n ulp ) !> !> If ITYPE=3, then: !> !> RESULT = | I - UU' | / ( n ulp ) !>
| [in] | ITYPE | !> ITYPE is INTEGER !> Specifies the type of tests to be performed. !> =1: RESULT = | A - U B V' | / ( |A| n ulp ) !> =2: RESULT = | A - B | / ( |A| n ulp ) !> =3: RESULT = | I - UU' | / ( n ulp ) !> |
| [in] | N | !> N is INTEGER !> The size of the matrix. If it is zero, DGET51 does nothing. !> It must be at least zero. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA, N) !> The original (unfactored) matrix. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at least 1 !> and at least N. !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB, N) !> The factored matrix. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of B. It must be at least 1 !> and at least N. !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU, N) !> The orthogonal matrix on the left-hand side in the !> decomposition. !> Not referenced if ITYPE=2 !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. LDU must be at least N and !> at least 1. !> |
| [in] | V | !> V is DOUBLE PRECISION array, dimension (LDV, N) !> The orthogonal matrix on the left-hand side in the !> decomposition. !> Not referenced if ITYPE=2 !> |
| [in] | LDV | !> LDV is INTEGER !> The leading dimension of V. LDV must be at least N and !> at least 1. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (2*N**2) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION !> The values computed by the test specified by ITYPE. The !> value is currently limited to 1/ulp, to avoid overflow. !> Errors are flagged by RESULT=10/ulp. !> |
Definition at line 147 of file dget51.f.
| subroutine dget52 | ( | logical | left, |
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision, dimension( lde, * ) | e, | ||
| integer | lde, | ||
| double precision, dimension( * ) | alphar, | ||
| double precision, dimension( * ) | alphai, | ||
| double precision, dimension( * ) | beta, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( 2 ) | result ) |
DGET52
!> !> DGET52 does an eigenvector check for the generalized eigenvalue !> problem. !> !> The basic test for right eigenvectors is: !> !> | b(j) A E(j) - a(j) B E(j) | !> RESULT(1) = max ------------------------------- !> j n ulp max( |b(j) A|, |a(j) B| ) !> !> using the 1-norm. Here, a(j)/b(j) = w is the j-th generalized !> eigenvalue of A - w B, or, equivalently, b(j)/a(j) = m is the j-th !> generalized eigenvalue of m A - B. !> !> For real eigenvalues, the test is straightforward. For complex !> eigenvalues, E(j) and a(j) are complex, represented by !> Er(j) + i*Ei(j) and ar(j) + i*ai(j), resp., so the test for that !> eigenvector becomes !> !> max( |Wr|, |Wi| ) !> -------------------------------------------- !> n ulp max( |b(j) A|, (|ar(j)|+|ai(j)|) |B| ) !> !> where !> !> Wr = b(j) A Er(j) - ar(j) B Er(j) + ai(j) B Ei(j) !> !> Wi = b(j) A Ei(j) - ai(j) B Er(j) - ar(j) B Ei(j) !> !> T T _ !> For left eigenvectors, A , B , a, and b are used. !> !> DGET52 also tests the normalization of E. Each eigenvector is !> supposed to be normalized so that the maximum !> of its elements is 1, where in this case, !> of a complex value x is |Re(x)| + |Im(x)| ; let us call this !> maximum norm of a vector v M(v). !> if a(j)=b(j)=0, then the eigenvector is set to be the jth coordinate !> vector. The normalization test is: !> !> RESULT(2) = max | M(v(j)) - 1 | / ( n ulp ) !> eigenvectors v(j) !>
| [in] | LEFT | !> LEFT is LOGICAL !> =.TRUE.: The eigenvectors in the columns of E are assumed !> to be *left* eigenvectors. !> =.FALSE.: The eigenvectors in the columns of E are assumed !> to be *right* eigenvectors. !> |
| [in] | N | !> N is INTEGER !> The size of the matrices. If it is zero, DGET52 does !> nothing. It must be at least zero. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA, N) !> The matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at least 1 !> and at least N. !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB, N) !> The matrix B. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of B. It must be at least 1 !> and at least N. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (LDE, N) !> The matrix of eigenvectors. It must be O( 1 ). Complex !> eigenvalues and eigenvectors always come in pairs, the !> eigenvalue and its conjugate being stored in adjacent !> elements of ALPHAR, ALPHAI, and BETA. Thus, if a(j)/b(j) !> and a(j+1)/b(j+1) are a complex conjugate pair of !> generalized eigenvalues, then E(,j) contains the real part !> of the eigenvector and E(,j+1) contains the imaginary part. !> Note that whether E(,j) is a real eigenvector or part of a !> complex one is specified by whether ALPHAI(j) is zero or not. !> |
| [in] | LDE | !> LDE is INTEGER !> The leading dimension of E. It must be at least 1 and at !> least N. !> |
| [in] | ALPHAR | !> ALPHAR is DOUBLE PRECISION array, dimension (N) !> The real parts of the values a(j) as described above, which, !> along with b(j), define the generalized eigenvalues. !> Complex eigenvalues always come in complex conjugate pairs !> a(j)/b(j) and a(j+1)/b(j+1), which are stored in adjacent !> elements in ALPHAR, ALPHAI, and BETA. Thus, if the j-th !> and (j+1)-st eigenvalues form a pair, ALPHAR(j+1)/BETA(j+1) !> is assumed to be equal to ALPHAR(j)/BETA(j). !> |
| [in] | ALPHAI | !> ALPHAI is DOUBLE PRECISION array, dimension (N) !> The imaginary parts of the values a(j) as described above, !> which, along with b(j), define the generalized eigenvalues. !> If ALPHAI(j)=0, then the eigenvalue is real, otherwise it !> is part of a complex conjugate pair. Complex eigenvalues !> always come in complex conjugate pairs a(j)/b(j) and !> a(j+1)/b(j+1), which are stored in adjacent elements in !> ALPHAR, ALPHAI, and BETA. Thus, if the j-th and (j+1)-st !> eigenvalues form a pair, ALPHAI(j+1)/BETA(j+1) is assumed to !> be equal to -ALPHAI(j)/BETA(j). Also, nonzero values in !> ALPHAI are assumed to always come in adjacent pairs. !> |
| [in] | BETA | !> BETA is DOUBLE PRECISION array, dimension (N) !> The values b(j) as described above, which, along with a(j), !> define the generalized eigenvalues. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (N**2+N) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> The values computed by the test described above. If A E or !> B E is likely to overflow, then RESULT(1:2) is set to !> 10 / ulp. !> |
Definition at line 197 of file dget52.f.
| subroutine dget53 | ( | double precision, dimension( lda, * ) | a, |
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision | scale, | ||
| double precision | wr, | ||
| double precision | wi, | ||
| double precision | result, | ||
| integer | info ) |
DGET53
!> !> DGET53 checks the generalized eigenvalues computed by DLAG2. !> !> The basic test for an eigenvalue is: !> !> | det( s A - w B ) | !> RESULT = --------------------------------------------------- !> ulp max( s norm(A), |w| norm(B) )*norm( s A - w B ) !> !> Two are performed: !> !> (1) ulp*max( s*norm(A), |w|*norm(B) ) must be at least !> safe_minimum. This insures that the test performed is !> not essentially det(0*A + 0*B)=0. !> !> (2) s*norm(A) + |w|*norm(B) must be less than 1/safe_minimum. !> This insures that s*A - w*B will not overflow. !> !> If these tests are not passed, then s and w are scaled and !> tested anyway, if this is possible. !>
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA, 2) !> The 2x2 matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at least 2. !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB, N) !> The 2x2 upper-triangular matrix B. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of B. It must be at least 2. !> |
| [in] | SCALE | !> SCALE is DOUBLE PRECISION !> The s in the formula s A - w B . It is !> assumed to be non-negative. !> |
| [in] | WR | !> WR is DOUBLE PRECISION !> The real part of the eigenvalue w in the formula !> s A - w B . !> |
| [in] | WI | !> WI is DOUBLE PRECISION !> The imaginary part of the eigenvalue w in the formula !> s A - w B . !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION !> If INFO is 2 or less, the value computed by the test !> described above. !> If INFO=3, this will just be 1/ulp. !> |
| [out] | INFO | !> INFO is INTEGER !> =0: The input data pass the . !> =1: s*norm(A) + |w|*norm(B) > 1/safe_minimum. !> =2: ulp*max( s*norm(A), |w|*norm(B) ) < safe_minimum !> =3: same as INFO=2, but s and w could not be scaled so !> as to compute the test. !> |
Definition at line 125 of file dget53.f.
| subroutine dget54 | ( | integer | n, |
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision, dimension( lds, * ) | s, | ||
| integer | lds, | ||
| double precision, dimension( ldt, * ) | t, | ||
| integer | ldt, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldv, * ) | v, | ||
| integer | ldv, | ||
| double precision, dimension( * ) | work, | ||
| double precision | result ) |
DGET54
!> !> DGET54 checks a generalized decomposition of the form !> !> A = U*S*V' and B = U*T* V' !> !> where ' means transpose and U and V are orthogonal. !> !> Specifically, !> !> RESULT = ||( A - U*S*V', B - U*T*V' )|| / (||( A, B )||*n*ulp ) !>
| [in] | N | !> N is INTEGER !> The size of the matrix. If it is zero, DGET54 does nothing. !> It must be at least zero. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA, N) !> The original (unfactored) matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at least 1 !> and at least N. !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB, N) !> The original (unfactored) matrix B. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of B. It must be at least 1 !> and at least N. !> |
| [in] | S | !> S is DOUBLE PRECISION array, dimension (LDS, N) !> The factored matrix S. !> |
| [in] | LDS | !> LDS is INTEGER !> The leading dimension of S. It must be at least 1 !> and at least N. !> |
| [in] | T | !> T is DOUBLE PRECISION array, dimension (LDT, N) !> The factored matrix T. !> |
| [in] | LDT | !> LDT is INTEGER !> The leading dimension of T. It must be at least 1 !> and at least N. !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU, N) !> The orthogonal matrix on the left-hand side in the !> decomposition. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. LDU must be at least N and !> at least 1. !> |
| [in] | V | !> V is DOUBLE PRECISION array, dimension (LDV, N) !> The orthogonal matrix on the left-hand side in the !> decomposition. !> |
| [in] | LDV | !> LDV is INTEGER !> The leading dimension of V. LDV must be at least N and !> at least 1. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (3*N**2) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION !> The value RESULT, It is currently limited to 1/ulp, to !> avoid overflow. Errors are flagged by RESULT=10/ulp. !> |
Definition at line 154 of file dget54.f.
| subroutine dglmts | ( | integer | n, |
| integer | m, | ||
| integer | p, | ||
| double precision, dimension( lda, * ) | a, | ||
| double precision, dimension( lda, * ) | af, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| double precision, dimension( ldb, * ) | bf, | ||
| integer | ldb, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | df, | ||
| double precision, dimension( * ) | x, | ||
| double precision, dimension( * ) | u, | ||
| double precision, dimension( lwork ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | rwork, | ||
| double precision | result ) |
DGLMTS
!> !> DGLMTS tests DGGGLM - a subroutine for solving the generalized !> linear model problem. !>
| [in] | N | !> N is INTEGER !> The number of rows of the matrices A and B. N >= 0. !> |
| [in] | M | !> M is INTEGER !> The number of columns of the matrix A. M >= 0. !> |
| [in] | P | !> P is INTEGER !> The number of columns of the matrix B. P >= 0. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,M) !> The N-by-M matrix A. !> |
| [out] | AF | !> AF is DOUBLE PRECISION array, dimension (LDA,M) !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the arrays A, AF. LDA >= max(M,N). !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB,P) !> The N-by-P matrix A. !> |
| [out] | BF | !> BF is DOUBLE PRECISION array, dimension (LDB,P) !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the arrays B, BF. LDB >= max(P,N). !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension( N ) !> On input, the left hand side of the GLM. !> |
| [out] | DF | !> DF is DOUBLE PRECISION array, dimension( N ) !> |
| [out] | X | !> X is DOUBLE PRECISION array, dimension( M ) !> solution vector X in the GLM problem. !> |
| [out] | U | !> U is DOUBLE PRECISION array, dimension( P ) !> solution vector U in the GLM problem. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK. !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (M) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION !> The test ratio: !> norm( d - A*x - B*u ) !> RESULT = ----------------------------------------- !> (norm(A)+norm(B))*(norm(x)+norm(u))*EPS !> |
Definition at line 144 of file dglmts.f.
| subroutine dgqrts | ( | integer | n, |
| integer | m, | ||
| integer | p, | ||
| double precision, dimension( lda, * ) | a, | ||
| double precision, dimension( lda, * ) | af, | ||
| double precision, dimension( lda, * ) | q, | ||
| double precision, dimension( lda, * ) | r, | ||
| integer | lda, | ||
| double precision, dimension( * ) | taua, | ||
| double precision, dimension( ldb, * ) | b, | ||
| double precision, dimension( ldb, * ) | bf, | ||
| double precision, dimension( ldb, * ) | z, | ||
| double precision, dimension( ldb, * ) | t, | ||
| double precision, dimension( ldb, * ) | bwk, | ||
| integer | ldb, | ||
| double precision, dimension( * ) | taub, | ||
| double precision, dimension( lwork ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | rwork, | ||
| double precision, dimension( 4 ) | result ) |
DGQRTS
!> !> DGQRTS tests DGGQRF, which computes the GQR factorization of an !> N-by-M matrix A and a N-by-P matrix B: A = Q*R and B = Q*T*Z. !>
| [in] | N | !> N is INTEGER !> The number of rows of the matrices A and B. N >= 0. !> |
| [in] | M | !> M is INTEGER !> The number of columns of the matrix A. M >= 0. !> |
| [in] | P | !> P is INTEGER !> The number of columns of the matrix B. P >= 0. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,M) !> The N-by-M matrix A. !> |
| [out] | AF | !> AF is DOUBLE PRECISION array, dimension (LDA,N) !> Details of the GQR factorization of A and B, as returned !> by DGGQRF, see SGGQRF for further details. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDA,N) !> The M-by-M orthogonal matrix Q. !> |
| [out] | R | !> R is DOUBLE PRECISION array, dimension (LDA,MAX(M,N)) !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the arrays A, AF, R and Q. !> LDA >= max(M,N). !> |
| [out] | TAUA | !> TAUA is DOUBLE PRECISION array, dimension (min(M,N)) !> The scalar factors of the elementary reflectors, as returned !> by DGGQRF. !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB,P) !> On entry, the N-by-P matrix A. !> |
| [out] | BF | !> BF is DOUBLE PRECISION array, dimension (LDB,N) !> Details of the GQR factorization of A and B, as returned !> by DGGQRF, see SGGQRF for further details. !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension (LDB,P) !> The P-by-P orthogonal matrix Z. !> |
| [out] | T | !> T is DOUBLE PRECISION array, dimension (LDB,max(P,N)) !> |
| [out] | BWK | !> BWK is DOUBLE PRECISION array, dimension (LDB,N) !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the arrays B, BF, Z and T. !> LDB >= max(P,N). !> |
| [out] | TAUB | !> TAUB is DOUBLE PRECISION array, dimension (min(P,N)) !> The scalar factors of the elementary reflectors, as returned !> by DGGRQF. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK, LWORK >= max(N,M,P)**2. !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (max(N,M,P)) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (4) !> The test ratios: !> RESULT(1) = norm( R - Q'*A ) / ( MAX(M,N)*norm(A)*ULP) !> RESULT(2) = norm( T*Z - Q'*B ) / (MAX(P,N)*norm(B)*ULP) !> RESULT(3) = norm( I - Q'*Q ) / ( M*ULP ) !> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP ) !> |
Definition at line 174 of file dgqrts.f.
| subroutine dgrqts | ( | integer | m, |
| integer | p, | ||
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| double precision, dimension( lda, * ) | af, | ||
| double precision, dimension( lda, * ) | q, | ||
| double precision, dimension( lda, * ) | r, | ||
| integer | lda, | ||
| double precision, dimension( * ) | taua, | ||
| double precision, dimension( ldb, * ) | b, | ||
| double precision, dimension( ldb, * ) | bf, | ||
| double precision, dimension( ldb, * ) | z, | ||
| double precision, dimension( ldb, * ) | t, | ||
| double precision, dimension( ldb, * ) | bwk, | ||
| integer | ldb, | ||
| double precision, dimension( * ) | taub, | ||
| double precision, dimension( lwork ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | rwork, | ||
| double precision, dimension( 4 ) | result ) |
DGRQTS
!> !> DGRQTS tests DGGRQF, which computes the GRQ factorization of an !> M-by-N matrix A and a P-by-N matrix B: A = R*Q and B = Z*T*Q. !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrix A. M >= 0. !> |
| [in] | P | !> P is INTEGER !> The number of rows of the matrix B. P >= 0. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices A and B. N >= 0. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> The M-by-N matrix A. !> |
| [out] | AF | !> AF is DOUBLE PRECISION array, dimension (LDA,N) !> Details of the GRQ factorization of A and B, as returned !> by DGGRQF, see SGGRQF for further details. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDA,N) !> The N-by-N orthogonal matrix Q. !> |
| [out] | R | !> R is DOUBLE PRECISION array, dimension (LDA,MAX(M,N)) !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the arrays A, AF, R and Q. !> LDA >= max(M,N). !> |
| [out] | TAUA | !> TAUA is DOUBLE PRECISION array, dimension (min(M,N)) !> The scalar factors of the elementary reflectors, as returned !> by DGGQRC. !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB,N) !> On entry, the P-by-N matrix A. !> |
| [out] | BF | !> BF is DOUBLE PRECISION array, dimension (LDB,N) !> Details of the GQR factorization of A and B, as returned !> by DGGRQF, see SGGRQF for further details. !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension (LDB,P) !> The P-by-P orthogonal matrix Z. !> |
| [out] | T | !> T is DOUBLE PRECISION array, dimension (LDB,max(P,N)) !> |
| [out] | BWK | !> BWK is DOUBLE PRECISION array, dimension (LDB,N) !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the arrays B, BF, Z and T. !> LDB >= max(P,N). !> |
| [out] | TAUB | !> TAUB is DOUBLE PRECISION array, dimension (min(P,N)) !> The scalar factors of the elementary reflectors, as returned !> by DGGRQF. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK, LWORK >= max(M,P,N)**2. !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (M) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (4) !> The test ratios: !> RESULT(1) = norm( R - A*Q' ) / ( MAX(M,N)*norm(A)*ULP) !> RESULT(2) = norm( T*Q - Z'*B ) / (MAX(P,N)*norm(B)*ULP) !> RESULT(3) = norm( I - Q'*Q ) / ( N*ULP ) !> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP ) !> |
Definition at line 174 of file dgrqts.f.
| subroutine dgsvts3 | ( | integer | m, |
| integer | p, | ||
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| double precision, dimension( lda, * ) | af, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| double precision, dimension( ldb, * ) | bf, | ||
| integer | ldb, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldv, * ) | v, | ||
| integer | ldv, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( * ) | alpha, | ||
| double precision, dimension( * ) | beta, | ||
| double precision, dimension( ldr, * ) | r, | ||
| integer | ldr, | ||
| integer, dimension( * ) | iwork, | ||
| double precision, dimension( lwork ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | rwork, | ||
| double precision, dimension( 6 ) | result ) |
DGSVTS3
!> !> DGSVTS3 tests DGGSVD3, which computes the GSVD of an M-by-N matrix A !> and a P-by-N matrix B: !> U'*A*Q = D1*R and V'*B*Q = D2*R. !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrix A. M >= 0. !> |
| [in] | P | !> P is INTEGER !> The number of rows of the matrix B. P >= 0. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices A and B. N >= 0. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,M) !> The M-by-N matrix A. !> |
| [out] | AF | !> AF is DOUBLE PRECISION array, dimension (LDA,N) !> Details of the GSVD of A and B, as returned by DGGSVD3, !> see DGGSVD3 for further details. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the arrays A and AF. !> LDA >= max( 1,M ). !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB,P) !> On entry, the P-by-N matrix B. !> |
| [out] | BF | !> BF is DOUBLE PRECISION array, dimension (LDB,N) !> Details of the GSVD of A and B, as returned by DGGSVD3, !> see DGGSVD3 for further details. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the arrays B and BF. !> LDB >= max(1,P). !> |
| [out] | U | !> U is DOUBLE PRECISION array, dimension(LDU,M) !> The M by M orthogonal matrix U. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,M). !> |
| [out] | V | !> V is DOUBLE PRECISION array, dimension(LDV,M) !> The P by P orthogonal matrix V. !> |
| [in] | LDV | !> LDV is INTEGER !> The leading dimension of the array V. LDV >= max(1,P). !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension(LDQ,N) !> The N by N orthogonal matrix Q. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [out] | ALPHA | !> ALPHA is DOUBLE PRECISION array, dimension (N) !> |
| [out] | BETA | !> BETA is DOUBLE PRECISION array, dimension (N) !> !> The generalized singular value pairs of A and B, the !> ``diagonal'' matrices D1 and D2 are constructed from !> ALPHA and BETA, see subroutine DGGSVD3 for details. !> |
| [out] | R | !> R is DOUBLE PRECISION array, dimension(LDQ,N) !> The upper triangular matrix R. !> |
| [in] | LDR | !> LDR is INTEGER !> The leading dimension of the array R. LDR >= max(1,N). !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (N) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK, !> LWORK >= max(M,P,N)*max(M,P,N). !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (max(M,P,N)) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (6) !> The test ratios: !> RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP) !> RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP) !> RESULT(3) = norm( I - U'*U ) / ( M*ULP ) !> RESULT(4) = norm( I - V'*V ) / ( P*ULP ) !> RESULT(5) = norm( I - Q'*Q ) / ( N*ULP ) !> RESULT(6) = 0 if ALPHA is in decreasing order; !> = ULPINV otherwise. !> |
Definition at line 207 of file dgsvts3.f.
| subroutine dhst01 | ( | integer | n, |
| integer | ilo, | ||
| integer | ihi, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldh, * ) | h, | ||
| integer | ldh, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( lwork ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( 2 ) | result ) |
DHST01
!> !> DHST01 tests the reduction of a general matrix A to upper Hessenberg !> form: A = Q*H*Q'. Two test ratios are computed; !> !> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS ) !> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS ) !> !> The matrix Q is assumed to be given explicitly as it would be !> following DGEHRD + DORGHR. !> !> In this version, ILO and IHI are not used and are assumed to be 1 and !> N, respectively. !>
| [in] | N | !> N is INTEGER !> The order of the matrix A. N >= 0. !> |
| [in] | ILO | !> ILO is INTEGER !> |
| [in] | IHI | !> IHI is INTEGER !> !> A is assumed to be upper triangular in rows and columns !> 1:ILO-1 and IHI+1:N, so Q differs from the identity only in !> rows and columns ILO+1:IHI. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> The original n by n matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,N). !> |
| [in] | H | !> H is DOUBLE PRECISION array, dimension (LDH,N) !> The upper Hessenberg matrix H from the reduction A = Q*H*Q' !> as computed by DGEHRD. H is assumed to be zero below the !> first subdiagonal. !> |
| [in] | LDH | !> LDH is INTEGER !> The leading dimension of the array H. LDH >= max(1,N). !> |
| [in] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ,N) !> The orthogonal matrix Q from the reduction A = Q*H*Q' as !> computed by DGEHRD + DORGHR. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The length of the array WORK. LWORK >= 2*N*N. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS ) !> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS ) !> |
Definition at line 132 of file dhst01.f.
| subroutine dlafts | ( | character*3 | type, |
| integer | m, | ||
| integer | n, | ||
| integer | imat, | ||
| integer | ntests, | ||
| double precision, dimension( * ) | result, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision | thresh, | ||
| integer | iounit, | ||
| integer | ie ) |
DLAFTS
!> !> DLAFTS tests the result vector against the threshold value to !> see which tests for this matrix type failed to pass the threshold. !> Output is to the file given by unit IOUNIT. !>
!> TYPE - CHARACTER*3 !> On entry, TYPE specifies the matrix type to be used in the !> printed messages. !> Not modified. !> !> N - INTEGER !> On entry, N specifies the order of the test matrix. !> Not modified. !> !> IMAT - INTEGER !> On entry, IMAT specifies the type of the test matrix. !> A listing of the different types is printed by DLAHD2 !> to the output file if a test fails to pass the threshold. !> Not modified. !> !> NTESTS - INTEGER !> On entry, NTESTS is the number of tests performed on the !> subroutines in the path given by TYPE. !> Not modified. !> !> RESULT - DOUBLE PRECISION array of dimension( NTESTS ) !> On entry, RESULT contains the test ratios from the tests !> performed in the calling program. !> Not modified. !> !> ISEED - INTEGER array of dimension( 4 ) !> Contains the random seed that generated the matrix used !> for the tests whose ratios are in RESULT. !> Not modified. !> !> THRESH - DOUBLE PRECISION !> On entry, THRESH specifies the acceptable threshold of the !> test ratios. If RESULT( K ) > THRESH, then the K-th test !> did not pass the threshold and a message will be printed. !> Not modified. !> !> IOUNIT - INTEGER !> On entry, IOUNIT specifies the unit number of the file !> to which the messages are printed. !> Not modified. !> !> IE - INTEGER !> On entry, IE contains the number of tests which have !> failed to pass the threshold so far. !> Updated on exit if any of the ratios in RESULT also fail. !>
Definition at line 97 of file dlafts.f.
| subroutine dlahd2 | ( | integer | iounit, |
| character*3 | path ) |
DLAHD2
!> !> DLAHD2 prints header information for the different test paths. !>
| [in] | IOUNIT | !> IOUNIT is INTEGER. !> On entry, IOUNIT specifies the unit number to which the !> header information should be printed. !> |
| [in] | PATH | !> PATH is CHARACTER*3. !> On entry, PATH contains the name of the path for which the !> header information is to be printed. Current paths are !> !> DHS, ZHS: Non-symmetric eigenproblem. !> DST, ZST: Symmetric eigenproblem. !> DSG, ZSG: Symmetric Generalized eigenproblem. !> DBD, ZBD: Singular Value Decomposition (SVD) !> DBB, ZBB: General Banded reduction to bidiagonal form !> !> These paths also are supplied in double precision (replace !> leading S by D and leading C by Z in path names). !> |
Definition at line 64 of file dlahd2.f.
| subroutine dlarfy | ( | character | uplo, |
| integer | n, | ||
| double precision, dimension( * ) | v, | ||
| integer | incv, | ||
| double precision | tau, | ||
| double precision, dimension( ldc, * ) | c, | ||
| integer | ldc, | ||
| double precision, dimension( * ) | work ) |
DLARFY
!> !> DLARFY applies an elementary reflector, or Householder matrix, H, !> to an n x n symmetric matrix C, from both the left and the right. !> !> H is represented in the form !> !> H = I - tau * v * v' !> !> where tau is a scalar and v is a vector. !> !> If tau is zero, then H is taken to be the unit matrix. !>
| [in] | UPLO | !> UPLO is CHARACTER*1 !> Specifies whether the upper or lower triangular part of the !> symmetric matrix C is stored. !> = 'U': Upper triangle !> = 'L': Lower triangle !> |
| [in] | N | !> N is INTEGER !> The number of rows and columns of the matrix C. N >= 0. !> |
| [in] | V | !> V is DOUBLE PRECISION array, dimension !> (1 + (N-1)*abs(INCV)) !> The vector v as described above. !> |
| [in] | INCV | !> INCV is INTEGER !> The increment between successive elements of v. INCV must !> not be zero. !> |
| [in] | TAU | !> TAU is DOUBLE PRECISION !> The value tau as described above. !> |
| [in,out] | C | !> C is DOUBLE PRECISION array, dimension (LDC, N) !> On entry, the matrix C. !> On exit, C is overwritten by H * C * H'. !> |
| [in] | LDC | !> LDC is INTEGER !> The leading dimension of the array C. LDC >= max( 1, N ). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (N) !> |
Definition at line 107 of file dlarfy.f.
| subroutine dlarhs | ( | character*3 | path, |
| character | xtype, | ||
| character | uplo, | ||
| character | trans, | ||
| integer | m, | ||
| integer | n, | ||
| integer | kl, | ||
| integer | ku, | ||
| integer | nrhs, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldx, * ) | x, | ||
| integer | ldx, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| integer, dimension( 4 ) | iseed, | ||
| integer | info ) |
DLARHS
!> !> DLARHS chooses a set of NRHS random solution vectors and sets !> up the right hand sides for the linear system !> op(A) * X = B, !> where op(A) = A or A**T, depending on TRANS. !>
| [in] | PATH | !> PATH is CHARACTER*3 !> The type of the real matrix A. PATH may be given in any !> combination of upper and lower case. Valid types include !> xGE: General m x n matrix !> xGB: General banded matrix !> xPO: Symmetric positive definite, 2-D storage !> xPP: Symmetric positive definite packed !> xPB: Symmetric positive definite banded !> xSY: Symmetric indefinite, 2-D storage !> xSP: Symmetric indefinite packed !> xSB: Symmetric indefinite banded !> xTR: Triangular !> xTP: Triangular packed !> xTB: Triangular banded !> xQR: General m x n matrix !> xLQ: General m x n matrix !> xQL: General m x n matrix !> xRQ: General m x n matrix !> where the leading character indicates the precision. !> |
| [in] | XTYPE | !> XTYPE is CHARACTER*1 !> Specifies how the exact solution X will be determined: !> = 'N': New solution; generate a random X. !> = 'C': Computed; use value of X on entry. !> |
| [in] | UPLO | !> UPLO is CHARACTER*1 !> Specifies whether the upper or lower triangular part of the !> matrix A is stored, if A is symmetric. !> = 'U': Upper triangular !> = 'L': Lower triangular !> |
| [in] | TRANS | !> TRANS is CHARACTER*1 !> Used only if A is nonsymmetric; specifies the operation !> applied to the matrix A. !> = 'N': B := A * X (No transpose) !> = 'T': B := A**T * X (Transpose) !> = 'C': B := A**H * X (Conjugate transpose = Transpose) !> |
| [in] | M | !> M is INTEGER !> The number or rows of the matrix A. M >= 0. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrix A. N >= 0. !> |
| [in] | KL | !> KL is INTEGER !> Used only if A is a band matrix; specifies the number of !> subdiagonals of A if A is a general band matrix or if A is !> symmetric or triangular and UPLO = 'L'; specifies the number !> of superdiagonals of A if A is symmetric or triangular and !> UPLO = 'U'. 0 <= KL <= M-1. !> |
| [in] | KU | !> KU is INTEGER !> Used only if A is a general band matrix or if A is !> triangular. !> !> If PATH = xGB, specifies the number of superdiagonals of A, !> and 0 <= KU <= N-1. !> !> If PATH = xTR, xTP, or xTB, specifies whether or not the !> matrix has unit diagonal: !> = 1: matrix has non-unit diagonal (default) !> = 2: matrix has unit diagonal !> |
| [in] | NRHS | !> NRHS is INTEGER !> The number of right hand side vectors in the system A*X = B. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> The test matrix whose type is given by PATH. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. !> If PATH = xGB, LDA >= KL+KU+1. !> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1. !> Otherwise, LDA >= max(1,M). !> |
| [in,out] | X | !> X is or output) DOUBLE PRECISION array, dimension(LDX,NRHS) !> On entry, if XTYPE = 'C' (for 'Computed'), then X contains !> the exact solution to the system of linear equations. !> On exit, if XTYPE = 'N' (for 'New'), then X is initialized !> with random values. !> |
| [in] | LDX | !> LDX is INTEGER !> The leading dimension of the array X. If TRANS = 'N', !> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M). !> |
| [out] | B | !> B is DOUBLE PRECISION array, dimension (LDB,NRHS) !> The right hand side vector(s) for the system of equations, !> computed from B = op(A) * X, where op(A) is determined by !> TRANS. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the array B. If TRANS = 'N', !> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N). !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, dimension (4) !> The seed vector for the random number generator (used in !> DLATMS). Modified on exit. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> |
Definition at line 203 of file dlarhs.f.
| subroutine dlasum | ( | character*3 | type, |
| integer | iounit, | ||
| integer | ie, | ||
| integer | nrun ) |
DLASUM
!> !> DLASUM prints a summary of the results from one of the test routines. !>
Definition at line 42 of file dlasum.f.
| subroutine dlatb9 | ( | character*3 | path, |
| integer | imat, | ||
| integer | m, | ||
| integer | p, | ||
| integer | n, | ||
| character | type, | ||
| integer | kla, | ||
| integer | kua, | ||
| integer | klb, | ||
| integer | kub, | ||
| double precision | anorm, | ||
| double precision | bnorm, | ||
| integer | modea, | ||
| integer | modeb, | ||
| double precision | cndnma, | ||
| double precision | cndnmb, | ||
| character | dista, | ||
| character | distb ) |
DLATB9
!> !> DLATB9 sets parameters for the matrix generator based on the type of !> matrix to be generated. !>
| [in] | PATH | !> PATH is CHARACTER*3 !> The LAPACK path name. !> |
| [in] | IMAT | !> IMAT is INTEGER !> An integer key describing which matrix to generate for this !> path. !> = 1: A: diagonal, B: upper triangular !> = 2: A: upper triangular, B: upper triangular !> = 3: A: lower triangular, B: upper triangular !> Else: A: general dense, B: general dense !> |
| [in] | M | !> M is INTEGER !> The number of rows in the matrix to be generated. !> |
| [in] | P | !> P is INTEGER !> |
| [in] | N | !> N is INTEGER !> The number of columns in the matrix to be generated. !> |
| [out] | TYPE | !> TYPE is CHARACTER*1 !> The type of the matrix to be generated: !> = 'S': symmetric matrix; !> = 'P': symmetric positive (semi)definite matrix; !> = 'N': nonsymmetric matrix. !> |
| [out] | KLA | !> KLA is INTEGER !> The lower band width of the matrix to be generated. !> |
| [out] | KUA | !> KUA is INTEGER !> The upper band width of the matrix to be generated. !> |
| [out] | KLB | !> KLB is INTEGER !> The lower band width of the matrix to be generated. !> |
| [out] | KUB | !> KUA is INTEGER !> The upper band width of the matrix to be generated. !> |
| [out] | ANORM | !> ANORM is DOUBLE PRECISION !> The desired norm of the matrix to be generated. The diagonal !> matrix of singular values or eigenvalues is scaled by this !> value. !> |
| [out] | BNORM | !> BNORM is DOUBLE PRECISION !> The desired norm of the matrix to be generated. The diagonal !> matrix of singular values or eigenvalues is scaled by this !> value. !> |
| [out] | MODEA | !> MODEA is INTEGER !> A key indicating how to choose the vector of eigenvalues. !> |
| [out] | MODEB | !> MODEB is INTEGER !> A key indicating how to choose the vector of eigenvalues. !> |
| [out] | CNDNMA | !> CNDNMA is DOUBLE PRECISION !> The desired condition number. !> |
| [out] | CNDNMB | !> CNDNMB is DOUBLE PRECISION !> The desired condition number. !> |
| [out] | DISTA | !> DISTA is CHARACTER*1 !> The type of distribution to be used by the random number !> generator. !> |
| [out] | DISTB | !> DISTB is CHARACTER*1 !> The type of distribution to be used by the random number !> generator. !> |
Definition at line 167 of file dlatb9.f.
| subroutine dlatm4 | ( | integer | itype, |
| integer | n, | ||
| integer | nz1, | ||
| integer | nz2, | ||
| integer | isign, | ||
| double precision | amagn, | ||
| double precision | rcond, | ||
| double precision | triang, | ||
| integer | idist, | ||
| integer, dimension( 4 ) | iseed, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda ) |
DLATM4
!> !> DLATM4 generates basic square matrices, which may later be !> multiplied by others in order to produce test matrices. It is !> intended mainly to be used to test the generalized eigenvalue !> routines. !> !> It first generates the diagonal and (possibly) subdiagonal, !> according to the value of ITYPE, NZ1, NZ2, ISIGN, AMAGN, and RCOND. !> It then fills in the upper triangle with random numbers, if TRIANG is !> non-zero. !>
| [in] | ITYPE | !> ITYPE is INTEGER !> The of matrix on the diagonal and sub-diagonal. !> If ITYPE < 0, then type abs(ITYPE) is generated and then !> swapped end for end (A(I,J) := A'(N-J,N-I).) See also !> the description of AMAGN and ISIGN. !> !> Special types: !> = 0: the zero matrix. !> = 1: the identity. !> = 2: a transposed Jordan block. !> = 3: If N is odd, then a k+1 x k+1 transposed Jordan block !> followed by a k x k identity block, where k=(N-1)/2. !> If N is even, then k=(N-2)/2, and a zero diagonal entry !> is tacked onto the end. !> !> Diagonal types. The diagonal consists of NZ1 zeros, then !> k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE !> specifies the nonzero diagonal entries as follows: !> = 4: 1, ..., k !> = 5: 1, RCOND, ..., RCOND !> = 6: 1, ..., 1, RCOND !> = 7: 1, a, a^2, ..., a^(k-1)=RCOND !> = 8: 1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND !> = 9: random numbers chosen from (RCOND,1) !> = 10: random numbers with distribution IDIST (see DLARND.) !> |
| [in] | N | !> N is INTEGER !> The order of the matrix. !> |
| [in] | NZ1 | !> NZ1 is INTEGER !> If abs(ITYPE) > 3, then the first NZ1 diagonal entries will !> be zero. !> |
| [in] | NZ2 | !> NZ2 is INTEGER !> If abs(ITYPE) > 3, then the last NZ2 diagonal entries will !> be zero. !> |
| [in] | ISIGN | !> ISIGN is INTEGER !> = 0: The sign of the diagonal and subdiagonal entries will !> be left unchanged. !> = 1: The diagonal and subdiagonal entries will have their !> sign changed at random. !> = 2: If ITYPE is 2 or 3, then the same as ISIGN=1. !> Otherwise, with probability 0.5, odd-even pairs of !> diagonal entries A(2*j-1,2*j-1), A(2*j,2*j) will be !> converted to a 2x2 block by pre- and post-multiplying !> by distinct random orthogonal rotations. The remaining !> diagonal entries will have their sign changed at random. !> |
| [in] | AMAGN | !> AMAGN is DOUBLE PRECISION !> The diagonal and subdiagonal entries will be multiplied by !> AMAGN. !> |
| [in] | RCOND | !> RCOND is DOUBLE PRECISION !> If abs(ITYPE) > 4, then the smallest diagonal entry will be !> entry will be RCOND. RCOND must be between 0 and 1. !> |
| [in] | TRIANG | !> TRIANG is DOUBLE PRECISION !> The entries above the diagonal will be random numbers with !> magnitude bounded by TRIANG (i.e., random numbers multiplied !> by TRIANG.) !> |
| [in] | IDIST | !> IDIST is INTEGER !> Specifies the type of distribution to be used to generate a !> random matrix. !> = 1: UNIFORM( 0, 1 ) !> = 2: UNIFORM( -1, 1 ) !> = 3: NORMAL ( 0, 1 ) !> |
| [in,out] | ISEED | !> ISEED is INTEGER array, dimension (4) !> On entry ISEED specifies the seed of the random number !> generator. The values of ISEED are changed on exit, and can !> be used in the next call to DLATM4 to continue the same !> random number sequence. !> Note: ISEED(4) should be odd, for the random number generator !> used at present. !> |
| [out] | A | !> A is DOUBLE PRECISION array, dimension (LDA, N) !> Array to be computed. !> |
| [in] | LDA | !> LDA is INTEGER !> Leading dimension of A. Must be at least 1 and at least N. !> |
Definition at line 173 of file dlatm4.f.
| logical function dlctes | ( | double precision | zr, |
| double precision | zi, | ||
| double precision | d ) |
DLCTES
!> !> DLCTES returns .TRUE. if the eigenvalue (ZR/D) + sqrt(-1)*(ZI/D) !> is to be selected (specifically, in this subroutine, if the real !> part of the eigenvalue is negative), and otherwise it returns !> .FALSE.. !> !> It is used by the test routine DDRGES to test whether the driver !> routine DGGES successfully sorts eigenvalues. !>
| [in] | ZR | !> ZR is DOUBLE PRECISION !> The numerator of the real part of a complex eigenvalue !> (ZR/D) + i*(ZI/D). !> |
| [in] | ZI | !> ZI is DOUBLE PRECISION !> The numerator of the imaginary part of a complex eigenvalue !> (ZR/D) + i*(ZI). !> |
| [in] | D | !> D is DOUBLE PRECISION !> The denominator part of a complex eigenvalue !> (ZR/D) + i*(ZI/D). !> |
Definition at line 67 of file dlctes.f.
| logical function dlctsx | ( | double precision | ar, |
| double precision | ai, | ||
| double precision | beta ) |
DLCTSX
!> !> This function is used to determine what eigenvalues will be !> selected. If this is part of the test driver DDRGSX, do not !> change the code UNLESS you are testing input examples and not !> using the built-in examples. !>
| [in] | AR | !> AR is DOUBLE PRECISION !> The numerator of the real part of a complex eigenvalue !> (AR/BETA) + i*(AI/BETA). !> |
| [in] | AI | !> AI is DOUBLE PRECISION !> The numerator of the imaginary part of a complex eigenvalue !> (AR/BETA) + i*(AI). !> |
| [in] | BETA | !> BETA is DOUBLE PRECISION !> The denominator part of a complex eigenvalue !> (AR/BETA) + i*(AI/BETA). !> |
Definition at line 64 of file dlctsx.f.
| subroutine dlsets | ( | integer | m, |
| integer | p, | ||
| integer | n, | ||
| double precision, dimension( lda, * ) | a, | ||
| double precision, dimension( lda, * ) | af, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| double precision, dimension( ldb, * ) | bf, | ||
| integer | ldb, | ||
| double precision, dimension( * ) | c, | ||
| double precision, dimension( * ) | cf, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | df, | ||
| double precision, dimension( * ) | x, | ||
| double precision, dimension( lwork ) | work, | ||
| integer | lwork, | ||
| double precision, dimension( * ) | rwork, | ||
| double precision, dimension( 2 ) | result ) |
DLSETS
!> !> DLSETS tests DGGLSE - a subroutine for solving linear equality !> constrained least square problem (LSE). !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrix A. M >= 0. !> |
| [in] | P | !> P is INTEGER !> The number of rows of the matrix B. P >= 0. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices A and B. N >= 0. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA,N) !> The M-by-N matrix A. !> |
| [out] | AF | !> AF is DOUBLE PRECISION array, dimension (LDA,N) !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the arrays A, AF, Q and R. !> LDA >= max(M,N). !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB,N) !> The P-by-N matrix A. !> |
| [out] | BF | !> BF is DOUBLE PRECISION array, dimension (LDB,N) !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the arrays B, BF, V and S. !> LDB >= max(P,N). !> |
| [in] | C | !> C is DOUBLE PRECISION array, dimension( M ) !> the vector C in the LSE problem. !> |
| [out] | CF | !> CF is DOUBLE PRECISION array, dimension( M ) !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension( P ) !> the vector D in the LSE problem. !> |
| [out] | DF | !> DF is DOUBLE PRECISION array, dimension( P ) !> |
| [out] | X | !> X is DOUBLE PRECISION array, dimension( N ) !> solution vector X in the LSE problem. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK. !> |
| [out] | RWORK | !> RWORK is DOUBLE PRECISION array, dimension (M) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> The test ratios: !> RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS !> RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS !> |
Definition at line 149 of file dlsets.f.
| subroutine dort01 | ( | character | rowcol, |
| integer | m, | ||
| integer | n, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| double precision | resid ) |
DORT01
!> !> 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, ROWCOL is !> assumed to be 'R'. !>
| [in] | ROWCOL | !> ROWCOL is CHARACTER !> Specifies whether the rows or columns of U should be checked !> for orthogonality. Used only if M = N. !> = 'R': Check for orthogonal rows of U !> = 'C': Check for orthogonal columns of U !> |
| [in] | M | !> M is INTEGER !> The number of rows of the matrix U. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrix U. !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU,N) !> The orthogonal matrix U. U is checked for orthogonal columns !> if m > n or if m = n and ROWCOL = 'C'. U is checked for !> orthogonal rows if m < n or if m = n and ROWCOL = 'R'. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,M). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is 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. !> |
| [out] | RESID | !> RESID is DOUBLE PRECISION !> RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or !> RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'. !> |
Definition at line 115 of file dort01.f.
| subroutine dort03 | ( | character*( * ) | rc, |
| integer | mu, | ||
| integer | mv, | ||
| integer | n, | ||
| integer | k, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldv, * ) | v, | ||
| integer | ldv, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| double precision | result, | ||
| integer | info ) |
DORT03
!> !> DORT03 compares two orthogonal matrices U and V to see if their !> corresponding rows or columns span the same spaces. The rows are !> checked if RC = 'R', and the columns are checked if RC = 'C'. !> !> RESULT is the maximum of !> !> | V*V' - I | / ( MV ulp ), if RC = 'R', or !> !> | V'*V - I | / ( MV ulp ), if RC = 'C', !> !> and the maximum over rows (or columns) 1 to K of !> !> | U(i) - S*V(i) |/ ( N ulp ) !> !> where S is +-1 (chosen to minimize the expression), U(i) is the i-th !> row (column) of U, and V(i) is the i-th row (column) of V. !>
| [in] | RC | !> RC is CHARACTER*1 !> If RC = 'R' the rows of U and V are to be compared. !> If RC = 'C' the columns of U and V are to be compared. !> |
| [in] | MU | !> MU is INTEGER !> The number of rows of U if RC = 'R', and the number of !> columns if RC = 'C'. If MU = 0 DORT03 does nothing. !> MU must be at least zero. !> |
| [in] | MV | !> MV is INTEGER !> The number of rows of V if RC = 'R', and the number of !> columns if RC = 'C'. If MV = 0 DORT03 does nothing. !> MV must be at least zero. !> |
| [in] | N | !> N is INTEGER !> If RC = 'R', the number of columns in the matrices U and V, !> and if RC = 'C', the number of rows in U and V. If N = 0 !> DORT03 does nothing. N must be at least zero. !> |
| [in] | K | !> K is INTEGER !> The number of rows or columns of U and V to compare. !> 0 <= K <= max(MU,MV). !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU,N) !> The first matrix to compare. If RC = 'R', U is MU by N, and !> if RC = 'C', U is N by MU. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. If RC = 'R', LDU >= max(1,MU), !> and if RC = 'C', LDU >= max(1,N). !> |
| [in] | V | !> V is DOUBLE PRECISION array, dimension (LDV,N) !> The second matrix to compare. If RC = 'R', V is MV by N, and !> if RC = 'C', V is N by MV. !> |
| [in] | LDV | !> LDV is INTEGER !> The leading dimension of V. If RC = 'R', LDV >= max(1,MV), !> and if RC = 'C', LDV >= max(1,N). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LWORK) !> |
| [in] | LWORK | !> LWORK is INTEGER !> The length of the array WORK. For best performance, LWORK !> should be at least N*N if RC = 'C' or M*M if RC = 'R', but !> the tests will be done even if LWORK is 0. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION !> The value computed by the test described above. RESULT is !> limited to 1/ulp to avoid overflow. !> |
| [out] | INFO | !> INFO is INTEGER !> 0 indicates a successful exit !> -k indicates the k-th parameter had an illegal value !> |
Definition at line 154 of file dort03.f.
| subroutine dsbt21 | ( | character | uplo, |
| integer | n, | ||
| integer | ka, | ||
| integer | ks, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( 2 ) | result ) |
DSBT21
!> !> DSBT21 generally checks a decomposition of the form !> !> A = U S U**T !> !> where **T means transpose, A is symmetric banded, U is !> orthogonal, and S is diagonal (if KS=0) or symmetric !> tridiagonal (if KS=1). !> !> Specifically: !> !> RESULT(1) = | A - U S U**T | / ( |A| n ulp ) and !> RESULT(2) = | I - U U**T | / ( n ulp ) !>
| [in] | UPLO | !> UPLO is CHARACTER !> If UPLO='U', the upper triangle of A and V will be used and !> the (strictly) lower triangle will not be referenced. !> If UPLO='L', the lower triangle of A and V will be used and !> the (strictly) upper triangle will not be referenced. !> |
| [in] | N | !> N is INTEGER !> The size of the matrix. If it is zero, DSBT21 does nothing. !> It must be at least zero. !> |
| [in] | KA | !> KA is INTEGER !> The bandwidth of the matrix A. It must be at least zero. If !> it is larger than N-1, then max( 0, N-1 ) will be used. !> |
| [in] | KS | !> KS is INTEGER !> The bandwidth of the matrix S. 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. !> |
| [in] | A | !> A is DOUBLE PRECISION array, 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. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at least 1 !> and at least min( KA, N-1 ). !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (N) !> The diagonal of the (symmetric tri-) diagonal matrix S. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> The off-diagonal of the (symmetric tri-) diagonal matrix S. !> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and !> (3,2) element, etc. !> Not referenced if KS=0. !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU, N) !> The orthogonal matrix in the decomposition, expressed as a !> dense matrix (i.e., not as a product of Householder !> transformations, Givens transformations, etc.) !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. LDU must be at least N and !> at least 1. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (N**2+N) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> The values computed by the two tests described above. The !> values are currently limited to 1/ulp, to avoid overflow. !> |
Definition at line 145 of file dsbt21.f.
| subroutine dsgt01 | ( | integer | itype, |
| character | uplo, | ||
| integer | n, | ||
| integer | m, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( ldb, * ) | b, | ||
| integer | ldb, | ||
| double precision, dimension( ldz, * ) | z, | ||
| integer | ldz, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( * ) | result ) |
DSGT01
!> !> DDGT01 checks a decomposition of the form !> !> A Z = B Z D or !> A B Z = Z D or !> B A Z = Z D !> !> where A is a symmetric matrix, B is !> symmetric positive definite, Z is orthogonal, and D is diagonal. !> !> One of the following test ratios is computed: !> !> ITYPE = 1: RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp ) !> !> ITYPE = 2: RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp ) !> !> ITYPE = 3: RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp ) !>
| [in] | ITYPE | !> ITYPE is INTEGER !> The form of the symmetric generalized eigenproblem. !> = 1: A*z = (lambda)*B*z !> = 2: A*B*z = (lambda)*z !> = 3: B*A*z = (lambda)*z !> |
| [in] | UPLO | !> UPLO is CHARACTER*1 !> Specifies whether the upper or lower triangular part of the !> symmetric matrices A and B is stored. !> = 'U': Upper triangular !> = 'L': Lower triangular !> |
| [in] | N | !> N is INTEGER !> The order of the matrix A. N >= 0. !> |
| [in] | M | !> M is INTEGER !> The number of eigenvalues found. 0 <= M <= N. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (LDA, N) !> The original symmetric matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,N). !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (LDB, N) !> The original symmetric positive definite matrix B. !> |
| [in] | LDB | !> LDB is INTEGER !> The leading dimension of the array B. LDB >= max(1,N). !> |
| [in] | Z | !> Z is DOUBLE PRECISION array, dimension (LDZ, M) !> The computed eigenvectors of the generalized eigenproblem. !> |
| [in] | LDZ | !> LDZ is INTEGER !> The leading dimension of the array Z. LDZ >= max(1,N). !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (M) !> The computed eigenvalues of the generalized eigenproblem. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (N*N) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (1) !> The test ratio as described above. !> |
Definition at line 144 of file dsgt01.f.
| logical function dslect | ( | double precision | zr, |
| double precision | zi ) |
DSLECT
!> !> DSLECT returns .TRUE. if the eigenvalue ZR+sqrt(-1)*ZI is to be !> selected, and otherwise it returns .FALSE. !> It is used by DCHK41 to test if DGEES successfully sorts eigenvalues, !> and by DCHK43 to test if DGEESX successfully sorts eigenvalues. !> !> The common block /SSLCT/ controls how eigenvalues are selected. !> If SELOPT = 0, then DSLECT return .TRUE. when ZR is less than zero, !> and .FALSE. otherwise. !> If SELOPT is at least 1, DSLECT returns SELVAL(SELOPT) and adds 1 !> to SELOPT, cycling back to 1 at SELMAX. !>
| [in] | ZR | !> ZR is DOUBLE PRECISION !> The real part of a complex eigenvalue ZR + i*ZI. !> |
| [in] | ZI | !> ZI is DOUBLE PRECISION !> The imaginary part of a complex eigenvalue ZR + i*ZI. !> |
Definition at line 61 of file dslect.f.
| subroutine dspt21 | ( | integer | itype, |
| character | uplo, | ||
| integer | n, | ||
| integer | kband, | ||
| double precision, dimension( * ) | ap, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( * ) | vp, | ||
| double precision, dimension( * ) | tau, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( 2 ) | result ) |
DSPT21
!> !> DSPT21 generally checks a decomposition of the form !> !> A = U S U**T !> !> where **T means transpose, A is symmetric (stored in packed format), U !> is orthogonal, 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 !> and whose scaling constants are in we shall use the !> letter to refer to the product of Householder transformations !> (which should be equal to U). !> !> Specifically, if ITYPE=1, then: !> !> RESULT(1) = | A - U S U**T | / ( |A| n ulp ) and !> RESULT(2) = | I - U U**T | / ( n ulp ) !> !> If ITYPE=2, then: !> !> RESULT(1) = | A - V S V**T | / ( |A| n ulp ) !> !> If ITYPE=3, then: !> !> RESULT(1) = | I - V U**T | / ( n ulp ) !> !> Packed storage means that, for example, if UPLO='U', then the columns !> of the upper triangle of A are stored one after another, so that !> A(1,j+1) immediately follows A(j,j) in the array AP. Similarly, if !> UPLO='L', then the columns of the lower triangle of A are stored one !> after another in AP, so that A(j+1,j+1) immediately follows A(n,j) !> in the array AP. This means that A(i,j) is stored in: !> !> AP( i + j*(j-1)/2 ) if UPLO='U' !> !> AP( i + (2*n-j)*(j-1)/2 ) if UPLO='L' !> !> The array VP bears the same relation to the matrix V that A does to !> AP. !> !> For ITYPE > 1, the transformation U is expressed as a product !> of Householder transformations: !> !> If UPLO='U', then V = H(n-1)...H(1), where !> !> H(j) = I - tau(j) v(j) v(j)**T !> !> and the first j-1 elements of v(j) are stored in V(1:j-1,j+1), !> (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ), !> the j-th element is 1, and the last n-j elements are 0. !> !> If UPLO='L', then V = H(1)...H(n-1), where !> !> H(j) = I - tau(j) v(j) v(j)**T !> !> and the first j elements of v(j) are 0, the (j+1)-st is 1, and the !> (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e., !> in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .) !>
| [in] | ITYPE | !> ITYPE is INTEGER !> Specifies the type of tests to be performed. !> 1: U expressed as a dense orthogonal matrix: !> RESULT(1) = | A - U S U**T | / ( |A| n ulp ) and !> RESULT(2) = | I - U U**T | / ( n ulp ) !> !> 2: U expressed as a product V of Housholder transformations: !> RESULT(1) = | A - V S V**T | / ( |A| n ulp ) !> !> 3: U expressed both as a dense orthogonal matrix and !> as a product of Housholder transformations: !> RESULT(1) = | I - V U**T | / ( n ulp ) !> |
| [in] | UPLO | !> UPLO is CHARACTER !> If UPLO='U', AP and VP are considered to contain the upper !> triangle of A and V. !> If UPLO='L', AP and VP are considered to contain the lower !> triangle of A and V. !> |
| [in] | N | !> N is INTEGER !> The size of the matrix. If it is zero, DSPT21 does nothing. !> It must be at least zero. !> |
| [in] | KBAND | !> KBAND is INTEGER !> 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. !> |
| [in] | AP | !> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2) !> The original (unfactored) matrix. It is assumed to be !> symmetric, and contains the columns of just the upper !> triangle (UPLO='U') or only the lower triangle (UPLO='L'), !> packed one after another. !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (N) !> The diagonal of the (symmetric tri-) diagonal matrix. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> The off-diagonal of the (symmetric tri-) diagonal matrix. !> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and !> (3,2) element, etc. !> Not referenced if KBAND=0. !> |
| [in] | U | !> U is DOUBLE PRECISION array, 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. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. LDU must be at least N and !> at least 1. !> |
| [in] | VP | !> VP is DOUBLE PRECISION array, dimension (N*(N+1)/2) !> If ITYPE=2 or 3, the columns of this array contain the !> Householder vectors used to describe the orthogonal matrix !> in the decomposition, as described in purpose. !> *NOTE* If ITYPE=2 or 3, V is modified and restored. The !> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U') !> is set to one, and later reset to its original value, during !> the course of the calculation. !> If ITYPE=1, then it is neither referenced nor modified. !> |
| [in] | TAU | !> TAU is DOUBLE PRECISION array, dimension (N) !> If ITYPE >= 2, then TAU(j) is the scalar factor of !> v(j) v(j)**T in the Householder transformation H(j) of !> the product U = H(1)...H(n-2) !> If ITYPE < 2, then TAU is not referenced. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (N**2+N) !> Workspace. !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> The values computed by the two tests described above. The !> values are currently limited to 1/ulp, to avoid overflow. !> RESULT(1) is always modified. RESULT(2) is modified only !> if ITYPE=1. !> |
Definition at line 219 of file dspt21.f.
| subroutine dstech | ( | integer | n, |
| double precision, dimension( * ) | a, | ||
| double precision, dimension( * ) | b, | ||
| double precision, dimension( * ) | eig, | ||
| double precision | tol, | ||
| double precision, dimension( * ) | work, | ||
| integer | info ) |
DSTECH
!> !> Let T be the tridiagonal matrix with diagonal entries A(1) ,..., !> A(N) and offdiagonal entries B(1) ,..., B(N-1)). DSTECH checks to !> see if EIG(1) ,..., EIG(N) are indeed accurate eigenvalues of T. !> It does this by expanding each EIG(I) into an interval !> [SVD(I) - EPS, SVD(I) + EPS], merging overlapping intervals if !> any, and using Sturm sequences to count and verify whether each !> resulting interval has the correct number of eigenvalues (using !> DSTECT). Here EPS = TOL*MAZHEPS*MAXEIG, where MACHEPS is the !> machine precision and MAXEIG is the absolute value of the largest !> eigenvalue. If each interval contains the correct number of !> eigenvalues, INFO = 0 is returned, otherwise INFO is the index of !> the first eigenvalue in the first bad interval. !>
| [in] | N | !> N is INTEGER !> The dimension of the tridiagonal matrix T. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (N) !> The diagonal entries of the tridiagonal matrix T. !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (N-1) !> The offdiagonal entries of the tridiagonal matrix T. !> |
| [in] | EIG | !> EIG is DOUBLE PRECISION array, dimension (N) !> The purported eigenvalues to be checked. !> |
| [in] | TOL | !> TOL is DOUBLE PRECISION !> Error tolerance for checking, a multiple of the !> machine precision. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (N) !> |
| [out] | INFO | !> INFO is INTEGER !> 0 if the eigenvalues are all correct (to within !> 1 +- TOL*MAZHEPS*MAXEIG) !> >0 if the interval containing the INFO-th eigenvalue !> contains the incorrect number of eigenvalues. !> |
Definition at line 100 of file dstech.f.
| subroutine dstect | ( | integer | n, |
| double precision, dimension( * ) | a, | ||
| double precision, dimension( * ) | b, | ||
| double precision | shift, | ||
| integer | num ) |
DSTECT
!> !> DSTECT counts the number NUM of eigenvalues of a tridiagonal !> matrix T which are less than or equal to SHIFT. T has !> diagonal entries A(1), ... , A(N), and offdiagonal entries !> B(1), ..., B(N-1). !> See W. Kahan , Report CS41, Computer Science Dept., Stanford !> University, July 21, 1966 !>
| [in] | N | !> N is INTEGER !> The dimension of the tridiagonal matrix T. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (N) !> The diagonal entries of the tridiagonal matrix T. !> |
| [in] | B | !> B is DOUBLE PRECISION array, dimension (N-1) !> The offdiagonal entries of the tridiagonal matrix T. !> |
| [in] | SHIFT | !> SHIFT is DOUBLE PRECISION !> The shift, used as described under Purpose. !> |
| [out] | NUM | !> NUM is INTEGER !> The number of eigenvalues of T less than or equal !> to SHIFT. !> |
Definition at line 81 of file dstect.f.
| subroutine dstt21 | ( | integer | n, |
| integer | kband, | ||
| double precision, dimension( * ) | ad, | ||
| double precision, dimension( * ) | ae, | ||
| double precision, dimension( * ) | sd, | ||
| double precision, dimension( * ) | se, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( 2 ) | result ) |
DSTT21
!> !> DSTT21 checks a decomposition of the form !> !> A = U S U' !> !> where ' means transpose, A is symmetric tridiagonal, U is orthogonal, !> and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1). !> Two tests are performed: !> !> RESULT(1) = | A - U S U' | / ( |A| n ulp ) !> !> RESULT(2) = | I - UU' | / ( n ulp ) !>
| [in] | N | !> N is INTEGER !> The size of the matrix. If it is zero, DSTT21 does nothing. !> It must be at least zero. !> |
| [in] | KBAND | !> KBAND is INTEGER !> The bandwidth of the matrix S. It may only be zero or one. !> If zero, then S is diagonal, and SE is not referenced. If !> one, then S is symmetric tri-diagonal. !> |
| [in] | AD | !> AD is DOUBLE PRECISION array, dimension (N) !> The diagonal of the original (unfactored) matrix A. A is !> assumed to be symmetric tridiagonal. !> |
| [in] | AE | !> AE is DOUBLE PRECISION array, dimension (N-1) !> The off-diagonal of the original (unfactored) matrix A. A !> is assumed to be symmetric tridiagonal. AE(1) is the (1,2) !> and (2,1) element, AE(2) is the (2,3) and (3,2) element, etc. !> |
| [in] | SD | !> SD is DOUBLE PRECISION array, dimension (N) !> The diagonal of the (symmetric tri-) diagonal matrix S. !> |
| [in] | SE | !> SE is DOUBLE PRECISION array, dimension (N-1) !> The off-diagonal of the (symmetric tri-) diagonal matrix S. !> Not referenced if KBSND=0. If KBAND=1, then AE(1) is the !> (1,2) and (2,1) element, SE(2) is the (2,3) and (3,2) !> element, etc. !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU, N) !> The orthogonal matrix in the decomposition. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. LDU must be at least N. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (N*(N+1)) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> The values computed by the two tests described above. The !> values are currently limited to 1/ulp, to avoid overflow. !> RESULT(1) is always modified. !> |
Definition at line 125 of file dstt21.f.
| subroutine dstt22 | ( | integer | n, |
| integer | m, | ||
| integer | kband, | ||
| double precision, dimension( * ) | ad, | ||
| double precision, dimension( * ) | ae, | ||
| double precision, dimension( * ) | sd, | ||
| double precision, dimension( * ) | se, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldwork, * ) | work, | ||
| integer | ldwork, | ||
| double precision, dimension( 2 ) | result ) |
DSTT22
!> !> DSTT22 checks a set of M eigenvalues and eigenvectors, !> !> A U = U S !> !> where A is symmetric tridiagonal, the columns of U are orthogonal, !> and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1). !> Two tests are performed: !> !> RESULT(1) = | U' A U - S | / ( |A| m ulp ) !> !> RESULT(2) = | I - U'U | / ( m ulp ) !>
| [in] | N | !> N is INTEGER !> The size of the matrix. If it is zero, DSTT22 does nothing. !> It must be at least zero. !> |
| [in] | M | !> M is INTEGER !> The number of eigenpairs to check. If it is zero, DSTT22 !> does nothing. It must be at least zero. !> |
| [in] | KBAND | !> KBAND is INTEGER !> The bandwidth of the matrix S. It may only be zero or one. !> If zero, then S is diagonal, and SE is not referenced. If !> one, then S is symmetric tri-diagonal. !> |
| [in] | AD | !> AD is DOUBLE PRECISION array, dimension (N) !> The diagonal of the original (unfactored) matrix A. A is !> assumed to be symmetric tridiagonal. !> |
| [in] | AE | !> AE is DOUBLE PRECISION array, dimension (N) !> The off-diagonal of the original (unfactored) matrix A. A !> is assumed to be symmetric tridiagonal. AE(1) is ignored, !> AE(2) is the (1,2) and (2,1) element, etc. !> |
| [in] | SD | !> SD is DOUBLE PRECISION array, dimension (N) !> The diagonal of the (symmetric tri-) diagonal matrix S. !> |
| [in] | SE | !> SE is DOUBLE PRECISION array, dimension (N) !> The off-diagonal of the (symmetric tri-) diagonal matrix S. !> Not referenced if KBSND=0. If KBAND=1, then AE(1) is !> ignored, SE(2) is the (1,2) and (2,1) element, etc. !> |
| [in] | U | !> U is DOUBLE PRECISION array, dimension (LDU, N) !> The orthogonal matrix in the decomposition. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. LDU must be at least N. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (LDWORK, M+1) !> |
| [in] | LDWORK | !> LDWORK is INTEGER !> The leading dimension of WORK. LDWORK must be at least !> max(1,M). !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> The values computed by the two tests described above. The !> values are currently limited to 1/ulp, to avoid overflow. !> |
Definition at line 137 of file dstt22.f.
| subroutine dsvdch | ( | integer | n, |
| double precision, dimension( * ) | s, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( * ) | svd, | ||
| double precision | tol, | ||
| integer | info ) |
DSVDCH
!> !> DSVDCH checks to see if SVD(1) ,..., SVD(N) are accurate singular !> values of the bidiagonal matrix B with diagonal entries !> S(1) ,..., S(N) and superdiagonal entries E(1) ,..., E(N-1)). !> It does this by expanding each SVD(I) into an interval !> [SVD(I) * (1-EPS) , SVD(I) * (1+EPS)], merging overlapping intervals !> if any, and using Sturm sequences to count and verify whether each !> resulting interval has the correct number of singular values (using !> DSVDCT). Here EPS=TOL*MAX(N/10,1)*MAZHEP, where MACHEP is the !> machine precision. The routine assumes the singular values are sorted !> with SVD(1) the largest and SVD(N) smallest. If each interval !> contains the correct number of singular values, INFO = 0 is returned, !> otherwise INFO is the index of the first singular value in the first !> bad interval. !>
| [in] | N | !> N is INTEGER !> The dimension of the bidiagonal matrix B. !> |
| [in] | S | !> S is DOUBLE PRECISION array, dimension (N) !> The diagonal entries of the bidiagonal matrix B. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> The superdiagonal entries of the bidiagonal matrix B. !> |
| [in] | SVD | !> SVD is DOUBLE PRECISION array, dimension (N) !> The computed singular values to be checked. !> |
| [in] | TOL | !> TOL is DOUBLE PRECISION !> Error tolerance for checking, a multiplier of the !> machine precision. !> |
| [out] | INFO | !> INFO is INTEGER !> =0 if the singular values are all correct (to within !> 1 +- TOL*MAZHEPS) !> >0 if the interval containing the INFO-th singular value !> contains the incorrect number of singular values. !> |
Definition at line 96 of file dsvdch.f.
| subroutine dsvdct | ( | integer | n, |
| double precision, dimension( * ) | s, | ||
| double precision, dimension( * ) | e, | ||
| double precision | shift, | ||
| integer | num ) |
DSVDCT
!> !> DSVDCT counts the number NUM of eigenvalues of a 2*N by 2*N !> tridiagonal matrix T which are less than or equal to SHIFT. T is !> formed by putting zeros on the diagonal and making the off-diagonals !> equal to S(1), E(1), S(2), E(2), ... , E(N-1), S(N). If SHIFT is !> positive, NUM is equal to N plus the number of singular values of a !> bidiagonal matrix B less than or equal to SHIFT. Here B has diagonal !> entries S(1), ..., S(N) and superdiagonal entries E(1), ... E(N-1). !> If SHIFT is negative, NUM is equal to the number of singular values !> of B greater than or equal to -SHIFT. !> !> See W. Kahan , Report CS41, Computer Science Dept., Stanford University, !> July 21, 1966 !>
| [in] | N | !> N is INTEGER !> The dimension of the bidiagonal matrix B. !> |
| [in] | S | !> S is DOUBLE PRECISION array, dimension (N) !> The diagonal entries of the bidiagonal matrix B. !> |
| [in] | E | !> E is DOUBLE PRECISION array of dimension (N-1) !> The superdiagonal entries of the bidiagonal matrix B. !> |
| [in] | SHIFT | !> SHIFT is DOUBLE PRECISION !> The shift, used as described under Purpose. !> |
| [out] | NUM | !> NUM is INTEGER !> The number of eigenvalues of T less than or equal to SHIFT. !> |
Definition at line 86 of file dsvdct.f.
| double precision function dsxt1 | ( | integer | ijob, |
| double precision, dimension( * ) | d1, | ||
| integer | n1, | ||
| double precision, dimension( * ) | d2, | ||
| integer | n2, | ||
| double precision | abstol, | ||
| double precision | ulp, | ||
| double precision | unfl ) |
DSXT1
!>
!> 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 ) }
!> | [in] | IJOB | !> IJOB is INTEGER !> Specifies the type of tests to be performed. (See above.) !> |
| [in] | D1 | !> D1 is DOUBLE PRECISION array, dimension (N1) !> The first array. D1 should be in increasing order, i.e., !> D1(j) <= D1(j+1). !> |
| [in] | N1 | !> N1 is INTEGER !> The length of D1. !> |
| [in] | D2 | !> D2 is DOUBLE PRECISION array, dimension (N2) !> The second array. D2 should be in increasing order, i.e., !> D2(j) <= D2(j+1). !> |
| [in] | N2 | !> N2 is INTEGER !> The length of D2. !> |
| [in] | ABSTOL | !> ABSTOL is DOUBLE PRECISION !> The absolute tolerance, used as a measure of the error. !> |
| [in] | ULP | !> ULP is DOUBLE PRECISION !> Machine precision. !> |
| [in] | UNFL | !> UNFL is DOUBLE PRECISION !> The smallest positive number whose reciprocal does not !> overflow. !> |
Definition at line 104 of file dsxt1.f.
| subroutine dsyt21 | ( | integer | itype, |
| character | uplo, | ||
| integer | n, | ||
| integer | kband, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldv, * ) | v, | ||
| integer | ldv, | ||
| double precision, dimension( * ) | tau, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( 2 ) | result ) |
DSYT21
!> !> DSYT21 generally checks a decomposition of the form !> !> A = U S U**T !> !> where **T means transpose, A is symmetric, U is orthogonal, 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 U is !> expressed as a product of Householder transformations, whose vectors !> are stored in the array and whose scaling constants are in . !> We shall use the letter to refer to the product of Householder !> transformations (which should be equal to U). !> !> Specifically, if ITYPE=1, then: !> !> RESULT(1) = | A - U S U**T | / ( |A| n ulp ) and !> RESULT(2) = | I - U U**T | / ( n ulp ) !> !> If ITYPE=2, then: !> !> RESULT(1) = | A - V S V**T | / ( |A| n ulp ) !> !> If ITYPE=3, then: !> !> RESULT(1) = | I - V U**T | / ( n ulp ) !> !> For ITYPE > 1, the transformation U is expressed as a product !> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)**T and each !> vector v(j) has its first j elements 0 and the remaining n-j elements !> stored in V(j+1:n,j). !>
| [in] | ITYPE | !> ITYPE is INTEGER !> Specifies the type of tests to be performed. !> 1: U expressed as a dense orthogonal matrix: !> RESULT(1) = | A - U S U**T | / ( |A| n ulp ) and !> RESULT(2) = | I - U U**T | / ( n ulp ) !> !> 2: U expressed as a product V of Housholder transformations: !> RESULT(1) = | A - V S V**T | / ( |A| n ulp ) !> !> 3: U expressed both as a dense orthogonal matrix and !> as a product of Housholder transformations: !> RESULT(1) = | I - V U**T | / ( n ulp ) !> |
| [in] | UPLO | !> UPLO is CHARACTER !> If UPLO='U', the upper triangle of A and V will be used and !> the (strictly) lower triangle will not be referenced. !> If UPLO='L', the lower triangle of A and V will be used and !> the (strictly) upper triangle will not be referenced. !> |
| [in] | N | !> N is INTEGER !> The size of the matrix. If it is zero, DSYT21 does nothing. !> It must be at least zero. !> |
| [in] | KBAND | !> KBAND is INTEGER !> 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. !> |
| [in] | A | !> A is DOUBLE PRECISION array, 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. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of A. It must be at least 1 !> and at least N. !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (N) !> The diagonal of the (symmetric tri-) diagonal matrix. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> The off-diagonal of the (symmetric tri-) diagonal matrix. !> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and !> (3,2) element, etc. !> Not referenced if KBAND=0. !> |
| [in] | U | !> U is DOUBLE PRECISION array, 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. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of U. LDU must be at least N and !> at least 1. !> |
| [in] | V | !> V is DOUBLE PRECISION array, dimension (LDV, N) !> If ITYPE=2 or 3, the columns of this array contain the !> Householder vectors used to describe the orthogonal matrix !> in the decomposition. If UPLO='L', then the vectors are in !> the lower triangle, if UPLO='U', then in the upper !> triangle. !> *NOTE* If ITYPE=2 or 3, V is modified and restored. The !> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U') !> is set to one, and later reset to its original value, during !> the course of the calculation. !> If ITYPE=1, then it is neither referenced nor modified. !> |
| [in] | LDV | !> LDV is INTEGER !> The leading dimension of V. LDV must be at least N and !> at least 1. !> |
| [in] | TAU | !> TAU is DOUBLE PRECISION array, dimension (N) !> If ITYPE >= 2, then TAU(j) is the scalar factor of !> v(j) v(j)**T in the Householder transformation H(j) of !> the product U = H(1)...H(n-2) !> If ITYPE < 2, then TAU is not referenced. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (2*N**2) !> |
| [out] | RESULT | !> RESULT is DOUBLE PRECISION array, dimension (2) !> The values computed by the two tests described above. The !> values are currently limited to 1/ulp, to avoid overflow. !> RESULT(1) is always modified. RESULT(2) is modified only !> if ITYPE=1. !> |
Definition at line 205 of file dsyt21.f.
| subroutine dsyt22 | ( | integer | itype, |
| character | uplo, | ||
| integer | n, | ||
| integer | m, | ||
| integer | kband, | ||
| double precision, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldv, * ) | v, | ||
| integer | ldv, | ||
| double precision, dimension( * ) | tau, | ||
| double precision, dimension( * ) | work, | ||
| double precision, dimension( 2 ) | result ) |
DSYT22
!> !> 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 and !> whose scaling constants are in we shall use the letter !> to refer to the product of Householder transformations !> (which should be equal to U). !> !> Specifically, if ITYPE=1, then: !> !> RESULT(1) = | U**T A U - S | / ( |A| m ulp ) and !> RESULT(2) = | I - U**T U | / ( m ulp ) !>
!> ITYPE INTEGER !> Specifies the type of tests to be performed. !> 1: U expressed as a dense orthogonal matrix: !> RESULT(1) = | A - U S U**T | / ( |A| n ulp ) and !> RESULT(2) = | I - U U**T | / ( n ulp ) !> !> UPLO CHARACTER !> 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 INTEGER !> The size of the matrix. If it is zero, DSYT22 does nothing. !> It must be at least zero. !> Not modified. !> !> M INTEGER !> The number of columns of U. If it is zero, DSYT22 does !> nothing. It must be at least zero. !> Not modified. !> !> KBAND INTEGER !> 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 DOUBLE PRECISION array, 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 INTEGER !> The leading dimension of A. It must be at least 1 !> and at least N. !> Not modified. !> !> D DOUBLE PRECISION array, dimension (N) !> The diagonal of the (symmetric tri-) diagonal matrix. !> Not modified. !> !> E DOUBLE PRECISION array, dimension (N) !> The off-diagonal of the (symmetric tri-) diagonal matrix. !> E(1) is ignored, E(2) is the (1,2) and (2,1) element, etc. !> Not referenced if KBAND=0. !> Not modified. !> !> U DOUBLE PRECISION array, 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 INTEGER !> The leading dimension of U. LDU must be at least N and !> at least 1. !> Not modified. !> !> V DOUBLE PRECISION array, 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 INTEGER !> The leading dimension of V. LDV must be at least N and !> at least 1. !> Not modified. !> !> TAU DOUBLE PRECISION array, dimension (N) !> If ITYPE >= 2, then TAU(j) is the scalar factor of !> v(j) v(j)**T in the Householder transformation H(j) of !> the product U = H(1)...H(n-2) !> If ITYPE < 2, then TAU is not referenced. !> Not modified. !> !> WORK DOUBLE PRECISION array, dimension (2*N**2) !> Workspace. !> Modified. !> !> RESULT DOUBLE PRECISION array, dimension (2) !> The values computed by the two tests described above. The !> values are currently limited to 1/ulp, to avoid overflow. !> RESULT(1) is always modified. RESULT(2) is modified only !> if LDU is at least N. !> Modified. !>
Definition at line 155 of file dsyt22.f.
| subroutine sbdt04 | ( | character | uplo, |
| integer | n, | ||
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| real, dimension( * ) | s, | ||
| integer | ns, | ||
| real, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| real, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| real, dimension( * ) | work, | ||
| real | resid ) |
SBDT04
!> !> SBDT04 reconstructs a bidiagonal matrix B from its (partial) SVD: !> S = U' * B * V !> where U and V are orthogonal matrices and S is diagonal. !> !> The test ratio to test the singular value decomposition is !> RESID = norm( S - U' * B * V ) / ( n * norm(B) * EPS ) !> where VT = V' and EPS is the machine precision. !>
| [in] | UPLO | !> UPLO is CHARACTER*1 !> Specifies whether the matrix B is upper or lower bidiagonal. !> = 'U': Upper bidiagonal !> = 'L': Lower bidiagonal !> |
| [in] | N | !> N is INTEGER !> The order of the matrix B. !> |
| [in] | D | !> D is REAL array, dimension (N) !> The n diagonal elements of the bidiagonal matrix B. !> |
| [in] | E | !> E is REAL array, dimension (N-1) !> The (n-1) superdiagonal elements of the bidiagonal matrix B !> if UPLO = 'U', or the (n-1) subdiagonal elements of B if !> UPLO = 'L'. !> |
| [in] | S | !> S is REAL array, dimension (NS) !> The singular values from the (partial) SVD of B, sorted in !> decreasing order. !> |
| [in] | NS | !> NS is INTEGER !> The number of singular values/vectors from the (partial) !> SVD of B. !> |
| [in] | U | !> U is REAL array, dimension (LDU,NS) !> The n by ns orthogonal matrix U in S = U' * B * V. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,N) !> |
| [in] | VT | !> VT is REAL array, dimension (LDVT,N) !> The n by ns orthogonal matrix V in S = U' * B * V. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. !> |
| [out] | WORK | !> WORK is REAL array, dimension (2*N) !> |
| [out] | RESID | !> RESID is REAL !> The test ratio: norm(S - U' * B * V) / ( n * norm(B) * EPS ) !> |
Definition at line 129 of file sbdt04.f.
| subroutine sbdt05 | ( | integer | m, |
| integer | n, | ||
| real, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| real, dimension( * ) | s, | ||
| integer | ns, | ||
| real, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| real, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| real, dimension( * ) | work, | ||
| real | resid ) |
SBDT05
!> !> SBDT05 reconstructs a bidiagonal matrix B from its (partial) SVD: !> S = U' * B * V !> where U and V are orthogonal matrices and S is diagonal. !> !> The test ratio to test the singular value decomposition is !> RESID = norm( S - U' * B * V ) / ( n * norm(B) * EPS ) !> where VT = V' and EPS is the machine precision. !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrices A and U. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices A and VT. !> |
| [in] | A | !> A is REAL array, dimension (LDA,N) !> The m by n matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !> |
| [in] | S | !> S is REAL array, dimension (NS) !> The singular values from the (partial) SVD of B, sorted in !> decreasing order. !> |
| [in] | NS | !> NS is INTEGER !> The number of singular values/vectors from the (partial) !> SVD of B. !> |
| [in] | U | !> U is REAL array, dimension (LDU,NS) !> The n by ns orthogonal matrix U in S = U' * B * V. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,N) !> |
| [in] | VT | !> VT is REAL array, dimension (LDVT,N) !> The n by ns orthogonal matrix V in S = U' * B * V. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. !> |
| [out] | WORK | !> WORK is REAL array, dimension (M,N) !> |
| [out] | RESID | !> RESID is REAL !> The test ratio: norm(S - U' * A * V) / ( n * norm(A) * EPS ) !> |
Definition at line 125 of file sbdt05.f.
| subroutine sget40 | ( | real | rmax, |
| integer | lmax, | ||
| integer, dimension( 3 ) | ninfo, | ||
| integer | knt, | ||
| integer | nin ) |
SGET40
!> !> SGET40 tests STGEXC, a routine for swapping adjacent blocks (either !> 1 by 1 or 2 by 2) on the diagonal of a pencil in real generalized Schur form. !> Thus, STGEXC computes an orthogonal matrices Q and Z such that !> !> Q' * ( [ A B ], [ D E ] ) * Z = ( [ C1 B1 ], [ F1 E1 ] ) !> ( [ 0 C ] [ F ] ) ( [ 0 A1 ] [ D1] ) !> !> where (C1,F1) is similar to (C,F) and (A1,D1) is similar to (A,D). !> Both (A,D) and (C,F) are assumed to be in standard form !> and (A1,D1) and (C1,F1) are returned with the !> same properties. !>
| [out] | RMAX | !> RMAX is REAL !> Value of the largest test ratio. !> |
| [out] | LMAX | !> LMAX is INTEGER !> Example number where largest test ratio achieved. !> |
| [out] | NINFO | !> NINFO is INTEGER !> Number of examples where INFO is nonzero. !> |
| [out] | KNT | !> KNT is INTEGER !> Total number of examples tested. !> |
| [out] | NIN | !> NINFO is INTEGER !> |
Definition at line 82 of file sget40.f.
| subroutine zbdt05 | ( | integer | m, |
| integer | n, | ||
| complex*16, dimension( lda, * ) | a, | ||
| integer | lda, | ||
| double precision, dimension( * ) | s, | ||
| integer | ns, | ||
| complex*16, dimension( * ) | u, | ||
| integer | ldu, | ||
| complex*16, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| complex*16, dimension( * ) | work, | ||
| double precision | resid ) |
ZBDT05
!> !> ZBDT05 reconstructs a bidiagonal matrix B from its (partial) SVD: !> S = U' * B * V !> where U and V are orthogonal matrices and S is diagonal. !> !> The test ratio to test the singular value decomposition is !> RESID = norm( S - U' * B * V ) / ( n * norm(B) * EPS ) !> where VT = V' and EPS is the machine precision. !>
| [in] | M | !> M is INTEGER !> The number of rows of the matrices A and U. !> |
| [in] | N | !> N is INTEGER !> The number of columns of the matrices A and VT. !> |
| [in] | A | !> A is COMPLEX*16 array, dimension (LDA,N) !> The m by n matrix A. !> |
| [in] | LDA | !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !> |
| [in] | S | !> S is DOUBLE PRECISION array, dimension (NS) !> The singular values from the (partial) SVD of B, sorted in !> decreasing order. !> |
| [in] | NS | !> NS is INTEGER !> The number of singular values/vectors from the (partial) !> SVD of B. !> |
| [in] | U | !> U is COMPLEX*16 array, dimension (LDU,NS) !> The n by ns orthogonal matrix U in S = U' * B * V. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,N) !> |
| [in] | VT | !> VT is COMPLEX*16 array, dimension (LDVT,N) !> The n by ns orthogonal matrix V in S = U' * B * V. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. !> |
| [out] | WORK | !> WORK is COMPLEX*16 array, dimension (M,N) !> |
| [out] | RESID | !> RESID is DOUBLE PRECISION !> The test ratio: norm(S - U' * A * V) / ( n * norm(A) * EPS ) !> |
Definition at line 123 of file zbdt05.f.