Functions | |
| program | __secondtst_f__ |
| SECONDTST | |
| program | __slamchtst_f__ |
| SLAMCHTST | |
| character *1 function | chla_transtype (trans) |
| CHLA_TRANSTYPE | |
| subroutine | dbdsdc (uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work, iwork, info) |
| DBDSDC | |
| subroutine | dbdsqr (uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info) |
| DBDSQR | |
| subroutine | ddisna (job, m, n, d, sep, info) |
| DDISNA | |
| subroutine | dlaed0 (icompq, qsiz, n, d, e, q, ldq, qstore, ldqs, work, iwork, info) |
| DLAED0 used by DSTEDC. Computes all eigenvalues and corresponding eigenvectors of an unreduced symmetric tridiagonal matrix using the divide and conquer method. | |
| subroutine | dlaed1 (n, d, q, ldq, indxq, rho, cutpnt, work, iwork, info) |
| DLAED1 used by DSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is tridiagonal. | |
| subroutine | dlaed2 (k, n, n1, d, q, ldq, indxq, rho, z, dlamda, w, q2, indx, indxc, indxp, coltyp, info) |
| DLAED2 used by DSTEDC. Merges eigenvalues and deflates secular equation. Used when the original matrix is tridiagonal. | |
| subroutine | dlaed3 (k, n, n1, d, q, ldq, rho, dlamda, q2, indx, ctot, w, s, info) |
| DLAED3 used by DSTEDC. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is tridiagonal. | |
| subroutine | dlaed4 (n, i, d, z, delta, rho, dlam, info) |
| DLAED4 used by DSTEDC. Finds a single root of the secular equation. | |
| subroutine | dlaed5 (i, d, z, delta, rho, dlam) |
| DLAED5 used by DSTEDC. Solves the 2-by-2 secular equation. | |
| subroutine | dlaed6 (kniter, orgati, rho, d, z, finit, tau, info) |
| DLAED6 used by DSTEDC. Computes one Newton step in solution of the secular equation. | |
| subroutine | dlaed7 (icompq, n, qsiz, tlvls, curlvl, curpbm, d, q, ldq, indxq, rho, cutpnt, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, iwork, info) |
| DLAED7 used by DSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is dense. | |
| subroutine | dlaed8 (icompq, k, n, qsiz, d, q, ldq, indxq, rho, cutpnt, z, dlamda, q2, ldq2, w, perm, givptr, givcol, givnum, indxp, indx, info) |
| DLAED8 used by DSTEDC. Merges eigenvalues and deflates secular equation. Used when the original matrix is dense. | |
| subroutine | dlaed9 (k, kstart, kstop, n, d, q, ldq, rho, dlamda, w, s, lds, info) |
| DLAED9 used by DSTEDC. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is dense. | |
| subroutine | dlaeda (n, tlvls, curlvl, curpbm, prmptr, perm, givptr, givcol, givnum, q, qptr, z, ztemp, info) |
| DLAEDA used by DSTEDC. Computes the Z vector determining the rank-one modification of the diagonal matrix. Used when the original matrix is dense. | |
| subroutine | dlagtf (n, a, lambda, b, c, tol, d, in, info) |
| DLAGTF computes an LU factorization of a matrix T-λI, where T is a general tridiagonal matrix, and λ a scalar, using partial pivoting with row interchanges. | |
| subroutine | dlamrg (n1, n2, a, dtrd1, dtrd2, index) |
| DLAMRG creates a permutation list to merge the entries of two independently sorted sets into a single set sorted in ascending order. | |
| subroutine | dlartgs (x, y, sigma, cs, sn) |
| DLARTGS generates a plane rotation designed to introduce a bulge in implicit QR iteration for the bidiagonal SVD problem. | |
| subroutine | dlasq1 (n, d, e, work, info) |
| DLASQ1 computes the singular values of a real square bidiagonal matrix. Used by sbdsqr. | |
| subroutine | dlasq2 (n, z, info) |
| DLASQ2 computes all the eigenvalues of the symmetric positive definite tridiagonal matrix associated with the qd Array Z to high relative accuracy. Used by sbdsqr and sstegr. | |
| subroutine | dlasq3 (i0, n0, z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau) |
| DLASQ3 checks for deflation, computes a shift and calls dqds. Used by sbdsqr. | |
| subroutine | dlasq4 (i0, n0, z, pp, n0in, dmin, dmin1, dmin2, dn, dn1, dn2, tau, ttype, g) |
| DLASQ4 computes an approximation to the smallest eigenvalue using values of d from the previous transform. Used by sbdsqr. | |
| subroutine | dlasq5 (i0, n0, z, pp, tau, sigma, dmin, dmin1, dmin2, dn, dnm1, dnm2, ieee, eps) |
| DLASQ5 computes one dqds transform in ping-pong form. Used by sbdsqr and sstegr. | |
| subroutine | dlasq6 (i0, n0, z, pp, dmin, dmin1, dmin2, dn, dnm1, dnm2) |
| DLASQ6 computes one dqd transform in ping-pong form. Used by sbdsqr and sstegr. | |
| subroutine | dlasrt (id, n, d, info) |
| DLASRT sorts numbers in increasing or decreasing order. | |
| subroutine | dstebz (range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info) |
| DSTEBZ | |
| subroutine | dstedc (compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info) |
| DSTEDC | |
| subroutine | dsteqr (compz, n, d, e, z, ldz, work, info) |
| DSTEQR | |
| subroutine | dsterf (n, d, e, info) |
| DSTERF | |
| integer function | iladiag (diag) |
| ILADIAG | |
| integer function | ilaprec (prec) |
| ILAPREC | |
| integer function | ilatrans (trans) |
| ILATRANS | |
| integer function | ilauplo (uplo) |
| ILAUPLO | |
| subroutine | sbdsdc (uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work, iwork, info) |
| SBDSDC | |
| subroutine | sbdsqr (uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info) |
| SBDSQR | |
| subroutine | sdisna (job, m, n, d, sep, info) |
| SDISNA | |
| subroutine | slaed0 (icompq, qsiz, n, d, e, q, ldq, qstore, ldqs, work, iwork, info) |
| SLAED0 used by SSTEDC. Computes all eigenvalues and corresponding eigenvectors of an unreduced symmetric tridiagonal matrix using the divide and conquer method. | |
| subroutine | slaed1 (n, d, q, ldq, indxq, rho, cutpnt, work, iwork, info) |
| SLAED1 used by SSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is tridiagonal. | |
| subroutine | slaed2 (k, n, n1, d, q, ldq, indxq, rho, z, dlamda, w, q2, indx, indxc, indxp, coltyp, info) |
| SLAED2 used by SSTEDC. Merges eigenvalues and deflates secular equation. Used when the original matrix is tridiagonal. | |
| subroutine | slaed3 (k, n, n1, d, q, ldq, rho, dlamda, q2, indx, ctot, w, s, info) |
| SLAED3 used by SSTEDC. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is tridiagonal. | |
| subroutine | slaed4 (n, i, d, z, delta, rho, dlam, info) |
| SLAED4 used by SSTEDC. Finds a single root of the secular equation. | |
| subroutine | slaed5 (i, d, z, delta, rho, dlam) |
| SLAED5 used by SSTEDC. Solves the 2-by-2 secular equation. | |
| subroutine | slaed6 (kniter, orgati, rho, d, z, finit, tau, info) |
| SLAED6 used by SSTEDC. Computes one Newton step in solution of the secular equation. | |
| subroutine | slaed7 (icompq, n, qsiz, tlvls, curlvl, curpbm, d, q, ldq, indxq, rho, cutpnt, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, iwork, info) |
| SLAED7 used by SSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is dense. | |
| subroutine | slaed8 (icompq, k, n, qsiz, d, q, ldq, indxq, rho, cutpnt, z, dlamda, q2, ldq2, w, perm, givptr, givcol, givnum, indxp, indx, info) |
| SLAED8 used by SSTEDC. Merges eigenvalues and deflates secular equation. Used when the original matrix is dense. | |
| subroutine | slaed9 (k, kstart, kstop, n, d, q, ldq, rho, dlamda, w, s, lds, info) |
| SLAED9 used by SSTEDC. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is dense. | |
| subroutine | slaeda (n, tlvls, curlvl, curpbm, prmptr, perm, givptr, givcol, givnum, q, qptr, z, ztemp, info) |
| SLAEDA used by SSTEDC. Computes the Z vector determining the rank-one modification of the diagonal matrix. Used when the original matrix is dense. | |
| subroutine | slagtf (n, a, lambda, b, c, tol, d, in, info) |
| SLAGTF computes an LU factorization of a matrix T-λI, where T is a general tridiagonal matrix, and λ a scalar, using partial pivoting with row interchanges. | |
| subroutine | slamrg (n1, n2, a, strd1, strd2, index) |
| SLAMRG creates a permutation list to merge the entries of two independently sorted sets into a single set sorted in ascending order. | |
| subroutine | slartgs (x, y, sigma, cs, sn) |
| SLARTGS generates a plane rotation designed to introduce a bulge in implicit QR iteration for the bidiagonal SVD problem. | |
| subroutine | slasq1 (n, d, e, work, info) |
| SLASQ1 computes the singular values of a real square bidiagonal matrix. Used by sbdsqr. | |
| subroutine | slasq2 (n, z, info) |
| SLASQ2 computes all the eigenvalues of the symmetric positive definite tridiagonal matrix associated with the qd Array Z to high relative accuracy. Used by sbdsqr and sstegr. | |
| subroutine | slasq3 (i0, n0, z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau) |
| SLASQ3 checks for deflation, computes a shift and calls dqds. Used by sbdsqr. | |
| subroutine | slasq4 (i0, n0, z, pp, n0in, dmin, dmin1, dmin2, dn, dn1, dn2, tau, ttype, g) |
| SLASQ4 computes an approximation to the smallest eigenvalue using values of d from the previous transform. Used by sbdsqr. | |
| subroutine | slasq5 (i0, n0, z, pp, tau, sigma, dmin, dmin1, dmin2, dn, dnm1, dnm2, ieee, eps) |
| SLASQ5 computes one dqds transform in ping-pong form. Used by sbdsqr and sstegr. | |
| subroutine | slasq6 (i0, n0, z, pp, dmin, dmin1, dmin2, dn, dnm1, dnm2) |
| SLASQ6 computes one dqd transform in ping-pong form. Used by sbdsqr and sstegr. | |
| subroutine | slasrt (id, n, d, info) |
| SLASRT sorts numbers in increasing or decreasing order. | |
| subroutine | spttrf (n, d, e, info) |
| SPTTRF | |
| subroutine | sstebz (range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info) |
| SSTEBZ | |
| subroutine | sstedc (compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info) |
| SSTEDC | |
| subroutine | ssteqr (compz, n, d, e, z, ldz, work, info) |
| SSTEQR | |
| subroutine | ssterf (n, d, e, info) |
| SSTERF | |
This is the group of auxiliary Computational routines
| program __secondtst_f__ |
| program __slamchtst_f__ |
SLAMCHTST
Definition at line 28 of file slamchtst.f.
| character*1 function chla_transtype | ( | integer | trans | ) |
CHLA_TRANSTYPE
Download CHLA_TRANSTYPE + dependencies [TGZ] [ZIP] [TXT]
!> !> This subroutine translates from a BLAST-specified integer constant to !> the character string specifying a transposition operation. !> !> CHLA_TRANSTYPE returns an CHARACTER*1. If CHLA_TRANSTYPE is 'X', !> then input is not an integer indicating a transposition operator. !> Otherwise CHLA_TRANSTYPE returns the constant value corresponding to !> TRANS. !>
Definition at line 57 of file chla_transtype.f.
| subroutine dbdsdc | ( | character | uplo, |
| character | compq, | ||
| integer | n, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| double precision, dimension( * ) | q, | ||
| integer, dimension( * ) | iq, | ||
| double precision, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
DBDSDC
Download DBDSDC + dependencies [TGZ] [ZIP] [TXT]
!> !> DBDSDC computes the singular value decomposition (SVD) of a real !> N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT, !> using a divide and conquer method, where S is a diagonal matrix !> with non-negative diagonal elements (the singular values of B), and !> U and VT are orthogonal matrices of left and right singular vectors, !> respectively. DBDSDC can be used to compute all singular values, !> and optionally, singular vectors or singular vectors in compact form. !> !> This code makes very mild assumptions about floating point !> arithmetic. It will work on machines with a guard digit in !> add/subtract, or on those binary machines without guard digits !> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. !> It could conceivably fail on hexadecimal or decimal machines !> without guard digits, but we know of none. See DLASD3 for details. !> !> The code currently calls DLASDQ if singular values only are desired. !> However, it can be slightly modified to compute singular values !> using the divide and conquer method. !>
| [in] | UPLO | !> UPLO is CHARACTER*1 !> = 'U': B is upper bidiagonal. !> = 'L': B is lower bidiagonal. !> |
| [in] | COMPQ | !> COMPQ is CHARACTER*1 !> Specifies whether singular vectors are to be computed !> as follows: !> = 'N': Compute singular values only; !> = 'P': Compute singular values and compute singular !> vectors in compact form; !> = 'I': Compute singular values and singular vectors. !> |
| [in] | N | !> N is INTEGER !> The order of the matrix B. N >= 0. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the n diagonal elements of the bidiagonal matrix B. !> On exit, if INFO=0, the singular values of B. !> |
| [in,out] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> On entry, the elements of E contain the offdiagonal !> elements of the bidiagonal matrix whose SVD is desired. !> On exit, E has been destroyed. !> |
| [out] | U | !> U is DOUBLE PRECISION array, dimension (LDU,N) !> If COMPQ = 'I', then: !> On exit, if INFO = 0, U contains the left singular vectors !> of the bidiagonal matrix. !> For other values of COMPQ, U is not referenced. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= 1. !> If singular vectors are desired, then LDU >= max( 1, N ). !> |
| [out] | VT | !> VT is DOUBLE PRECISION array, dimension (LDVT,N) !> If COMPQ = 'I', then: !> On exit, if INFO = 0, VT**T contains the right singular !> vectors of the bidiagonal matrix. !> For other values of COMPQ, VT is not referenced. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. LDVT >= 1. !> If singular vectors are desired, then LDVT >= max( 1, N ). !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ) !> If COMPQ = 'P', then: !> On exit, if INFO = 0, Q and IQ contain the left !> and right singular vectors in a compact form, !> requiring O(N log N) space instead of 2*N**2. !> In particular, Q contains all the DOUBLE PRECISION data in !> LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1)))) !> words of memory, where SMLSIZ is returned by ILAENV and !> is equal to the maximum size of the subproblems at the !> bottom of the computation tree (usually about 25). !> For other values of COMPQ, Q is not referenced. !> |
| [out] | IQ | !> IQ is INTEGER array, dimension (LDIQ) !> If COMPQ = 'P', then: !> On exit, if INFO = 0, Q and IQ contain the left !> and right singular vectors in a compact form, !> requiring O(N log N) space instead of 2*N**2. !> In particular, IQ contains all INTEGER data in !> LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1)))) !> words of memory, where SMLSIZ is returned by ILAENV and !> is equal to the maximum size of the subproblems at the !> bottom of the computation tree (usually about 25). !> For other values of COMPQ, IQ is not referenced. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)) !> If COMPQ = 'N' then LWORK >= (4 * N). !> If COMPQ = 'P' then LWORK >= (6 * N). !> If COMPQ = 'I' then LWORK >= (3 * N**2 + 4 * N). !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (8*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: The algorithm failed to compute a singular value. !> The update process of divide and conquer failed. !> |
Definition at line 203 of file dbdsdc.f.
| subroutine dbdsqr | ( | character | uplo, |
| integer | n, | ||
| integer | ncvt, | ||
| integer | nru, | ||
| integer | ncc, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| double precision, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| double precision, dimension( ldc, * ) | c, | ||
| integer | ldc, | ||
| double precision, dimension( * ) | work, | ||
| integer | info ) |
DBDSQR
Download DBDSQR + dependencies [TGZ] [ZIP] [TXT]
!> !> DBDSQR computes the singular values and, optionally, the right and/or !> left singular vectors from the singular value decomposition (SVD) of !> a real N-by-N (upper or lower) bidiagonal matrix B using the implicit !> zero-shift QR algorithm. The SVD of B has the form !> !> B = Q * S * P**T !> !> where S is the diagonal matrix of singular values, Q is an orthogonal !> matrix of left singular vectors, and P is an orthogonal matrix of !> right singular vectors. If left singular vectors are requested, this !> subroutine actually returns U*Q instead of Q, and, if right singular !> vectors are requested, this subroutine returns P**T*VT instead of !> P**T, for given real input matrices U and VT. When U and VT are the !> orthogonal matrices that reduce a general matrix A to bidiagonal !> form: A = U*B*VT, as computed by DGEBRD, then !> !> A = (U*Q) * S * (P**T*VT) !> !> is the SVD of A. Optionally, the subroutine may also compute Q**T*C !> for a given real input matrix C. !> !> See by J. Demmel and W. Kahan, !> LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11, !> no. 5, pp. 873-912, Sept 1990) and !> by !> B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics !> Department, University of California at Berkeley, July 1992 !> for a detailed description of the algorithm. !>
| [in] | UPLO | !> UPLO is CHARACTER*1 !> = 'U': B is upper bidiagonal; !> = 'L': B is lower bidiagonal. !> |
| [in] | N | !> N is INTEGER !> The order of the matrix B. N >= 0. !> |
| [in] | NCVT | !> NCVT is INTEGER !> The number of columns of the matrix VT. NCVT >= 0. !> |
| [in] | NRU | !> NRU is INTEGER !> The number of rows of the matrix U. NRU >= 0. !> |
| [in] | NCC | !> NCC is INTEGER !> The number of columns of the matrix C. NCC >= 0. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the n diagonal elements of the bidiagonal matrix B. !> On exit, if INFO=0, the singular values of B in decreasing !> order. !> |
| [in,out] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> On entry, the N-1 offdiagonal elements of the bidiagonal !> matrix B. !> On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E !> will contain the diagonal and superdiagonal elements of a !> bidiagonal matrix orthogonally equivalent to the one given !> as input. !> |
| [in,out] | VT | !> VT is DOUBLE PRECISION array, dimension (LDVT, NCVT) !> On entry, an N-by-NCVT matrix VT. !> On exit, VT is overwritten by P**T * VT. !> Not referenced if NCVT = 0. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. !> LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0. !> |
| [in,out] | U | !> U is DOUBLE PRECISION array, dimension (LDU, N) !> On entry, an NRU-by-N matrix U. !> On exit, U is overwritten by U * Q. !> Not referenced if NRU = 0. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,NRU). !> |
| [in,out] | C | !> C is DOUBLE PRECISION array, dimension (LDC, NCC) !> On entry, an N-by-NCC matrix C. !> On exit, C is overwritten by Q**T * C. !> Not referenced if NCC = 0. !> |
| [in] | LDC | !> LDC is INTEGER !> The leading dimension of the array C. !> LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (4*(N-1)) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: If INFO = -i, the i-th argument had an illegal value !> > 0: !> if NCVT = NRU = NCC = 0, !> = 1, a split was marked by a positive value in E !> = 2, current block of Z not diagonalized after 30*N !> iterations (in inner while loop) !> = 3, termination criterion of outer while loop not met !> (program created more than N unreduced blocks) !> else NCVT = NRU = NCC = 0, !> the algorithm did not converge; D and E contain the !> elements of a bidiagonal matrix which is orthogonally !> similar to the input matrix B; if INFO = i, i !> elements of E have not converged to zero. !> |
!> TOLMUL DOUBLE PRECISION, default = max(10,min(100,EPS**(-1/8))) !> TOLMUL controls the convergence criterion of the QR loop. !> If it is positive, TOLMUL*EPS is the desired relative !> precision in the computed singular values. !> If it is negative, abs(TOLMUL*EPS*sigma_max) is the !> desired absolute accuracy in the computed singular !> values (corresponds to relative accuracy !> abs(TOLMUL*EPS) in the largest singular value. !> abs(TOLMUL) should be between 1 and 1/EPS, and preferably !> between 10 (for fast convergence) and .1/EPS !> (for there to be some accuracy in the results). !> Default is to lose at either one eighth or 2 of the !> available decimal digits in each computed singular value !> (whichever is smaller). !> !> MAXITR INTEGER, default = 6 !> MAXITR controls the maximum number of passes of the !> algorithm through its inner loop. The algorithms stops !> (and so fails to converge) if the number of passes !> through the inner loop exceeds MAXITR*N**2. !> !>
!> Bug report from Cezary Dendek. !> On March 23rd 2017, the INTEGER variable MAXIT = MAXITR*N**2 is !> removed since it can overflow pretty easily (for N larger or equal !> than 18,919). We instead use MAXITDIVN = MAXITR*N. !>
Definition at line 239 of file dbdsqr.f.
| subroutine ddisna | ( | character | job, |
| integer | m, | ||
| integer | n, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | sep, | ||
| integer | info ) |
DDISNA
Download DDISNA + dependencies [TGZ] [ZIP] [TXT]
!> !> DDISNA computes the reciprocal condition numbers for the eigenvectors !> of a real symmetric or complex Hermitian matrix or for the left or !> right singular vectors of a general m-by-n matrix. The reciprocal !> condition number is the 'gap' between the corresponding eigenvalue or !> singular value and the nearest other one. !> !> The bound on the error, measured by angle in radians, in the I-th !> computed vector is given by !> !> DLAMCH( 'E' ) * ( ANORM / SEP( I ) ) !> !> where ANORM = 2-norm(A) = max( abs( D(j) ) ). SEP(I) is not allowed !> to be smaller than DLAMCH( 'E' )*ANORM in order to limit the size of !> the error bound. !> !> DDISNA may also be used to compute error bounds for eigenvectors of !> the generalized symmetric definite eigenproblem. !>
| [in] | JOB | !> JOB is CHARACTER*1 !> Specifies for which problem the reciprocal condition numbers !> should be computed: !> = 'E': the eigenvectors of a symmetric/Hermitian matrix; !> = 'L': the left singular vectors of a general matrix; !> = 'R': the right singular vectors of a general matrix. !> |
| [in] | M | !> M is INTEGER !> The number of rows of the matrix. M >= 0. !> |
| [in] | N | !> N is INTEGER !> If JOB = 'L' or 'R', the number of columns of the matrix, !> in which case N >= 0. Ignored if JOB = 'E'. !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (M) if JOB = 'E' !> dimension (min(M,N)) if JOB = 'L' or 'R' !> The eigenvalues (if JOB = 'E') or singular values (if JOB = !> 'L' or 'R') of the matrix, in either increasing or decreasing !> order. If singular values, they must be non-negative. !> |
| [out] | SEP | !> SEP is DOUBLE PRECISION array, dimension (M) if JOB = 'E' !> dimension (min(M,N)) if JOB = 'L' or 'R' !> The reciprocal condition numbers of the vectors. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> |
Definition at line 116 of file ddisna.f.
| subroutine dlaed0 | ( | integer | icompq, |
| integer | qsiz, | ||
| integer | n, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision, dimension( ldqs, * ) | qstore, | ||
| integer | ldqs, | ||
| double precision, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
DLAED0 used by DSTEDC. Computes all eigenvalues and corresponding eigenvectors of an unreduced symmetric tridiagonal matrix using the divide and conquer method.
Download DLAED0 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAED0 computes all eigenvalues and corresponding eigenvectors of a !> symmetric tridiagonal matrix using the divide and conquer method. !>
| [in] | ICOMPQ | !> ICOMPQ is INTEGER !> = 0: Compute eigenvalues only. !> = 1: Compute eigenvectors of original dense symmetric matrix !> also. On entry, Q contains the orthogonal matrix used !> to reduce the original matrix to tridiagonal form. !> = 2: Compute eigenvalues and eigenvectors of tridiagonal !> matrix. !> |
| [in] | QSIZ | !> QSIZ is INTEGER !> The dimension of the orthogonal matrix used to reduce !> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the main diagonal of the tridiagonal matrix. !> On exit, its eigenvalues. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> The off-diagonal elements of the tridiagonal matrix. !> On exit, E has been destroyed. !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ, N) !> On entry, Q must contain an N-by-N orthogonal matrix. !> If ICOMPQ = 0 Q is not referenced. !> If ICOMPQ = 1 On entry, Q is a subset of the columns of the !> orthogonal matrix used to reduce the full !> matrix to tridiagonal form corresponding to !> the subset of the full matrix which is being !> decomposed at this time. !> If ICOMPQ = 2 On entry, Q will be the identity matrix. !> On exit, Q contains the eigenvectors of the !> tridiagonal matrix. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. If eigenvectors are !> desired, then LDQ >= max(1,N). In any case, LDQ >= 1. !> |
| [out] | QSTORE | !> QSTORE is DOUBLE PRECISION array, dimension (LDQS, N) !> Referenced only when ICOMPQ = 1. Used to store parts of !> the eigenvector matrix when the updating matrix multiplies !> take place. !> |
| [in] | LDQS | !> LDQS is INTEGER !> The leading dimension of the array QSTORE. If ICOMPQ = 1, !> then LDQS >= max(1,N). In any case, LDQS >= 1. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, !> If ICOMPQ = 0 or 1, the dimension of WORK must be at least !> 1 + 3*N + 2*N*lg N + 3*N**2 !> ( lg( N ) = smallest integer k !> such that 2^k >= N ) !> If ICOMPQ = 2, the dimension of WORK must be at least !> 4*N + N**2. !> |
| [out] | IWORK | !> IWORK is INTEGER array, !> If ICOMPQ = 0 or 1, the dimension of IWORK must be at least !> 6 + 6*N + 5*N*lg N. !> ( lg( N ) = smallest integer k !> such that 2^k >= N ) !> If ICOMPQ = 2, the dimension of IWORK must be at least !> 3 + 5*N. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: The algorithm failed to compute an eigenvalue while !> working on the submatrix lying in rows and columns !> INFO/(N+1) through mod(INFO,N+1). !> |
Definition at line 170 of file dlaed0.f.
| subroutine dlaed1 | ( | integer | n, |
| double precision, dimension( * ) | d, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| integer, dimension( * ) | indxq, | ||
| double precision | rho, | ||
| integer | cutpnt, | ||
| double precision, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
DLAED1 used by DSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is tridiagonal.
Download DLAED1 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAED1 computes the updated eigensystem of a diagonal !> matrix after modification by a rank-one symmetric matrix. This !> routine is used only for the eigenproblem which requires all !> eigenvalues and eigenvectors of a tridiagonal matrix. DLAED7 handles !> the case in which eigenvalues only or eigenvalues and eigenvectors !> of a full symmetric matrix (which was reduced to tridiagonal form) !> are desired. !> !> T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out) !> !> where Z = Q**T*u, u is a vector of length N with ones in the !> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere. !> !> The eigenvectors of the original matrix are stored in Q, and the !> eigenvalues are in D. The algorithm consists of three stages: !> !> The first stage consists of deflating the size of the problem !> when there are multiple eigenvalues or if there is a zero in !> the Z vector. For each such occurrence the dimension of the !> secular equation problem is reduced by one. This stage is !> performed by the routine DLAED2. !> !> The second stage consists of calculating the updated !> eigenvalues. This is done by finding the roots of the secular !> equation via the routine DLAED4 (as called by DLAED3). !> This routine also calculates the eigenvectors of the current !> problem. !> !> The final stage consists of computing the updated eigenvectors !> directly using the updated eigenvalues. The eigenvectors for !> the current problem are multiplied with the eigenvectors from !> the overall problem. !>
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the eigenvalues of the rank-1-perturbed matrix. !> On exit, the eigenvalues of the repaired matrix. !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ,N) !> On entry, the eigenvectors of the rank-1-perturbed matrix. !> On exit, the eigenvectors of the repaired tridiagonal matrix. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [in,out] | INDXQ | !> INDXQ is INTEGER array, dimension (N) !> On entry, the permutation which separately sorts the two !> subproblems in D into ascending order. !> On exit, the permutation which will reintegrate the !> subproblems back into sorted order, !> i.e. D( INDXQ( I = 1, N ) ) will be in ascending order. !> |
| [in] | RHO | !> RHO is DOUBLE PRECISION !> The subdiagonal entry used to create the rank-1 modification. !> |
| [in] | CUTPNT | !> CUTPNT is INTEGER !> The location of the last eigenvalue in the leading sub-matrix. !> min(1,N) <= CUTPNT <= N/2. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (4*N + N**2) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (4*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: if INFO = 1, an eigenvalue did not converge !> |
Definition at line 161 of file dlaed1.f.
| subroutine dlaed2 | ( | integer | k, |
| integer | n, | ||
| integer | n1, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| integer, dimension( * ) | indxq, | ||
| double precision | rho, | ||
| double precision, dimension( * ) | z, | ||
| double precision, dimension( * ) | dlamda, | ||
| double precision, dimension( * ) | w, | ||
| double precision, dimension( * ) | q2, | ||
| integer, dimension( * ) | indx, | ||
| integer, dimension( * ) | indxc, | ||
| integer, dimension( * ) | indxp, | ||
| integer, dimension( * ) | coltyp, | ||
| integer | info ) |
DLAED2 used by DSTEDC. Merges eigenvalues and deflates secular equation. Used when the original matrix is tridiagonal.
Download DLAED2 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAED2 merges the two sets of eigenvalues together into a single !> sorted set. Then it tries to deflate the size of the problem. !> There are two ways in which deflation can occur: when two or more !> eigenvalues are close together or if there is a tiny entry in the !> Z vector. For each such occurrence the order of the related secular !> equation problem is reduced by one. !>
| [out] | K | !> K is INTEGER !> The number of non-deflated eigenvalues, and the order of the !> related secular equation. 0 <= K <=N. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in] | N1 | !> N1 is INTEGER !> The location of the last eigenvalue in the leading sub-matrix. !> min(1,N) <= N1 <= N/2. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, D contains the eigenvalues of the two submatrices to !> be combined. !> On exit, D contains the trailing (N-K) updated eigenvalues !> (those which were deflated) sorted into increasing order. !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ, N) !> On entry, Q contains the eigenvectors of two submatrices in !> the two square blocks with corners at (1,1), (N1,N1) !> and (N1+1, N1+1), (N,N). !> On exit, Q contains the trailing (N-K) updated eigenvectors !> (those which were deflated) in its last N-K columns. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [in,out] | INDXQ | !> INDXQ is INTEGER array, dimension (N) !> The permutation which separately sorts the two sub-problems !> in D into ascending order. Note that elements in the second !> half of this permutation must first have N1 added to their !> values. Destroyed on exit. !> |
| [in,out] | RHO | !> RHO is DOUBLE PRECISION !> On entry, the off-diagonal element associated with the rank-1 !> cut which originally split the two submatrices which are now !> being recombined. !> On exit, RHO has been modified to the value required by !> DLAED3. !> |
| [in] | Z | !> Z is DOUBLE PRECISION array, dimension (N) !> On entry, Z contains the updating vector (the last !> row of the first sub-eigenvector matrix and the first row of !> the second sub-eigenvector matrix). !> On exit, the contents of Z have been destroyed by the updating !> process. !> |
| [out] | DLAMDA | !> DLAMDA is DOUBLE PRECISION array, dimension (N) !> A copy of the first K eigenvalues which will be used by !> DLAED3 to form the secular equation. !> |
| [out] | W | !> W is DOUBLE PRECISION array, dimension (N) !> The first k values of the final deflation-altered z-vector !> which will be passed to DLAED3. !> |
| [out] | Q2 | !> Q2 is DOUBLE PRECISION array, dimension (N1**2+(N-N1)**2) !> A copy of the first K eigenvectors which will be used by !> DLAED3 in a matrix multiply (DGEMM) to solve for the new !> eigenvectors. !> |
| [out] | INDX | !> INDX is INTEGER array, dimension (N) !> The permutation used to sort the contents of DLAMDA into !> ascending order. !> |
| [out] | INDXC | !> INDXC is INTEGER array, dimension (N) !> The permutation used to arrange the columns of the deflated !> Q matrix into three groups: the first group contains non-zero !> elements only at and above N1, the second contains !> non-zero elements only below N1, and the third is dense. !> |
| [out] | INDXP | !> INDXP is INTEGER array, dimension (N) !> The permutation used to place deflated values of D at the end !> of the array. INDXP(1:K) points to the nondeflated D-values !> and INDXP(K+1:N) points to the deflated eigenvalues. !> |
| [out] | COLTYP | !> COLTYP is INTEGER array, dimension (N) !> During execution, a label which will indicate which of the !> following types a column in the Q2 matrix is: !> 1 : non-zero in the upper half only; !> 2 : dense; !> 3 : non-zero in the lower half only; !> 4 : deflated. !> On exit, COLTYP(i) is the number of columns of type i, !> for i=1 to 4 only. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> |
Definition at line 210 of file dlaed2.f.
| subroutine dlaed3 | ( | integer | k, |
| integer | n, | ||
| integer | n1, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision | rho, | ||
| double precision, dimension( * ) | dlamda, | ||
| double precision, dimension( * ) | q2, | ||
| integer, dimension( * ) | indx, | ||
| integer, dimension( * ) | ctot, | ||
| double precision, dimension( * ) | w, | ||
| double precision, dimension( * ) | s, | ||
| integer | info ) |
DLAED3 used by DSTEDC. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is tridiagonal.
Download DLAED3 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAED3 finds the roots of the secular equation, as defined by the !> values in D, W, and RHO, between 1 and K. It makes the !> appropriate calls to DLAED4 and then updates the eigenvectors by !> multiplying the matrix of eigenvectors of the pair of eigensystems !> being combined by the matrix of eigenvectors of the K-by-K system !> which is solved here. !> !> This code makes very mild assumptions about floating point !> arithmetic. It will work on machines with a guard digit in !> add/subtract, or on those binary machines without guard digits !> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. !> It could conceivably fail on hexadecimal or decimal machines !> without guard digits, but we know of none. !>
| [in] | K | !> K is INTEGER !> The number of terms in the rational function to be solved by !> DLAED4. K >= 0. !> |
| [in] | N | !> N is INTEGER !> The number of rows and columns in the Q matrix. !> N >= K (deflation may result in N>K). !> |
| [in] | N1 | !> N1 is INTEGER !> The location of the last eigenvalue in the leading submatrix. !> min(1,N) <= N1 <= N/2. !> |
| [out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> D(I) contains the updated eigenvalues for !> 1 <= I <= K. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ,N) !> Initially the first K columns are used as workspace. !> On output the columns 1 to K contain !> the updated eigenvectors. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [in] | RHO | !> RHO is DOUBLE PRECISION !> The value of the parameter in the rank one update equation. !> RHO >= 0 required. !> |
| [in,out] | DLAMDA | !> DLAMDA is DOUBLE PRECISION array, dimension (K) !> The first K elements of this array contain the old roots !> of the deflated updating problem. These are the poles !> of the secular equation. May be changed on output by !> having lowest order bit set to zero on Cray X-MP, Cray Y-MP, !> Cray-2, or Cray C-90, as described above. !> |
| [in] | Q2 | !> Q2 is DOUBLE PRECISION array, dimension (LDQ2*N) !> The first K columns of this matrix contain the non-deflated !> eigenvectors for the split problem. !> |
| [in] | INDX | !> INDX is INTEGER array, dimension (N) !> The permutation used to arrange the columns of the deflated !> Q matrix into three groups (see DLAED2). !> The rows of the eigenvectors found by DLAED4 must be likewise !> permuted before the matrix multiply can take place. !> |
| [in] | CTOT | !> CTOT is INTEGER array, dimension (4) !> A count of the total number of the various types of columns !> in Q, as described in INDX. The fourth column type is any !> column which has been deflated. !> |
| [in,out] | W | !> W is DOUBLE PRECISION array, dimension (K) !> The first K elements of this array contain the components !> of the deflation-adjusted updating vector. Destroyed on !> output. !> |
| [out] | S | !> S is DOUBLE PRECISION array, dimension (N1 + 1)*K !> Will contain the eigenvectors of the repaired matrix which !> will be multiplied by the previously accumulated eigenvectors !> to update the system. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: if INFO = 1, an eigenvalue did not converge !> |
Definition at line 183 of file dlaed3.f.
| subroutine dlaed4 | ( | integer | n, |
| integer | i, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | z, | ||
| double precision, dimension( * ) | delta, | ||
| double precision | rho, | ||
| double precision | dlam, | ||
| integer | info ) |
DLAED4 used by DSTEDC. Finds a single root of the secular equation.
Download DLAED4 + dependencies [TGZ] [ZIP] [TXT]
!> !> This subroutine computes the I-th updated eigenvalue of a symmetric !> rank-one modification to a diagonal matrix whose elements are !> given in the array d, and that !> !> D(i) < D(j) for i < j !> !> and that RHO > 0. This is arranged by the calling routine, and is !> no loss in generality. The rank-one modified system is thus !> !> diag( D ) + RHO * Z * Z_transpose. !> !> where we assume the Euclidean norm of Z is 1. !> !> The method consists of approximating the rational functions in the !> secular equation by simpler interpolating rational functions. !>
| [in] | N | !> N is INTEGER !> The length of all arrays. !> |
| [in] | I | !> I is INTEGER !> The index of the eigenvalue to be computed. 1 <= I <= N. !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (N) !> The original eigenvalues. It is assumed that they are in !> order, D(I) < D(J) for I < J. !> |
| [in] | Z | !> Z is DOUBLE PRECISION array, dimension (N) !> The components of the updating vector. !> |
| [out] | DELTA | !> DELTA is DOUBLE PRECISION array, dimension (N) !> If N > 2, DELTA contains (D(j) - lambda_I) in its j-th !> component. If N = 1, then DELTA(1) = 1. If N = 2, see DLAED5 !> for detail. The vector DELTA contains the information necessary !> to construct the eigenvectors by DLAED3 and DLAED9. !> |
| [in] | RHO | !> RHO is DOUBLE PRECISION !> The scalar in the symmetric updating formula. !> |
| [out] | DLAM | !> DLAM is DOUBLE PRECISION !> The computed lambda_I, the I-th updated eigenvalue. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> > 0: if INFO = 1, the updating process failed. !> |
!> Logical variable ORGATI (origin-at-i?) is used for distinguishing !> whether D(i) or D(i+1) is treated as the origin. !> !> ORGATI = .true. origin at i !> ORGATI = .false. origin at i+1 !> !> Logical variable SWTCH3 (switch-for-3-poles?) is for noting !> if we are working with THREE poles! !> !> MAXIT is the maximum number of iterations allowed for each !> eigenvalue. !>
Definition at line 144 of file dlaed4.f.
| subroutine dlaed5 | ( | integer | i, |
| double precision, dimension( 2 ) | d, | ||
| double precision, dimension( 2 ) | z, | ||
| double precision, dimension( 2 ) | delta, | ||
| double precision | rho, | ||
| double precision | dlam ) |
DLAED5 used by DSTEDC. Solves the 2-by-2 secular equation.
Download DLAED5 + dependencies [TGZ] [ZIP] [TXT]
!> !> This subroutine computes the I-th eigenvalue of a symmetric rank-one !> modification of a 2-by-2 diagonal matrix !> !> diag( D ) + RHO * Z * transpose(Z) . !> !> The diagonal elements in the array D are assumed to satisfy !> !> D(i) < D(j) for i < j . !> !> We also assume RHO > 0 and that the Euclidean norm of the vector !> Z is one. !>
| [in] | I | !> I is INTEGER !> The index of the eigenvalue to be computed. I = 1 or I = 2. !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (2) !> The original eigenvalues. We assume D(1) < D(2). !> |
| [in] | Z | !> Z is DOUBLE PRECISION array, dimension (2) !> The components of the updating vector. !> |
| [out] | DELTA | !> DELTA is DOUBLE PRECISION array, dimension (2) !> The vector DELTA contains the information necessary !> to construct the eigenvectors. !> |
| [in] | RHO | !> RHO is DOUBLE PRECISION !> The scalar in the symmetric updating formula. !> |
| [out] | DLAM | !> DLAM is DOUBLE PRECISION !> The computed lambda_I, the I-th updated eigenvalue. !> |
Definition at line 107 of file dlaed5.f.
| subroutine dlaed6 | ( | integer | kniter, |
| logical | orgati, | ||
| double precision | rho, | ||
| double precision, dimension( 3 ) | d, | ||
| double precision, dimension( 3 ) | z, | ||
| double precision | finit, | ||
| double precision | tau, | ||
| integer | info ) |
DLAED6 used by DSTEDC. Computes one Newton step in solution of the secular equation.
Download DLAED6 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAED6 computes the positive or negative root (closest to the origin) !> of !> z(1) z(2) z(3) !> f(x) = rho + --------- + ---------- + --------- !> d(1)-x d(2)-x d(3)-x !> !> It is assumed that !> !> if ORGATI = .true. the root is between d(2) and d(3); !> otherwise it is between d(1) and d(2) !> !> This routine will be called by DLAED4 when necessary. In most cases, !> the root sought is the smallest in magnitude, though it might not be !> in some extremely rare situations. !>
| [in] | KNITER | !> KNITER is INTEGER !> Refer to DLAED4 for its significance. !> |
| [in] | ORGATI | !> ORGATI is LOGICAL !> If ORGATI is true, the needed root is between d(2) and !> d(3); otherwise it is between d(1) and d(2). See !> DLAED4 for further details. !> |
| [in] | RHO | !> RHO is DOUBLE PRECISION !> Refer to the equation f(x) above. !> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (3) !> D satisfies d(1) < d(2) < d(3). !> |
| [in] | Z | !> Z is DOUBLE PRECISION array, dimension (3) !> Each of the elements in z must be positive. !> |
| [in] | FINIT | !> FINIT is DOUBLE PRECISION !> The value of f at 0. It is more accurate than the one !> evaluated inside this routine (if someone wants to do !> so). !> |
| [out] | TAU | !> TAU is DOUBLE PRECISION !> The root of the equation f(x). !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> > 0: if INFO = 1, failure to converge !> |
!> !> 10/02/03: This version has a few statements commented out for thread !> safety (machine parameters are computed on each entry). SJH. !> !> 05/10/06: Modified from a new version of Ren-Cang Li, use !> Gragg-Thornton-Warner cubic convergent scheme for better stability. !>
Definition at line 139 of file dlaed6.f.
| subroutine dlaed7 | ( | integer | icompq, |
| integer | n, | ||
| integer | qsiz, | ||
| integer | tlvls, | ||
| integer | curlvl, | ||
| integer | curpbm, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| integer, dimension( * ) | indxq, | ||
| double precision | rho, | ||
| integer | cutpnt, | ||
| double precision, dimension( * ) | qstore, | ||
| integer, dimension( * ) | qptr, | ||
| integer, dimension( * ) | prmptr, | ||
| integer, dimension( * ) | perm, | ||
| integer, dimension( * ) | givptr, | ||
| integer, dimension( 2, * ) | givcol, | ||
| double precision, dimension( 2, * ) | givnum, | ||
| double precision, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
DLAED7 used by DSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is dense.
Download DLAED7 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAED7 computes the updated eigensystem of a diagonal !> matrix after modification by a rank-one symmetric matrix. This !> routine is used only for the eigenproblem which requires all !> eigenvalues and optionally eigenvectors of a dense symmetric matrix !> that has been reduced to tridiagonal form. DLAED1 handles !> the case in which all eigenvalues and eigenvectors of a symmetric !> tridiagonal matrix are desired. !> !> T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out) !> !> where Z = Q**Tu, u is a vector of length N with ones in the !> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere. !> !> The eigenvectors of the original matrix are stored in Q, and the !> eigenvalues are in D. The algorithm consists of three stages: !> !> The first stage consists of deflating the size of the problem !> when there are multiple eigenvalues or if there is a zero in !> the Z vector. For each such occurrence the dimension of the !> secular equation problem is reduced by one. This stage is !> performed by the routine DLAED8. !> !> The second stage consists of calculating the updated !> eigenvalues. This is done by finding the roots of the secular !> equation via the routine DLAED4 (as called by DLAED9). !> This routine also calculates the eigenvectors of the current !> problem. !> !> The final stage consists of computing the updated eigenvectors !> directly using the updated eigenvalues. The eigenvectors for !> the current problem are multiplied with the eigenvectors from !> the overall problem. !>
| [in] | ICOMPQ | !> ICOMPQ is INTEGER !> = 0: Compute eigenvalues only. !> = 1: Compute eigenvectors of original dense symmetric matrix !> also. On entry, Q contains the orthogonal matrix used !> to reduce the original matrix to tridiagonal form. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in] | QSIZ | !> QSIZ is INTEGER !> The dimension of the orthogonal matrix used to reduce !> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1. !> |
| [in] | TLVLS | !> TLVLS is INTEGER !> The total number of merging levels in the overall divide and !> conquer tree. !> |
| [in] | CURLVL | !> CURLVL is INTEGER !> The current level in the overall merge routine, !> 0 <= CURLVL <= TLVLS. !> |
| [in] | CURPBM | !> CURPBM is INTEGER !> The current problem in the current level in the overall !> merge routine (counting from upper left to lower right). !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the eigenvalues of the rank-1-perturbed matrix. !> On exit, the eigenvalues of the repaired matrix. !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ, N) !> On entry, the eigenvectors of the rank-1-perturbed matrix. !> On exit, the eigenvectors of the repaired tridiagonal matrix. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [out] | INDXQ | !> INDXQ is INTEGER array, dimension (N) !> The permutation which will reintegrate the subproblem just !> solved back into sorted order, i.e., D( INDXQ( I = 1, N ) ) !> will be in ascending order. !> |
| [in] | RHO | !> RHO is DOUBLE PRECISION !> The subdiagonal element used to create the rank-1 !> modification. !> |
| [in] | CUTPNT | !> CUTPNT is INTEGER !> Contains the location of the last eigenvalue in the leading !> sub-matrix. min(1,N) <= CUTPNT <= N. !> |
| [in,out] | QSTORE | !> QSTORE is DOUBLE PRECISION array, dimension (N**2+1) !> Stores eigenvectors of submatrices encountered during !> divide and conquer, packed together. QPTR points to !> beginning of the submatrices. !> |
| [in,out] | QPTR | !> QPTR is INTEGER array, dimension (N+2) !> List of indices pointing to beginning of submatrices stored !> in QSTORE. The submatrices are numbered starting at the !> bottom left of the divide and conquer tree, from left to !> right and bottom to top. !> |
| [in] | PRMPTR | !> PRMPTR is INTEGER array, dimension (N lg N) !> Contains a list of pointers which indicate where in PERM a !> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i) !> indicates the size of the permutation and also the size of !> the full, non-deflated problem. !> |
| [in] | PERM | !> PERM is INTEGER array, dimension (N lg N) !> Contains the permutations (from deflation and sorting) to be !> applied to each eigenblock. !> |
| [in] | GIVPTR | !> GIVPTR is INTEGER array, dimension (N lg N) !> Contains a list of pointers which indicate where in GIVCOL a !> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i) !> indicates the number of Givens rotations. !> |
| [in] | GIVCOL | !> GIVCOL is INTEGER array, dimension (2, N lg N) !> Each pair of numbers indicates a pair of columns to take place !> in a Givens rotation. !> |
| [in] | GIVNUM | !> GIVNUM is DOUBLE PRECISION array, dimension (2, N lg N) !> Each number indicates the S value to be used in the !> corresponding Givens rotation. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (3*N+2*QSIZ*N) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (4*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: if INFO = 1, an eigenvalue did not converge !> |
Definition at line 256 of file dlaed7.f.
| subroutine dlaed8 | ( | integer | icompq, |
| integer | k, | ||
| integer | n, | ||
| integer | qsiz, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| integer, dimension( * ) | indxq, | ||
| double precision | rho, | ||
| integer | cutpnt, | ||
| double precision, dimension( * ) | z, | ||
| double precision, dimension( * ) | dlamda, | ||
| double precision, dimension( ldq2, * ) | q2, | ||
| integer | ldq2, | ||
| double precision, dimension( * ) | w, | ||
| integer, dimension( * ) | perm, | ||
| integer | givptr, | ||
| integer, dimension( 2, * ) | givcol, | ||
| double precision, dimension( 2, * ) | givnum, | ||
| integer, dimension( * ) | indxp, | ||
| integer, dimension( * ) | indx, | ||
| integer | info ) |
DLAED8 used by DSTEDC. Merges eigenvalues and deflates secular equation. Used when the original matrix is dense.
Download DLAED8 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAED8 merges the two sets of eigenvalues together into a single !> sorted set. Then it tries to deflate the size of the problem. !> There are two ways in which deflation can occur: when two or more !> eigenvalues are close together or if there is a tiny element in the !> Z vector. For each such occurrence the order of the related secular !> equation problem is reduced by one. !>
| [in] | ICOMPQ | !> ICOMPQ is INTEGER !> = 0: Compute eigenvalues only. !> = 1: Compute eigenvectors of original dense symmetric matrix !> also. On entry, Q contains the orthogonal matrix used !> to reduce the original matrix to tridiagonal form. !> |
| [out] | K | !> K is INTEGER !> The number of non-deflated eigenvalues, and the order of the !> related secular equation. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in] | QSIZ | !> QSIZ is INTEGER !> The dimension of the orthogonal matrix used to reduce !> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the eigenvalues of the two submatrices to be !> combined. On exit, the trailing (N-K) updated eigenvalues !> (those which were deflated) sorted into increasing order. !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ,N) !> If ICOMPQ = 0, Q is not referenced. Otherwise, !> on entry, Q contains the eigenvectors of the partially solved !> system which has been previously updated in matrix !> multiplies with other partially solved eigensystems. !> On exit, Q contains the trailing (N-K) updated eigenvectors !> (those which were deflated) in its last N-K columns. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [in] | INDXQ | !> INDXQ is INTEGER array, dimension (N) !> The permutation which separately sorts the two sub-problems !> in D into ascending order. Note that elements in the second !> half of this permutation must first have CUTPNT added to !> their values in order to be accurate. !> |
| [in,out] | RHO | !> RHO is DOUBLE PRECISION !> On entry, the off-diagonal element associated with the rank-1 !> cut which originally split the two submatrices which are now !> being recombined. !> On exit, RHO has been modified to the value required by !> DLAED3. !> |
| [in] | CUTPNT | !> CUTPNT is INTEGER !> The location of the last eigenvalue in the leading !> sub-matrix. min(1,N) <= CUTPNT <= N. !> |
| [in] | Z | !> Z is DOUBLE PRECISION array, dimension (N) !> On entry, Z contains the updating vector (the last row of !> the first sub-eigenvector matrix and the first row of the !> second sub-eigenvector matrix). !> On exit, the contents of Z are destroyed by the updating !> process. !> |
| [out] | DLAMDA | !> DLAMDA is DOUBLE PRECISION array, dimension (N) !> A copy of the first K eigenvalues which will be used by !> DLAED3 to form the secular equation. !> |
| [out] | Q2 | !> Q2 is DOUBLE PRECISION array, dimension (LDQ2,N) !> If ICOMPQ = 0, Q2 is not referenced. Otherwise, !> a copy of the first K eigenvectors which will be used by !> DLAED7 in a matrix multiply (DGEMM) to update the new !> eigenvectors. !> |
| [in] | LDQ2 | !> LDQ2 is INTEGER !> The leading dimension of the array Q2. LDQ2 >= max(1,N). !> |
| [out] | W | !> W is DOUBLE PRECISION array, dimension (N) !> The first k values of the final deflation-altered z-vector and !> will be passed to DLAED3. !> |
| [out] | PERM | !> PERM is INTEGER array, dimension (N) !> The permutations (from deflation and sorting) to be applied !> to each eigenblock. !> |
| [out] | GIVPTR | !> GIVPTR is INTEGER !> The number of Givens rotations which took place in this !> subproblem. !> |
| [out] | GIVCOL | !> GIVCOL is INTEGER array, dimension (2, N) !> Each pair of numbers indicates a pair of columns to take place !> in a Givens rotation. !> |
| [out] | GIVNUM | !> GIVNUM is DOUBLE PRECISION array, dimension (2, N) !> Each number indicates the S value to be used in the !> corresponding Givens rotation. !> |
| [out] | INDXP | !> INDXP is INTEGER array, dimension (N) !> The permutation used to place deflated values of D at the end !> of the array. INDXP(1:K) points to the nondeflated D-values !> and INDXP(K+1:N) points to the deflated eigenvalues. !> |
| [out] | INDX | !> INDX is INTEGER array, dimension (N) !> The permutation used to sort the contents of D into ascending !> order. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> |
Definition at line 240 of file dlaed8.f.
| subroutine dlaed9 | ( | integer | k, |
| integer | kstart, | ||
| integer | kstop, | ||
| integer | n, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| double precision | rho, | ||
| double precision, dimension( * ) | dlamda, | ||
| double precision, dimension( * ) | w, | ||
| double precision, dimension( lds, * ) | s, | ||
| integer | lds, | ||
| integer | info ) |
DLAED9 used by DSTEDC. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is dense.
Download DLAED9 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAED9 finds the roots of the secular equation, as defined by the !> values in D, Z, and RHO, between KSTART and KSTOP. It makes the !> appropriate calls to DLAED4 and then stores the new matrix of !> eigenvectors for use in calculating the next level of Z vectors. !>
| [in] | K | !> K is INTEGER !> The number of terms in the rational function to be solved by !> DLAED4. K >= 0. !> |
| [in] | KSTART | !> KSTART is INTEGER !> |
| [in] | KSTOP | !> KSTOP is INTEGER !> The updated eigenvalues Lambda(I), KSTART <= I <= KSTOP !> are to be computed. 1 <= KSTART <= KSTOP <= K. !> |
| [in] | N | !> N is INTEGER !> The number of rows and columns in the Q matrix. !> N >= K (delation may result in N > K). !> |
| [out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> D(I) contains the updated eigenvalues !> for KSTART <= I <= KSTOP. !> |
| [out] | Q | !> Q is DOUBLE PRECISION array, dimension (LDQ,N) !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max( 1, N ). !> |
| [in] | RHO | !> RHO is DOUBLE PRECISION !> The value of the parameter in the rank one update equation. !> RHO >= 0 required. !> |
| [in] | DLAMDA | !> DLAMDA is DOUBLE PRECISION array, dimension (K) !> The first K elements of this array contain the old roots !> of the deflated updating problem. These are the poles !> of the secular equation. !> |
| [in] | W | !> W is DOUBLE PRECISION array, dimension (K) !> The first K elements of this array contain the components !> of the deflation-adjusted updating vector. !> |
| [out] | S | !> S is DOUBLE PRECISION array, dimension (LDS, K) !> Will contain the eigenvectors of the repaired matrix which !> will be stored for subsequent Z vector calculation and !> multiplied by the previously accumulated eigenvectors !> to update the system. !> |
| [in] | LDS | !> LDS is INTEGER !> The leading dimension of S. LDS >= max( 1, K ). !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: if INFO = 1, an eigenvalue did not converge !> |
Definition at line 154 of file dlaed9.f.
| subroutine dlaeda | ( | integer | n, |
| integer | tlvls, | ||
| integer | curlvl, | ||
| integer | curpbm, | ||
| integer, dimension( * ) | prmptr, | ||
| integer, dimension( * ) | perm, | ||
| integer, dimension( * ) | givptr, | ||
| integer, dimension( 2, * ) | givcol, | ||
| double precision, dimension( 2, * ) | givnum, | ||
| double precision, dimension( * ) | q, | ||
| integer, dimension( * ) | qptr, | ||
| double precision, dimension( * ) | z, | ||
| double precision, dimension( * ) | ztemp, | ||
| integer | info ) |
DLAEDA used by DSTEDC. Computes the Z vector determining the rank-one modification of the diagonal matrix. Used when the original matrix is dense.
Download DLAEDA + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAEDA computes the Z vector corresponding to the merge step in the !> CURLVLth step of the merge process with TLVLS steps for the CURPBMth !> problem. !>
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in] | TLVLS | !> TLVLS is INTEGER !> The total number of merging levels in the overall divide and !> conquer tree. !> |
| [in] | CURLVL | !> CURLVL is INTEGER !> The current level in the overall merge routine, !> 0 <= curlvl <= tlvls. !> |
| [in] | CURPBM | !> CURPBM is INTEGER !> The current problem in the current level in the overall !> merge routine (counting from upper left to lower right). !> |
| [in] | PRMPTR | !> PRMPTR is INTEGER array, dimension (N lg N) !> Contains a list of pointers which indicate where in PERM a !> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i) !> indicates the size of the permutation and incidentally the !> size of the full, non-deflated problem. !> |
| [in] | PERM | !> PERM is INTEGER array, dimension (N lg N) !> Contains the permutations (from deflation and sorting) to be !> applied to each eigenblock. !> |
| [in] | GIVPTR | !> GIVPTR is INTEGER array, dimension (N lg N) !> Contains a list of pointers which indicate where in GIVCOL a !> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i) !> indicates the number of Givens rotations. !> |
| [in] | GIVCOL | !> GIVCOL is INTEGER array, dimension (2, N lg N) !> Each pair of numbers indicates a pair of columns to take place !> in a Givens rotation. !> |
| [in] | GIVNUM | !> GIVNUM is DOUBLE PRECISION array, dimension (2, N lg N) !> Each number indicates the S value to be used in the !> corresponding Givens rotation. !> |
| [in] | Q | !> Q is DOUBLE PRECISION array, dimension (N**2) !> Contains the square eigenblocks from previous levels, the !> starting positions for blocks are given by QPTR. !> |
| [in] | QPTR | !> QPTR is INTEGER array, dimension (N+2) !> Contains a list of pointers which indicate where in Q an !> eigenblock is stored. SQRT( QPTR(i+1) - QPTR(i) ) indicates !> the size of the block. !> |
| [out] | Z | !> Z is DOUBLE PRECISION array, dimension (N) !> On output this vector contains the updating vector (the last !> row of the first sub-eigenvector matrix and the first row of !> the second sub-eigenvector matrix). !> |
| [out] | ZTEMP | !> ZTEMP is DOUBLE PRECISION array, dimension (N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> |
Definition at line 164 of file dlaeda.f.
| subroutine dlagtf | ( | integer | n, |
| double precision, dimension( * ) | a, | ||
| double precision | lambda, | ||
| double precision, dimension( * ) | b, | ||
| double precision, dimension( * ) | c, | ||
| double precision | tol, | ||
| double precision, dimension( * ) | d, | ||
| integer, dimension( * ) | in, | ||
| integer | info ) |
DLAGTF computes an LU factorization of a matrix T-λI, where T is a general tridiagonal matrix, and λ a scalar, using partial pivoting with row interchanges.
Download DLAGTF + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAGTF factorizes the matrix (T - lambda*I), where T is an n by n !> tridiagonal matrix and lambda is a scalar, as !> !> T - lambda*I = PLU, !> !> where P is a permutation matrix, L is a unit lower tridiagonal matrix !> with at most one non-zero sub-diagonal elements per column and U is !> an upper triangular matrix with at most two non-zero super-diagonal !> elements per column. !> !> The factorization is obtained by Gaussian elimination with partial !> pivoting and implicit row scaling. !> !> The parameter LAMBDA is included in the routine so that DLAGTF may !> be used, in conjunction with DLAGTS, to obtain eigenvectors of T by !> inverse iteration. !>
| [in] | N | !> N is INTEGER !> The order of the matrix T. !> |
| [in,out] | A | !> A is DOUBLE PRECISION array, dimension (N) !> On entry, A must contain the diagonal elements of T. !> !> On exit, A is overwritten by the n diagonal elements of the !> upper triangular matrix U of the factorization of T. !> |
| [in] | LAMBDA | !> LAMBDA is DOUBLE PRECISION !> On entry, the scalar lambda. !> |
| [in,out] | B | !> B is DOUBLE PRECISION array, dimension (N-1) !> On entry, B must contain the (n-1) super-diagonal elements of !> T. !> !> On exit, B is overwritten by the (n-1) super-diagonal !> elements of the matrix U of the factorization of T. !> |
| [in,out] | C | !> C is DOUBLE PRECISION array, dimension (N-1) !> On entry, C must contain the (n-1) sub-diagonal elements of !> T. !> !> On exit, C is overwritten by the (n-1) sub-diagonal elements !> of the matrix L of the factorization of T. !> |
| [in] | TOL | !> TOL is DOUBLE PRECISION !> On entry, a relative tolerance used to indicate whether or !> not the matrix (T - lambda*I) is nearly singular. TOL should !> normally be chose as approximately the largest relative error !> in the elements of T. For example, if the elements of T are !> correct to about 4 significant figures, then TOL should be !> set to about 5*10**(-4). If TOL is supplied as less than eps, !> where eps is the relative machine precision, then the value !> eps is used in place of TOL. !> |
| [out] | D | !> D is DOUBLE PRECISION array, dimension (N-2) !> On exit, D is overwritten by the (n-2) second super-diagonal !> elements of the matrix U of the factorization of T. !> |
| [out] | IN | !> IN is INTEGER array, dimension (N) !> On exit, IN contains details of the permutation matrix P. If !> an interchange occurred at the kth step of the elimination, !> then IN(k) = 1, otherwise IN(k) = 0. The element IN(n) !> returns the smallest positive integer j such that !> !> abs( u(j,j) ) <= norm( (T - lambda*I)(j) )*TOL, !> !> where norm( A(j) ) denotes the sum of the absolute values of !> the jth row of the matrix A. If no such j exists then IN(n) !> is returned as zero. If IN(n) is returned as positive, then a !> diagonal element of U is small, indicating that !> (T - lambda*I) is singular or nearly singular, !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -k, the kth argument had an illegal value !> |
Definition at line 155 of file dlagtf.f.
| subroutine dlamrg | ( | integer | n1, |
| integer | n2, | ||
| double precision, dimension( * ) | a, | ||
| integer | dtrd1, | ||
| integer | dtrd2, | ||
| integer, dimension( * ) | index ) |
DLAMRG creates a permutation list to merge the entries of two independently sorted sets into a single set sorted in ascending order.
Download DLAMRG + dependencies [TGZ] [ZIP] [TXT]
!> !> DLAMRG will create a permutation list which will merge the elements !> of A (which is composed of two independently sorted sets) into a !> single set which is sorted in ascending order. !>
| [in] | N1 | !> N1 is INTEGER !> |
| [in] | N2 | !> N2 is INTEGER !> These arguments contain the respective lengths of the two !> sorted lists to be merged. !> |
| [in] | A | !> A is DOUBLE PRECISION array, dimension (N1+N2) !> The first N1 elements of A contain a list of numbers which !> are sorted in either ascending or descending order. Likewise !> for the final N2 elements. !> |
| [in] | DTRD1 | !> DTRD1 is INTEGER !> |
| [in] | DTRD2 | !> DTRD2 is INTEGER !> These are the strides to be taken through the array A. !> Allowable strides are 1 and -1. They indicate whether a !> subset of A is sorted in ascending (DTRDx = 1) or descending !> (DTRDx = -1) order. !> |
| [out] | INDEX | !> INDEX is INTEGER array, dimension (N1+N2) !> On exit this array will contain a permutation such that !> if B( I ) = A( INDEX( I ) ) for I=1,N1+N2, then B will be !> sorted in ascending order. !> |
Definition at line 98 of file dlamrg.f.
| subroutine dlartgs | ( | double precision | x, |
| double precision | y, | ||
| double precision | sigma, | ||
| double precision | cs, | ||
| double precision | sn ) |
DLARTGS generates a plane rotation designed to introduce a bulge in implicit QR iteration for the bidiagonal SVD problem.
Download DLARTGS + dependencies [TGZ] [ZIP] [TXT]
!> !> DLARTGS generates a plane rotation designed to introduce a bulge in !> Golub-Reinsch-style implicit QR iteration for the bidiagonal SVD !> problem. X and Y are the top-row entries, and SIGMA is the shift. !> The computed CS and SN define a plane rotation satisfying !> !> [ CS SN ] . [ X^2 - SIGMA ] = [ R ], !> [ -SN CS ] [ X * Y ] [ 0 ] !> !> with R nonnegative. If X^2 - SIGMA and X * Y are 0, then the !> rotation is by PI/2. !>
| [in] | X | !> X is DOUBLE PRECISION !> The (1,1) entry of an upper bidiagonal matrix. !> |
| [in] | Y | !> Y is DOUBLE PRECISION !> The (1,2) entry of an upper bidiagonal matrix. !> |
| [in] | SIGMA | !> SIGMA is DOUBLE PRECISION !> The shift. !> |
| [out] | CS | !> CS is DOUBLE PRECISION !> The cosine of the rotation. !> |
| [out] | SN | !> SN is DOUBLE PRECISION !> The sine of the rotation. !> |
Definition at line 89 of file dlartgs.f.
| subroutine dlasq1 | ( | integer | n, |
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( * ) | work, | ||
| integer | info ) |
DLASQ1 computes the singular values of a real square bidiagonal matrix. Used by sbdsqr.
Download DLASQ1 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLASQ1 computes the singular values of a real N-by-N bidiagonal !> matrix with diagonal D and off-diagonal E. The singular values !> are computed to high relative accuracy, in the absence of !> denormalization, underflow and overflow. The algorithm was first !> presented in !> !> by K. V. !> Fernando and B. N. Parlett, Numer. Math., Vol-67, No. 2, pp. 191-230, !> 1994, !> !> and the present implementation is described in , LAPACK Working Note. !>
| [in] | N | !> N is INTEGER !> The number of rows and columns in the matrix. N >= 0. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, D contains the diagonal elements of the !> bidiagonal matrix whose SVD is desired. On normal exit, !> D contains the singular values in decreasing order. !> |
| [in,out] | E | !> E is DOUBLE PRECISION array, dimension (N) !> On entry, elements E(1:N-1) contain the off-diagonal elements !> of the bidiagonal matrix whose SVD is desired. !> On exit, E is overwritten. !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (4*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: the algorithm failed !> = 1, a split was marked by a positive value in E !> = 2, current block of Z not diagonalized after 100*N !> iterations (in inner while loop) On exit D and E !> represent a matrix with the same singular values !> which the calling subroutine could use to finish the !> computation, or even feed back into DLASQ1 !> = 3, termination criterion of outer while loop not met !> (program created more than N unreduced blocks) !> |
Definition at line 107 of file dlasq1.f.
| subroutine dlasq2 | ( | integer | n, |
| double precision, dimension( * ) | z, | ||
| integer | info ) |
DLASQ2 computes all the eigenvalues of the symmetric positive definite tridiagonal matrix associated with the qd Array Z to high relative accuracy. Used by sbdsqr and sstegr.
Download DLASQ2 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLASQ2 computes all the eigenvalues of the symmetric positive !> definite tridiagonal matrix associated with the qd array Z to high !> relative accuracy are computed to high relative accuracy, in the !> absence of denormalization, underflow and overflow. !> !> To see the relation of Z to the tridiagonal matrix, let L be a !> unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and !> let U be an upper bidiagonal matrix with 1's above and diagonal !> Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the !> symmetric tridiagonal to which it is similar. !> !> Note : DLASQ2 defines a logical variable, IEEE, which is true !> on machines which follow ieee-754 floating-point standard in their !> handling of infinities and NaNs, and false otherwise. This variable !> is passed to DLASQ3. !>
| [in] | N | !> N is INTEGER !> The number of rows and columns in the matrix. N >= 0. !> |
| [in,out] | Z | !> Z is DOUBLE PRECISION array, dimension ( 4*N ) !> On entry Z holds the qd array. On exit, entries 1 to N hold !> the eigenvalues in decreasing order, Z( 2*N+1 ) holds the !> trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If !> N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 ) !> holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of !> shifts that failed. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if the i-th argument is a scalar and had an illegal !> value, then INFO = -i, if the i-th argument is an !> array and the j-entry had an illegal value, then !> INFO = -(i*100+j) !> > 0: the algorithm failed !> = 1, a split was marked by a positive value in E !> = 2, current block of Z not diagonalized after 100*N !> iterations (in inner while loop). On exit Z holds !> a qd array with the same eigenvalues as the given Z. !> = 3, termination criterion of outer while loop not met !> (program created more than N unreduced blocks) !> |
!> !> Local Variables: I0:N0 defines a current unreduced segment of Z. !> The shifts are accumulated in SIGMA. Iteration count is in ITER. !> Ping-pong is controlled by PP (alternates between 0 and 1). !>
Definition at line 111 of file dlasq2.f.
| subroutine dlasq3 | ( | integer | i0, |
| integer | n0, | ||
| double precision, dimension( * ) | z, | ||
| integer | pp, | ||
| double precision | dmin, | ||
| double precision | sigma, | ||
| double precision | desig, | ||
| double precision | qmax, | ||
| integer | nfail, | ||
| integer | iter, | ||
| integer | ndiv, | ||
| logical | ieee, | ||
| integer | ttype, | ||
| double precision | dmin1, | ||
| double precision | dmin2, | ||
| double precision | dn, | ||
| double precision | dn1, | ||
| double precision | dn2, | ||
| double precision | g, | ||
| double precision | tau ) |
DLASQ3 checks for deflation, computes a shift and calls dqds. Used by sbdsqr.
Download DLASQ3 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLASQ3 checks for deflation, computes a shift (TAU) and calls dqds. !> In case of failure it changes shifts, and tries again until output !> is positive. !>
| [in] | I0 | !> I0 is INTEGER !> First index. !> |
| [in,out] | N0 | !> N0 is INTEGER !> Last index. !> |
| [in,out] | Z | !> Z is DOUBLE PRECISION array, dimension ( 4*N0 ) !> Z holds the qd array. !> |
| [in,out] | PP | !> PP is INTEGER !> PP=0 for ping, PP=1 for pong. !> PP=2 indicates that flipping was applied to the Z array !> and that the initial tests for deflation should not be !> performed. !> |
| [out] | DMIN | !> DMIN is DOUBLE PRECISION !> Minimum value of d. !> |
| [out] | SIGMA | !> SIGMA is DOUBLE PRECISION !> Sum of shifts used in current segment. !> |
| [in,out] | DESIG | !> DESIG is DOUBLE PRECISION !> Lower order part of SIGMA !> |
| [in] | QMAX | !> QMAX is DOUBLE PRECISION !> Maximum value of q. !> |
| [in,out] | NFAIL | !> NFAIL is INTEGER !> Increment NFAIL by 1 each time the shift was too big. !> |
| [in,out] | ITER | !> ITER is INTEGER !> Increment ITER by 1 for each iteration. !> |
| [in,out] | NDIV | !> NDIV is INTEGER !> Increment NDIV by 1 for each division. !> |
| [in] | IEEE | !> IEEE is LOGICAL !> Flag for IEEE or non IEEE arithmetic (passed to DLASQ5). !> |
| [in,out] | TTYPE | !> TTYPE is INTEGER !> Shift type. !> |
| [in,out] | DMIN1 | !> DMIN1 is DOUBLE PRECISION !> |
| [in,out] | DMIN2 | !> DMIN2 is DOUBLE PRECISION !> |
| [in,out] | DN | !> DN is DOUBLE PRECISION !> |
| [in,out] | DN1 | !> DN1 is DOUBLE PRECISION !> |
| [in,out] | DN2 | !> DN2 is DOUBLE PRECISION !> |
| [in,out] | G | !> G is DOUBLE PRECISION !> |
| [in,out] | TAU | !> TAU is DOUBLE PRECISION !> !> These are passed as arguments in order to save their values !> between calls to DLASQ3. !> |
Definition at line 179 of file dlasq3.f.
| subroutine dlasq4 | ( | integer | i0, |
| integer | n0, | ||
| double precision, dimension( * ) | z, | ||
| integer | pp, | ||
| integer | n0in, | ||
| double precision | dmin, | ||
| double precision | dmin1, | ||
| double precision | dmin2, | ||
| double precision | dn, | ||
| double precision | dn1, | ||
| double precision | dn2, | ||
| double precision | tau, | ||
| integer | ttype, | ||
| double precision | g ) |
DLASQ4 computes an approximation to the smallest eigenvalue using values of d from the previous transform. Used by sbdsqr.
Download DLASQ4 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLASQ4 computes an approximation TAU to the smallest eigenvalue !> using values of d from the previous transform. !>
| [in] | I0 | !> I0 is INTEGER !> First index. !> |
| [in] | N0 | !> N0 is INTEGER !> Last index. !> |
| [in] | Z | !> Z is DOUBLE PRECISION array, dimension ( 4*N0 ) !> Z holds the qd array. !> |
| [in] | PP | !> PP is INTEGER !> PP=0 for ping, PP=1 for pong. !> |
| [in] | N0IN | !> N0IN is INTEGER !> The value of N0 at start of EIGTEST. !> |
| [in] | DMIN | !> DMIN is DOUBLE PRECISION !> Minimum value of d. !> |
| [in] | DMIN1 | !> DMIN1 is DOUBLE PRECISION !> Minimum value of d, excluding D( N0 ). !> |
| [in] | DMIN2 | !> DMIN2 is DOUBLE PRECISION !> Minimum value of d, excluding D( N0 ) and D( N0-1 ). !> |
| [in] | DN | !> DN is DOUBLE PRECISION !> d(N) !> |
| [in] | DN1 | !> DN1 is DOUBLE PRECISION !> d(N-1) !> |
| [in] | DN2 | !> DN2 is DOUBLE PRECISION !> d(N-2) !> |
| [out] | TAU | !> TAU is DOUBLE PRECISION !> This is the shift. !> |
| [out] | TTYPE | !> TTYPE is INTEGER !> Shift type. !> |
| [in,out] | G | !> G is DOUBLE PRECISION !> G is passed as an argument in order to save its value between !> calls to DLASQ4. !> |
!> !> CNST1 = 9/16 !>
Definition at line 149 of file dlasq4.f.
| subroutine dlasq5 | ( | integer | i0, |
| integer | n0, | ||
| double precision, dimension( * ) | z, | ||
| integer | pp, | ||
| double precision | tau, | ||
| double precision | sigma, | ||
| double precision | dmin, | ||
| double precision | dmin1, | ||
| double precision | dmin2, | ||
| double precision | dn, | ||
| double precision | dnm1, | ||
| double precision | dnm2, | ||
| logical | ieee, | ||
| double precision | eps ) |
DLASQ5 computes one dqds transform in ping-pong form. Used by sbdsqr and sstegr.
Download DLASQ5 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLASQ5 computes one dqds transform in ping-pong form, one !> version for IEEE machines another for non IEEE machines. !>
| [in] | I0 | !> I0 is INTEGER !> First index. !> |
| [in] | N0 | !> N0 is INTEGER !> Last index. !> |
| [in] | Z | !> Z is DOUBLE PRECISION array, dimension ( 4*N ) !> Z holds the qd array. EMIN is stored in Z(4*N0) to avoid !> an extra argument. !> |
| [in] | PP | !> PP is INTEGER !> PP=0 for ping, PP=1 for pong. !> |
| [in] | TAU | !> TAU is DOUBLE PRECISION !> This is the shift. !> |
| [in] | SIGMA | !> SIGMA is DOUBLE PRECISION !> This is the accumulated shift up to this step. !> |
| [out] | DMIN | !> DMIN is DOUBLE PRECISION !> Minimum value of d. !> |
| [out] | DMIN1 | !> DMIN1 is DOUBLE PRECISION !> Minimum value of d, excluding D( N0 ). !> |
| [out] | DMIN2 | !> DMIN2 is DOUBLE PRECISION !> Minimum value of d, excluding D( N0 ) and D( N0-1 ). !> |
| [out] | DN | !> DN is DOUBLE PRECISION !> d(N0), the last value of d. !> |
| [out] | DNM1 | !> DNM1 is DOUBLE PRECISION !> d(N0-1). !> |
| [out] | DNM2 | !> DNM2 is DOUBLE PRECISION !> d(N0-2). !> |
| [in] | IEEE | !> IEEE is LOGICAL !> Flag for IEEE or non IEEE arithmetic. !> |
| [in] | EPS | !> EPS is DOUBLE PRECISION !> This is the value of epsilon used. !> |
Definition at line 142 of file dlasq5.f.
| subroutine dlasq6 | ( | integer | i0, |
| integer | n0, | ||
| double precision, dimension( * ) | z, | ||
| integer | pp, | ||
| double precision | dmin, | ||
| double precision | dmin1, | ||
| double precision | dmin2, | ||
| double precision | dn, | ||
| double precision | dnm1, | ||
| double precision | dnm2 ) |
DLASQ6 computes one dqd transform in ping-pong form. Used by sbdsqr and sstegr.
Download DLASQ6 + dependencies [TGZ] [ZIP] [TXT]
!> !> DLASQ6 computes one dqd (shift equal to zero) transform in !> ping-pong form, with protection against underflow and overflow. !>
| [in] | I0 | !> I0 is INTEGER !> First index. !> |
| [in] | N0 | !> N0 is INTEGER !> Last index. !> |
| [in] | Z | !> Z is DOUBLE PRECISION array, dimension ( 4*N ) !> Z holds the qd array. EMIN is stored in Z(4*N0) to avoid !> an extra argument. !> |
| [in] | PP | !> PP is INTEGER !> PP=0 for ping, PP=1 for pong. !> |
| [out] | DMIN | !> DMIN is DOUBLE PRECISION !> Minimum value of d. !> |
| [out] | DMIN1 | !> DMIN1 is DOUBLE PRECISION !> Minimum value of d, excluding D( N0 ). !> |
| [out] | DMIN2 | !> DMIN2 is DOUBLE PRECISION !> Minimum value of d, excluding D( N0 ) and D( N0-1 ). !> |
| [out] | DN | !> DN is DOUBLE PRECISION !> d(N0), the last value of d. !> |
| [out] | DNM1 | !> DNM1 is DOUBLE PRECISION !> d(N0-1). !> |
| [out] | DNM2 | !> DNM2 is DOUBLE PRECISION !> d(N0-2). !> |
Definition at line 117 of file dlasq6.f.
| subroutine dlasrt | ( | character | id, |
| integer | n, | ||
| double precision, dimension( * ) | d, | ||
| integer | info ) |
DLASRT sorts numbers in increasing or decreasing order.
Download DLASRT + dependencies [TGZ] [ZIP] [TXT]
!> !> Sort the numbers in D in increasing order (if ID = 'I') or !> in decreasing order (if ID = 'D' ). !> !> Use Quick Sort, reverting to Insertion sort on arrays of !> size <= 20. Dimension of STACK limits N to about 2**32. !>
| [in] | ID | !> ID is CHARACTER*1 !> = 'I': sort D in increasing order; !> = 'D': sort D in decreasing order. !> |
| [in] | N | !> N is INTEGER !> The length of the array D. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the array to be sorted. !> On exit, D has been sorted into increasing order !> (D(1) <= ... <= D(N) ) or into decreasing order !> (D(1) >= ... >= D(N) ), depending on ID. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> |
Definition at line 87 of file dlasrt.f.
| subroutine dstebz | ( | character | range, |
| character | order, | ||
| integer | n, | ||
| double precision | vl, | ||
| double precision | vu, | ||
| integer | il, | ||
| integer | iu, | ||
| double precision | abstol, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| integer | m, | ||
| integer | nsplit, | ||
| double precision, dimension( * ) | w, | ||
| integer, dimension( * ) | iblock, | ||
| integer, dimension( * ) | isplit, | ||
| double precision, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
DSTEBZ
Download DSTEBZ + dependencies [TGZ] [ZIP] [TXT]
!> !> DSTEBZ computes the eigenvalues of a symmetric tridiagonal !> matrix T. The user may ask for all eigenvalues, all eigenvalues !> in the half-open interval (VL, VU], or the IL-th through IU-th !> eigenvalues. !> !> To avoid overflow, the matrix must be scaled so that its !> largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest !> accuracy, it should not be much smaller than that. !> !> See W. Kahan , Report CS41, Computer Science Dept., Stanford !> University, July 21, 1966. !>
| [in] | RANGE | !> RANGE is CHARACTER*1 !> = 'A': () all eigenvalues will be found. !> = 'V': () all eigenvalues in the half-open interval !> (VL, VU] will be found. !> = 'I': () the IL-th through IU-th eigenvalues (of the !> entire matrix) will be found. !> |
| [in] | ORDER | !> ORDER is CHARACTER*1 !> = 'B': () the eigenvalues will be grouped by !> split-off block (see IBLOCK, ISPLIT) and !> ordered from smallest to largest within !> the block. !> = 'E': () !> the eigenvalues for the entire matrix !> will be ordered from smallest to !> largest. !> |
| [in] | N | !> N is INTEGER !> The order of the tridiagonal matrix T. N >= 0. !> |
| [in] | VL | !> VL is DOUBLE PRECISION !> !> If RANGE='V', the lower bound of the interval to !> be searched for eigenvalues. Eigenvalues less than or equal !> to VL, or greater than VU, will not be returned. VL < VU. !> Not referenced if RANGE = 'A' or 'I'. !> |
| [in] | VU | !> VU is DOUBLE PRECISION !> !> If RANGE='V', the upper bound of the interval to !> be searched for eigenvalues. Eigenvalues less than or equal !> to VL, or greater than VU, will not be returned. VL < VU. !> Not referenced if RANGE = 'A' or 'I'. !> |
| [in] | IL | !> IL is INTEGER !> !> If RANGE='I', the index of the !> smallest eigenvalue to be returned. !> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. !> Not referenced if RANGE = 'A' or 'V'. !> |
| [in] | IU | !> IU is INTEGER !> !> If RANGE='I', the index of the !> largest eigenvalue to be returned. !> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. !> Not referenced if RANGE = 'A' or 'V'. !> |
| [in] | ABSTOL | !> ABSTOL is DOUBLE PRECISION
!> The absolute tolerance for the eigenvalues. An eigenvalue
!> (or cluster) is considered to be located if it has been
!> determined to lie in an interval whose width is ABSTOL or
!> less. If ABSTOL is less than or equal to zero, then ULP*|T|
!> will be used, where |T| means the 1-norm of T.
!>
!> Eigenvalues will be computed most accurately when ABSTOL is
!> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
!> |
| [in] | D | !> D is DOUBLE PRECISION array, dimension (N) !> The n diagonal elements of the tridiagonal matrix T. !> |
| [in] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> The (n-1) off-diagonal elements of the tridiagonal matrix T. !> |
| [out] | M | !> M is INTEGER !> The actual number of eigenvalues found. 0 <= M <= N. !> (See also the description of INFO=2,3.) !> |
| [out] | NSPLIT | !> NSPLIT is INTEGER !> The number of diagonal blocks in the matrix T. !> 1 <= NSPLIT <= N. !> |
| [out] | W | !> W is DOUBLE PRECISION array, dimension (N) !> On exit, the first M elements of W will contain the !> eigenvalues. (DSTEBZ may use the remaining N-M elements as !> workspace.) !> |
| [out] | IBLOCK | !> IBLOCK is INTEGER array, dimension (N) !> At each row/column j where E(j) is zero or small, the !> matrix T is considered to split into a block diagonal !> matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which !> block (from 1 to the number of blocks) the eigenvalue W(i) !> belongs. (DSTEBZ may use the remaining N-M elements as !> workspace.) !> |
| [out] | ISPLIT | !> ISPLIT is INTEGER array, dimension (N) !> The splitting points, at which T breaks up into submatrices. !> The first submatrix consists of rows/columns 1 to ISPLIT(1), !> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2), !> etc., and the NSPLIT-th consists of rows/columns !> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N. !> (Only the first NSPLIT elements will actually be used, but !> since the user cannot know a priori what value NSPLIT will !> have, N words must be reserved for ISPLIT.) !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (4*N) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (3*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: some or all of the eigenvalues failed to converge or !> were not computed: !> =1 or 3: Bisection failed to converge for some !> eigenvalues; these eigenvalues are flagged by a !> negative block number. The effect is that the !> eigenvalues may not be as accurate as the !> absolute and relative tolerances. This is !> generally caused by unexpectedly inaccurate !> arithmetic. !> =2 or 3: RANGE='I' only: Not all of the eigenvalues !> IL:IU were found. !> Effect: M < IU+1-IL !> Cause: non-monotonic arithmetic, causing the !> Sturm sequence to be non-monotonic. !> Cure: recalculate, using RANGE='A', and pick !> out eigenvalues IL:IU. In some cases, !> increasing the PARAMETER may !> make things work. !> = 4: RANGE='I', and the Gershgorin interval !> initially used was too small. No eigenvalues !> were computed. !> Probable cause: your machine has sloppy !> floating-point arithmetic. !> Cure: Increase the PARAMETER , !> recompile, and try again. !> |
!> RELFAC DOUBLE PRECISION, default = 2.0e0 !> The relative tolerance. An interval (a,b] lies within !> if b-a < RELFAC*ulp*max(|a|,|b|), !> where is the machine precision (distance from 1 to !> the next larger floating point number.) !> !> FUDGE DOUBLE PRECISION, default = 2 !> A to widen the Gershgorin intervals. Ideally, !> a value of 1 should work, but on machines with sloppy !> arithmetic, this needs to be larger. The default for !> publicly released versions should be large enough to handle !> the worst machine around. Note that this has no effect !> on accuracy of the solution. !>
Definition at line 270 of file dstebz.f.
| subroutine dstedc | ( | character | compz, |
| integer | n, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldz, * ) | z, | ||
| integer | ldz, | ||
| double precision, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| integer | info ) |
DSTEDC
Download DSTEDC + dependencies [TGZ] [ZIP] [TXT]
!> !> DSTEDC computes all eigenvalues and, optionally, eigenvectors of a !> symmetric tridiagonal matrix using the divide and conquer method. !> The eigenvectors of a full or band real symmetric matrix can also be !> found if DSYTRD or DSPTRD or DSBTRD has been used to reduce this !> matrix to tridiagonal form. !> !> This code makes very mild assumptions about floating point !> arithmetic. It will work on machines with a guard digit in !> add/subtract, or on those binary machines without guard digits !> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. !> It could conceivably fail on hexadecimal or decimal machines !> without guard digits, but we know of none. See DLAED3 for details. !>
| [in] | COMPZ | !> COMPZ is CHARACTER*1 !> = 'N': Compute eigenvalues only. !> = 'I': Compute eigenvectors of tridiagonal matrix also. !> = 'V': Compute eigenvectors of original dense symmetric !> matrix also. On entry, Z contains the orthogonal !> matrix used to reduce the original matrix to !> tridiagonal form. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the diagonal elements of the tridiagonal matrix. !> On exit, if INFO = 0, the eigenvalues in ascending order. !> |
| [in,out] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> On entry, the subdiagonal elements of the tridiagonal matrix. !> On exit, E has been destroyed. !> |
| [in,out] | Z | !> Z is DOUBLE PRECISION array, dimension (LDZ,N) !> On entry, if COMPZ = 'V', then Z contains the orthogonal !> matrix used in the reduction to tridiagonal form. !> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the !> orthonormal eigenvectors of the original symmetric matrix, !> and if COMPZ = 'I', Z contains the orthonormal eigenvectors !> of the symmetric tridiagonal matrix. !> If COMPZ = 'N', then Z is not referenced. !> |
| [in] | LDZ | !> LDZ is INTEGER !> The leading dimension of the array Z. LDZ >= 1. !> If eigenvectors are desired, then LDZ >= max(1,N). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)) !> On exit, if INFO = 0, WORK(1) returns the optimal LWORK. !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK. !> If COMPZ = 'N' or N <= 1 then LWORK must be at least 1. !> If COMPZ = 'V' and N > 1 then LWORK must be at least !> ( 1 + 3*N + 2*N*lg N + 4*N**2 ), !> where lg( N ) = smallest integer k such !> that 2**k >= N. !> If COMPZ = 'I' and N > 1 then LWORK must be at least !> ( 1 + 4*N + N**2 ). !> Note that for COMPZ = 'I' or 'V', then if N is less than or !> equal to the minimum divide size, usually 25, then LWORK need !> only be max(1,2*(N-1)). !> !> If LWORK = -1, then a workspace query is assumed; the routine !> only calculates the optimal size of the WORK array, returns !> this value as the first entry of the WORK array, and no error !> message related to LWORK is issued by XERBLA. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (MAX(1,LIWORK)) !> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. !> |
| [in] | LIWORK | !> LIWORK is INTEGER !> The dimension of the array IWORK. !> If COMPZ = 'N' or N <= 1 then LIWORK must be at least 1. !> If COMPZ = 'V' and N > 1 then LIWORK must be at least !> ( 6 + 6*N + 5*N*lg N ). !> If COMPZ = 'I' and N > 1 then LIWORK must be at least !> ( 3 + 5*N ). !> Note that for COMPZ = 'I' or 'V', then if N is less than or !> equal to the minimum divide size, usually 25, then LIWORK !> need only be 1. !> !> If LIWORK = -1, then a workspace query is assumed; the !> routine only calculates the optimal size of the IWORK array, !> returns this value as the first entry of the IWORK array, and !> no error message related to LIWORK is issued by XERBLA. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: The algorithm failed to compute an eigenvalue while !> working on the submatrix lying in rows and columns !> INFO/(N+1) through mod(INFO,N+1). !> |
Definition at line 186 of file dstedc.f.
| subroutine dsteqr | ( | character | compz, |
| integer | n, | ||
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| double precision, dimension( ldz, * ) | z, | ||
| integer | ldz, | ||
| double precision, dimension( * ) | work, | ||
| integer | info ) |
DSTEQR
Download DSTEQR + dependencies [TGZ] [ZIP] [TXT]
!> !> DSTEQR computes all eigenvalues and, optionally, eigenvectors of a !> symmetric tridiagonal matrix using the implicit QL or QR method. !> The eigenvectors of a full or band symmetric matrix can also be found !> if DSYTRD or DSPTRD or DSBTRD has been used to reduce this matrix to !> tridiagonal form. !>
| [in] | COMPZ | !> COMPZ is CHARACTER*1 !> = 'N': Compute eigenvalues only. !> = 'V': Compute eigenvalues and eigenvectors of the original !> symmetric matrix. On entry, Z must contain the !> orthogonal matrix used to reduce the original matrix !> to tridiagonal form. !> = 'I': Compute eigenvalues and eigenvectors of the !> tridiagonal matrix. Z is initialized to the identity !> matrix. !> |
| [in] | N | !> N is INTEGER !> The order of the matrix. N >= 0. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the diagonal elements of the tridiagonal matrix. !> On exit, if INFO = 0, the eigenvalues in ascending order. !> |
| [in,out] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> On entry, the (n-1) subdiagonal elements of the tridiagonal !> matrix. !> On exit, E has been destroyed. !> |
| [in,out] | Z | !> Z is DOUBLE PRECISION array, dimension (LDZ, N) !> On entry, if COMPZ = 'V', then Z contains the orthogonal !> matrix used in the reduction to tridiagonal form. !> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the !> orthonormal eigenvectors of the original symmetric matrix, !> and if COMPZ = 'I', Z contains the orthonormal eigenvectors !> of the symmetric tridiagonal matrix. !> If COMPZ = 'N', then Z is not referenced. !> |
| [in] | LDZ | !> LDZ is INTEGER !> The leading dimension of the array Z. LDZ >= 1, and if !> eigenvectors are desired, then LDZ >= max(1,N). !> |
| [out] | WORK | !> WORK is DOUBLE PRECISION array, dimension (max(1,2*N-2)) !> If COMPZ = 'N', then WORK is not referenced. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: the algorithm has failed to find all the eigenvalues in !> a total of 30*N iterations; if INFO = i, then i !> elements of E have not converged to zero; on exit, D !> and E contain the elements of a symmetric tridiagonal !> matrix which is orthogonally similar to the original !> matrix. !> |
Definition at line 130 of file dsteqr.f.
| subroutine dsterf | ( | integer | n, |
| double precision, dimension( * ) | d, | ||
| double precision, dimension( * ) | e, | ||
| integer | info ) |
DSTERF
Download DSTERF + dependencies [TGZ] [ZIP] [TXT]
!> !> DSTERF computes all eigenvalues of a symmetric tridiagonal matrix !> using the Pal-Walker-Kahan variant of the QL or QR algorithm. !>
| [in] | N | !> N is INTEGER !> The order of the matrix. N >= 0. !> |
| [in,out] | D | !> D is DOUBLE PRECISION array, dimension (N) !> On entry, the n diagonal elements of the tridiagonal matrix. !> On exit, if INFO = 0, the eigenvalues in ascending order. !> |
| [in,out] | E | !> E is DOUBLE PRECISION array, dimension (N-1) !> On entry, the (n-1) subdiagonal elements of the tridiagonal !> matrix. !> On exit, E has been destroyed. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: the algorithm failed to find all of the eigenvalues in !> a total of 30*N iterations; if INFO = i, then i !> elements of E have not converged to zero. !> |
Definition at line 85 of file dsterf.f.
| integer function iladiag | ( | character | diag | ) |
ILADIAG
Download ILADIAG + dependencies [TGZ] [ZIP] [TXT]
!> !> This subroutine translated from a character string specifying if a !> matrix has unit diagonal or not to the relevant BLAST-specified !> integer constant. !> !> ILADIAG returns an INTEGER. If ILADIAG < 0, then the input is not a !> character indicating a unit or non-unit diagonal. Otherwise ILADIAG !> returns the constant value corresponding to DIAG. !>
Definition at line 57 of file iladiag.f.
| integer function ilaprec | ( | character | prec | ) |
ILAPREC
Download ILAPREC + dependencies [TGZ] [ZIP] [TXT]
!> !> This subroutine translated from a character string specifying an !> intermediate precision to the relevant BLAST-specified integer !> constant. !> !> ILAPREC returns an INTEGER. If ILAPREC < 0, then the input is not a !> character indicating a supported intermediate precision. Otherwise !> ILAPREC returns the constant value corresponding to PREC. !>
Definition at line 57 of file ilaprec.f.
| integer function ilatrans | ( | character | trans | ) |
ILATRANS
Download ILATRANS + dependencies [TGZ] [ZIP] [TXT]
!> !> This subroutine translates from a character string specifying a !> transposition operation to the relevant BLAST-specified integer !> constant. !> !> ILATRANS returns an INTEGER. If ILATRANS < 0, then the input is not !> a character indicating a transposition operator. Otherwise ILATRANS !> returns the constant value corresponding to TRANS. !>
Definition at line 57 of file ilatrans.f.
| integer function ilauplo | ( | character | uplo | ) |
ILAUPLO
Download ILAUPLO + dependencies [TGZ] [ZIP] [TXT]
!> !> This subroutine translated from a character string specifying a !> upper- or lower-triangular matrix to the relevant BLAST-specified !> integer constant. !> !> ILAUPLO returns an INTEGER. If ILAUPLO < 0, then the input is not !> a character indicating an upper- or lower-triangular matrix. !> Otherwise ILAUPLO returns the constant value corresponding to UPLO. !>
Definition at line 57 of file ilauplo.f.
| subroutine sbdsdc | ( | character | uplo, |
| character | compq, | ||
| integer | n, | ||
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| real, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| real, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| real, dimension( * ) | q, | ||
| integer, dimension( * ) | iq, | ||
| real, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
SBDSDC
Download SBDSDC + dependencies [TGZ] [ZIP] [TXT]
!> !> SBDSDC computes the singular value decomposition (SVD) of a real !> N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT, !> using a divide and conquer method, where S is a diagonal matrix !> with non-negative diagonal elements (the singular values of B), and !> U and VT are orthogonal matrices of left and right singular vectors, !> respectively. SBDSDC can be used to compute all singular values, !> and optionally, singular vectors or singular vectors in compact form. !> !> This code makes very mild assumptions about floating point !> arithmetic. It will work on machines with a guard digit in !> add/subtract, or on those binary machines without guard digits !> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. !> It could conceivably fail on hexadecimal or decimal machines !> without guard digits, but we know of none. See SLASD3 for details. !> !> The code currently calls SLASDQ if singular values only are desired. !> However, it can be slightly modified to compute singular values !> using the divide and conquer method. !>
| [in] | UPLO | !> UPLO is CHARACTER*1 !> = 'U': B is upper bidiagonal. !> = 'L': B is lower bidiagonal. !> |
| [in] | COMPQ | !> COMPQ is CHARACTER*1 !> Specifies whether singular vectors are to be computed !> as follows: !> = 'N': Compute singular values only; !> = 'P': Compute singular values and compute singular !> vectors in compact form; !> = 'I': Compute singular values and singular vectors. !> |
| [in] | N | !> N is INTEGER !> The order of the matrix B. N >= 0. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the n diagonal elements of the bidiagonal matrix B. !> On exit, if INFO=0, the singular values of B. !> |
| [in,out] | E | !> E is REAL array, dimension (N-1) !> On entry, the elements of E contain the offdiagonal !> elements of the bidiagonal matrix whose SVD is desired. !> On exit, E has been destroyed. !> |
| [out] | U | !> U is REAL array, dimension (LDU,N) !> If COMPQ = 'I', then: !> On exit, if INFO = 0, U contains the left singular vectors !> of the bidiagonal matrix. !> For other values of COMPQ, U is not referenced. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= 1. !> If singular vectors are desired, then LDU >= max( 1, N ). !> |
| [out] | VT | !> VT is REAL array, dimension (LDVT,N) !> If COMPQ = 'I', then: !> On exit, if INFO = 0, VT**T contains the right singular !> vectors of the bidiagonal matrix. !> For other values of COMPQ, VT is not referenced. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. LDVT >= 1. !> If singular vectors are desired, then LDVT >= max( 1, N ). !> |
| [out] | Q | !> Q is REAL array, dimension (LDQ) !> If COMPQ = 'P', then: !> On exit, if INFO = 0, Q and IQ contain the left !> and right singular vectors in a compact form, !> requiring O(N log N) space instead of 2*N**2. !> In particular, Q contains all the REAL data in !> LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1)))) !> words of memory, where SMLSIZ is returned by ILAENV and !> is equal to the maximum size of the subproblems at the !> bottom of the computation tree (usually about 25). !> For other values of COMPQ, Q is not referenced. !> |
| [out] | IQ | !> IQ is INTEGER array, dimension (LDIQ) !> If COMPQ = 'P', then: !> On exit, if INFO = 0, Q and IQ contain the left !> and right singular vectors in a compact form, !> requiring O(N log N) space instead of 2*N**2. !> In particular, IQ contains all INTEGER data in !> LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1)))) !> words of memory, where SMLSIZ is returned by ILAENV and !> is equal to the maximum size of the subproblems at the !> bottom of the computation tree (usually about 25). !> For other values of COMPQ, IQ is not referenced. !> |
| [out] | WORK | !> WORK is REAL array, dimension (MAX(1,LWORK)) !> If COMPQ = 'N' then LWORK >= (4 * N). !> If COMPQ = 'P' then LWORK >= (6 * N). !> If COMPQ = 'I' then LWORK >= (3 * N**2 + 4 * N). !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (8*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: The algorithm failed to compute a singular value. !> The update process of divide and conquer failed. !> |
Definition at line 203 of file sbdsdc.f.
| subroutine sbdsqr | ( | character | uplo, |
| integer | n, | ||
| integer | ncvt, | ||
| integer | nru, | ||
| integer | ncc, | ||
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| real, dimension( ldvt, * ) | vt, | ||
| integer | ldvt, | ||
| real, dimension( ldu, * ) | u, | ||
| integer | ldu, | ||
| real, dimension( ldc, * ) | c, | ||
| integer | ldc, | ||
| real, dimension( * ) | work, | ||
| integer | info ) |
SBDSQR
Download SBDSQR + dependencies [TGZ] [ZIP] [TXT]
!> !> SBDSQR computes the singular values and, optionally, the right and/or !> left singular vectors from the singular value decomposition (SVD) of !> a real N-by-N (upper or lower) bidiagonal matrix B using the implicit !> zero-shift QR algorithm. The SVD of B has the form !> !> B = Q * S * P**T !> !> where S is the diagonal matrix of singular values, Q is an orthogonal !> matrix of left singular vectors, and P is an orthogonal matrix of !> right singular vectors. If left singular vectors are requested, this !> subroutine actually returns U*Q instead of Q, and, if right singular !> vectors are requested, this subroutine returns P**T*VT instead of !> P**T, for given real input matrices U and VT. When U and VT are the !> orthogonal matrices that reduce a general matrix A to bidiagonal !> form: A = U*B*VT, as computed by SGEBRD, then !> !> A = (U*Q) * S * (P**T*VT) !> !> is the SVD of A. Optionally, the subroutine may also compute Q**T*C !> for a given real input matrix C. !> !> See by J. Demmel and W. Kahan, !> LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11, !> no. 5, pp. 873-912, Sept 1990) and !> by !> B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics !> Department, University of California at Berkeley, July 1992 !> for a detailed description of the algorithm. !>
| [in] | UPLO | !> UPLO is CHARACTER*1 !> = 'U': B is upper bidiagonal; !> = 'L': B is lower bidiagonal. !> |
| [in] | N | !> N is INTEGER !> The order of the matrix B. N >= 0. !> |
| [in] | NCVT | !> NCVT is INTEGER !> The number of columns of the matrix VT. NCVT >= 0. !> |
| [in] | NRU | !> NRU is INTEGER !> The number of rows of the matrix U. NRU >= 0. !> |
| [in] | NCC | !> NCC is INTEGER !> The number of columns of the matrix C. NCC >= 0. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the n diagonal elements of the bidiagonal matrix B. !> On exit, if INFO=0, the singular values of B in decreasing !> order. !> |
| [in,out] | E | !> E is REAL array, dimension (N-1) !> On entry, the N-1 offdiagonal elements of the bidiagonal !> matrix B. !> On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E !> will contain the diagonal and superdiagonal elements of a !> bidiagonal matrix orthogonally equivalent to the one given !> as input. !> |
| [in,out] | VT | !> VT is REAL array, dimension (LDVT, NCVT) !> On entry, an N-by-NCVT matrix VT. !> On exit, VT is overwritten by P**T * VT. !> Not referenced if NCVT = 0. !> |
| [in] | LDVT | !> LDVT is INTEGER !> The leading dimension of the array VT. !> LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0. !> |
| [in,out] | U | !> U is REAL array, dimension (LDU, N) !> On entry, an NRU-by-N matrix U. !> On exit, U is overwritten by U * Q. !> Not referenced if NRU = 0. !> |
| [in] | LDU | !> LDU is INTEGER !> The leading dimension of the array U. LDU >= max(1,NRU). !> |
| [in,out] | C | !> C is REAL array, dimension (LDC, NCC) !> On entry, an N-by-NCC matrix C. !> On exit, C is overwritten by Q**T * C. !> Not referenced if NCC = 0. !> |
| [in] | LDC | !> LDC is INTEGER !> The leading dimension of the array C. !> LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0. !> |
| [out] | WORK | !> WORK is REAL array, dimension (4*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: If INFO = -i, the i-th argument had an illegal value !> > 0: !> if NCVT = NRU = NCC = 0, !> = 1, a split was marked by a positive value in E !> = 2, current block of Z not diagonalized after 30*N !> iterations (in inner while loop) !> = 3, termination criterion of outer while loop not met !> (program created more than N unreduced blocks) !> else NCVT = NRU = NCC = 0, !> the algorithm did not converge; D and E contain the !> elements of a bidiagonal matrix which is orthogonally !> similar to the input matrix B; if INFO = i, i !> elements of E have not converged to zero. !> |
!> TOLMUL REAL, default = max(10,min(100,EPS**(-1/8))) !> TOLMUL controls the convergence criterion of the QR loop. !> If it is positive, TOLMUL*EPS is the desired relative !> precision in the computed singular values. !> If it is negative, abs(TOLMUL*EPS*sigma_max) is the !> desired absolute accuracy in the computed singular !> values (corresponds to relative accuracy !> abs(TOLMUL*EPS) in the largest singular value. !> abs(TOLMUL) should be between 1 and 1/EPS, and preferably !> between 10 (for fast convergence) and .1/EPS !> (for there to be some accuracy in the results). !> Default is to lose at either one eighth or 2 of the !> available decimal digits in each computed singular value !> (whichever is smaller). !> !> MAXITR INTEGER, default = 6 !> MAXITR controls the maximum number of passes of the !> algorithm through its inner loop. The algorithms stops !> (and so fails to converge) if the number of passes !> through the inner loop exceeds MAXITR*N**2. !>
!> Bug report from Cezary Dendek. !> On March 23rd 2017, the INTEGER variable MAXIT = MAXITR*N**2 is !> removed since it can overflow pretty easily (for N larger or equal !> than 18,919). We instead use MAXITDIVN = MAXITR*N. !>
Definition at line 238 of file sbdsqr.f.
| subroutine sdisna | ( | character | job, |
| integer | m, | ||
| integer | n, | ||
| real, dimension( * ) | d, | ||
| real, dimension( * ) | sep, | ||
| integer | info ) |
SDISNA
Download SDISNA + dependencies [TGZ] [ZIP] [TXT]
!> !> SDISNA computes the reciprocal condition numbers for the eigenvectors !> of a real symmetric or complex Hermitian matrix or for the left or !> right singular vectors of a general m-by-n matrix. The reciprocal !> condition number is the 'gap' between the corresponding eigenvalue or !> singular value and the nearest other one. !> !> The bound on the error, measured by angle in radians, in the I-th !> computed vector is given by !> !> SLAMCH( 'E' ) * ( ANORM / SEP( I ) ) !> !> where ANORM = 2-norm(A) = max( abs( D(j) ) ). SEP(I) is not allowed !> to be smaller than SLAMCH( 'E' )*ANORM in order to limit the size of !> the error bound. !> !> SDISNA may also be used to compute error bounds for eigenvectors of !> the generalized symmetric definite eigenproblem. !>
| [in] | JOB | !> JOB is CHARACTER*1 !> Specifies for which problem the reciprocal condition numbers !> should be computed: !> = 'E': the eigenvectors of a symmetric/Hermitian matrix; !> = 'L': the left singular vectors of a general matrix; !> = 'R': the right singular vectors of a general matrix. !> |
| [in] | M | !> M is INTEGER !> The number of rows of the matrix. M >= 0. !> |
| [in] | N | !> N is INTEGER !> If JOB = 'L' or 'R', the number of columns of the matrix, !> in which case N >= 0. Ignored if JOB = 'E'. !> |
| [in] | D | !> D is REAL array, dimension (M) if JOB = 'E' !> dimension (min(M,N)) if JOB = 'L' or 'R' !> The eigenvalues (if JOB = 'E') or singular values (if JOB = !> 'L' or 'R') of the matrix, in either increasing or decreasing !> order. If singular values, they must be non-negative. !> |
| [out] | SEP | !> SEP is REAL array, dimension (M) if JOB = 'E' !> dimension (min(M,N)) if JOB = 'L' or 'R' !> The reciprocal condition numbers of the vectors. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> |
Definition at line 116 of file sdisna.f.
| subroutine slaed0 | ( | integer | icompq, |
| integer | qsiz, | ||
| integer | n, | ||
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| real, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| real, dimension( ldqs, * ) | qstore, | ||
| integer | ldqs, | ||
| real, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
SLAED0 used by SSTEDC. Computes all eigenvalues and corresponding eigenvectors of an unreduced symmetric tridiagonal matrix using the divide and conquer method.
Download SLAED0 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAED0 computes all eigenvalues and corresponding eigenvectors of a !> symmetric tridiagonal matrix using the divide and conquer method. !>
| [in] | ICOMPQ | !> ICOMPQ is INTEGER !> = 0: Compute eigenvalues only. !> = 1: Compute eigenvectors of original dense symmetric matrix !> also. On entry, Q contains the orthogonal matrix used !> to reduce the original matrix to tridiagonal form. !> = 2: Compute eigenvalues and eigenvectors of tridiagonal !> matrix. !> |
| [in] | QSIZ | !> QSIZ is INTEGER !> The dimension of the orthogonal matrix used to reduce !> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the main diagonal of the tridiagonal matrix. !> On exit, its eigenvalues. !> |
| [in] | E | !> E is REAL array, dimension (N-1) !> The off-diagonal elements of the tridiagonal matrix. !> On exit, E has been destroyed. !> |
| [in,out] | Q | !> Q is REAL array, dimension (LDQ, N) !> On entry, Q must contain an N-by-N orthogonal matrix. !> If ICOMPQ = 0 Q is not referenced. !> If ICOMPQ = 1 On entry, Q is a subset of the columns of the !> orthogonal matrix used to reduce the full !> matrix to tridiagonal form corresponding to !> the subset of the full matrix which is being !> decomposed at this time. !> If ICOMPQ = 2 On entry, Q will be the identity matrix. !> On exit, Q contains the eigenvectors of the !> tridiagonal matrix. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. If eigenvectors are !> desired, then LDQ >= max(1,N). In any case, LDQ >= 1. !> |
| [out] | QSTORE | !> QSTORE is REAL array, dimension (LDQS, N) !> Referenced only when ICOMPQ = 1. Used to store parts of !> the eigenvector matrix when the updating matrix multiplies !> take place. !> |
| [in] | LDQS | !> LDQS is INTEGER !> The leading dimension of the array QSTORE. If ICOMPQ = 1, !> then LDQS >= max(1,N). In any case, LDQS >= 1. !> |
| [out] | WORK | !> WORK is REAL array, !> If ICOMPQ = 0 or 1, the dimension of WORK must be at least !> 1 + 3*N + 2*N*lg N + 3*N**2 !> ( lg( N ) = smallest integer k !> such that 2^k >= N ) !> If ICOMPQ = 2, the dimension of WORK must be at least !> 4*N + N**2. !> |
| [out] | IWORK | !> IWORK is INTEGER array, !> If ICOMPQ = 0 or 1, the dimension of IWORK must be at least !> 6 + 6*N + 5*N*lg N. !> ( lg( N ) = smallest integer k !> such that 2^k >= N ) !> If ICOMPQ = 2, the dimension of IWORK must be at least !> 3 + 5*N. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: The algorithm failed to compute an eigenvalue while !> working on the submatrix lying in rows and columns !> INFO/(N+1) through mod(INFO,N+1). !> |
Definition at line 170 of file slaed0.f.
| subroutine slaed1 | ( | integer | n, |
| real, dimension( * ) | d, | ||
| real, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| integer, dimension( * ) | indxq, | ||
| real | rho, | ||
| integer | cutpnt, | ||
| real, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
SLAED1 used by SSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is tridiagonal.
Download SLAED1 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAED1 computes the updated eigensystem of a diagonal !> matrix after modification by a rank-one symmetric matrix. This !> routine is used only for the eigenproblem which requires all !> eigenvalues and eigenvectors of a tridiagonal matrix. SLAED7 handles !> the case in which eigenvalues only or eigenvalues and eigenvectors !> of a full symmetric matrix (which was reduced to tridiagonal form) !> are desired. !> !> T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out) !> !> where Z = Q**T*u, u is a vector of length N with ones in the !> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere. !> !> The eigenvectors of the original matrix are stored in Q, and the !> eigenvalues are in D. The algorithm consists of three stages: !> !> The first stage consists of deflating the size of the problem !> when there are multiple eigenvalues or if there is a zero in !> the Z vector. For each such occurrence the dimension of the !> secular equation problem is reduced by one. This stage is !> performed by the routine SLAED2. !> !> The second stage consists of calculating the updated !> eigenvalues. This is done by finding the roots of the secular !> equation via the routine SLAED4 (as called by SLAED3). !> This routine also calculates the eigenvectors of the current !> problem. !> !> The final stage consists of computing the updated eigenvectors !> directly using the updated eigenvalues. The eigenvectors for !> the current problem are multiplied with the eigenvectors from !> the overall problem. !>
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the eigenvalues of the rank-1-perturbed matrix. !> On exit, the eigenvalues of the repaired matrix. !> |
| [in,out] | Q | !> Q is REAL array, dimension (LDQ,N) !> On entry, the eigenvectors of the rank-1-perturbed matrix. !> On exit, the eigenvectors of the repaired tridiagonal matrix. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [in,out] | INDXQ | !> INDXQ is INTEGER array, dimension (N) !> On entry, the permutation which separately sorts the two !> subproblems in D into ascending order. !> On exit, the permutation which will reintegrate the !> subproblems back into sorted order, !> i.e. D( INDXQ( I = 1, N ) ) will be in ascending order. !> |
| [in] | RHO | !> RHO is REAL !> The subdiagonal entry used to create the rank-1 modification. !> |
| [in] | CUTPNT | !> CUTPNT is INTEGER !> The location of the last eigenvalue in the leading sub-matrix. !> min(1,N) <= CUTPNT <= N/2. !> |
| [out] | WORK | !> WORK is REAL array, dimension (4*N + N**2) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (4*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: if INFO = 1, an eigenvalue did not converge !> |
Definition at line 161 of file slaed1.f.
| subroutine slaed2 | ( | integer | k, |
| integer | n, | ||
| integer | n1, | ||
| real, dimension( * ) | d, | ||
| real, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| integer, dimension( * ) | indxq, | ||
| real | rho, | ||
| real, dimension( * ) | z, | ||
| real, dimension( * ) | dlamda, | ||
| real, dimension( * ) | w, | ||
| real, dimension( * ) | q2, | ||
| integer, dimension( * ) | indx, | ||
| integer, dimension( * ) | indxc, | ||
| integer, dimension( * ) | indxp, | ||
| integer, dimension( * ) | coltyp, | ||
| integer | info ) |
SLAED2 used by SSTEDC. Merges eigenvalues and deflates secular equation. Used when the original matrix is tridiagonal.
Download SLAED2 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAED2 merges the two sets of eigenvalues together into a single !> sorted set. Then it tries to deflate the size of the problem. !> There are two ways in which deflation can occur: when two or more !> eigenvalues are close together or if there is a tiny entry in the !> Z vector. For each such occurrence the order of the related secular !> equation problem is reduced by one. !>
| [out] | K | !> K is INTEGER !> The number of non-deflated eigenvalues, and the order of the !> related secular equation. 0 <= K <=N. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in] | N1 | !> N1 is INTEGER !> The location of the last eigenvalue in the leading sub-matrix. !> min(1,N) <= N1 <= N/2. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, D contains the eigenvalues of the two submatrices to !> be combined. !> On exit, D contains the trailing (N-K) updated eigenvalues !> (those which were deflated) sorted into increasing order. !> |
| [in,out] | Q | !> Q is REAL array, dimension (LDQ, N) !> On entry, Q contains the eigenvectors of two submatrices in !> the two square blocks with corners at (1,1), (N1,N1) !> and (N1+1, N1+1), (N,N). !> On exit, Q contains the trailing (N-K) updated eigenvectors !> (those which were deflated) in its last N-K columns. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [in,out] | INDXQ | !> INDXQ is INTEGER array, dimension (N) !> The permutation which separately sorts the two sub-problems !> in D into ascending order. Note that elements in the second !> half of this permutation must first have N1 added to their !> values. Destroyed on exit. !> |
| [in,out] | RHO | !> RHO is REAL !> On entry, the off-diagonal element associated with the rank-1 !> cut which originally split the two submatrices which are now !> being recombined. !> On exit, RHO has been modified to the value required by !> SLAED3. !> |
| [in] | Z | !> Z is REAL array, dimension (N) !> On entry, Z contains the updating vector (the last !> row of the first sub-eigenvector matrix and the first row of !> the second sub-eigenvector matrix). !> On exit, the contents of Z have been destroyed by the updating !> process. !> |
| [out] | DLAMDA | !> DLAMDA is REAL array, dimension (N) !> A copy of the first K eigenvalues which will be used by !> SLAED3 to form the secular equation. !> |
| [out] | W | !> W is REAL array, dimension (N) !> The first k values of the final deflation-altered z-vector !> which will be passed to SLAED3. !> |
| [out] | Q2 | !> Q2 is REAL array, dimension (N1**2+(N-N1)**2) !> A copy of the first K eigenvectors which will be used by !> SLAED3 in a matrix multiply (SGEMM) to solve for the new !> eigenvectors. !> |
| [out] | INDX | !> INDX is INTEGER array, dimension (N) !> The permutation used to sort the contents of DLAMDA into !> ascending order. !> |
| [out] | INDXC | !> INDXC is INTEGER array, dimension (N) !> The permutation used to arrange the columns of the deflated !> Q matrix into three groups: the first group contains non-zero !> elements only at and above N1, the second contains !> non-zero elements only below N1, and the third is dense. !> |
| [out] | INDXP | !> INDXP is INTEGER array, dimension (N) !> The permutation used to place deflated values of D at the end !> of the array. INDXP(1:K) points to the nondeflated D-values !> and INDXP(K+1:N) points to the deflated eigenvalues. !> |
| [out] | COLTYP | !> COLTYP is INTEGER array, dimension (N) !> During execution, a label which will indicate which of the !> following types a column in the Q2 matrix is: !> 1 : non-zero in the upper half only; !> 2 : dense; !> 3 : non-zero in the lower half only; !> 4 : deflated. !> On exit, COLTYP(i) is the number of columns of type i, !> for i=1 to 4 only. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> |
Definition at line 210 of file slaed2.f.
| subroutine slaed3 | ( | integer | k, |
| integer | n, | ||
| integer | n1, | ||
| real, dimension( * ) | d, | ||
| real, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| real | rho, | ||
| real, dimension( * ) | dlamda, | ||
| real, dimension( * ) | q2, | ||
| integer, dimension( * ) | indx, | ||
| integer, dimension( * ) | ctot, | ||
| real, dimension( * ) | w, | ||
| real, dimension( * ) | s, | ||
| integer | info ) |
SLAED3 used by SSTEDC. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is tridiagonal.
Download SLAED3 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAED3 finds the roots of the secular equation, as defined by the !> values in D, W, and RHO, between 1 and K. It makes the !> appropriate calls to SLAED4 and then updates the eigenvectors by !> multiplying the matrix of eigenvectors of the pair of eigensystems !> being combined by the matrix of eigenvectors of the K-by-K system !> which is solved here. !> !> This code makes very mild assumptions about floating point !> arithmetic. It will work on machines with a guard digit in !> add/subtract, or on those binary machines without guard digits !> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. !> It could conceivably fail on hexadecimal or decimal machines !> without guard digits, but we know of none. !>
| [in] | K | !> K is INTEGER !> The number of terms in the rational function to be solved by !> SLAED4. K >= 0. !> |
| [in] | N | !> N is INTEGER !> The number of rows and columns in the Q matrix. !> N >= K (deflation may result in N>K). !> |
| [in] | N1 | !> N1 is INTEGER !> The location of the last eigenvalue in the leading submatrix. !> min(1,N) <= N1 <= N/2. !> |
| [out] | D | !> D is REAL array, dimension (N) !> D(I) contains the updated eigenvalues for !> 1 <= I <= K. !> |
| [out] | Q | !> Q is REAL array, dimension (LDQ,N) !> Initially the first K columns are used as workspace. !> On output the columns 1 to K contain !> the updated eigenvectors. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [in] | RHO | !> RHO is REAL !> The value of the parameter in the rank one update equation. !> RHO >= 0 required. !> |
| [in,out] | DLAMDA | !> DLAMDA is REAL array, dimension (K) !> The first K elements of this array contain the old roots !> of the deflated updating problem. These are the poles !> of the secular equation. May be changed on output by !> having lowest order bit set to zero on Cray X-MP, Cray Y-MP, !> Cray-2, or Cray C-90, as described above. !> |
| [in] | Q2 | !> Q2 is REAL array, dimension (LDQ2*N) !> The first K columns of this matrix contain the non-deflated !> eigenvectors for the split problem. !> |
| [in] | INDX | !> INDX is INTEGER array, dimension (N) !> The permutation used to arrange the columns of the deflated !> Q matrix into three groups (see SLAED2). !> The rows of the eigenvectors found by SLAED4 must be likewise !> permuted before the matrix multiply can take place. !> |
| [in] | CTOT | !> CTOT is INTEGER array, dimension (4) !> A count of the total number of the various types of columns !> in Q, as described in INDX. The fourth column type is any !> column which has been deflated. !> |
| [in,out] | W | !> W is REAL array, dimension (K) !> The first K elements of this array contain the components !> of the deflation-adjusted updating vector. Destroyed on !> output. !> |
| [out] | S | !> S is REAL array, dimension (N1 + 1)*K !> Will contain the eigenvectors of the repaired matrix which !> will be multiplied by the previously accumulated eigenvectors !> to update the system. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: if INFO = 1, an eigenvalue did not converge !> |
Definition at line 183 of file slaed3.f.
| subroutine slaed4 | ( | integer | n, |
| integer | i, | ||
| real, dimension( * ) | d, | ||
| real, dimension( * ) | z, | ||
| real, dimension( * ) | delta, | ||
| real | rho, | ||
| real | dlam, | ||
| integer | info ) |
SLAED4 used by SSTEDC. Finds a single root of the secular equation.
Download SLAED4 + dependencies [TGZ] [ZIP] [TXT]
!> !> This subroutine computes the I-th updated eigenvalue of a symmetric !> rank-one modification to a diagonal matrix whose elements are !> given in the array d, and that !> !> D(i) < D(j) for i < j !> !> and that RHO > 0. This is arranged by the calling routine, and is !> no loss in generality. The rank-one modified system is thus !> !> diag( D ) + RHO * Z * Z_transpose. !> !> where we assume the Euclidean norm of Z is 1. !> !> The method consists of approximating the rational functions in the !> secular equation by simpler interpolating rational functions. !>
| [in] | N | !> N is INTEGER !> The length of all arrays. !> |
| [in] | I | !> I is INTEGER !> The index of the eigenvalue to be computed. 1 <= I <= N. !> |
| [in] | D | !> D is REAL array, dimension (N) !> The original eigenvalues. It is assumed that they are in !> order, D(I) < D(J) for I < J. !> |
| [in] | Z | !> Z is REAL array, dimension (N) !> The components of the updating vector. !> |
| [out] | DELTA | !> DELTA is REAL array, dimension (N) !> If N > 2, DELTA contains (D(j) - lambda_I) in its j-th !> component. If N = 1, then DELTA(1) = 1. If N = 2, see SLAED5 !> for detail. The vector DELTA contains the information necessary !> to construct the eigenvectors by SLAED3 and SLAED9. !> |
| [in] | RHO | !> RHO is REAL !> The scalar in the symmetric updating formula. !> |
| [out] | DLAM | !> DLAM is REAL !> The computed lambda_I, the I-th updated eigenvalue. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> > 0: if INFO = 1, the updating process failed. !> |
!> Logical variable ORGATI (origin-at-i?) is used for distinguishing !> whether D(i) or D(i+1) is treated as the origin. !> !> ORGATI = .true. origin at i !> ORGATI = .false. origin at i+1 !> !> Logical variable SWTCH3 (switch-for-3-poles?) is for noting !> if we are working with THREE poles! !> !> MAXIT is the maximum number of iterations allowed for each !> eigenvalue. !>
Definition at line 144 of file slaed4.f.
| subroutine slaed5 | ( | integer | i, |
| real, dimension( 2 ) | d, | ||
| real, dimension( 2 ) | z, | ||
| real, dimension( 2 ) | delta, | ||
| real | rho, | ||
| real | dlam ) |
SLAED5 used by SSTEDC. Solves the 2-by-2 secular equation.
Download SLAED5 + dependencies [TGZ] [ZIP] [TXT]
!> !> This subroutine computes the I-th eigenvalue of a symmetric rank-one !> modification of a 2-by-2 diagonal matrix !> !> diag( D ) + RHO * Z * transpose(Z) . !> !> The diagonal elements in the array D are assumed to satisfy !> !> D(i) < D(j) for i < j . !> !> We also assume RHO > 0 and that the Euclidean norm of the vector !> Z is one. !>
| [in] | I | !> I is INTEGER !> The index of the eigenvalue to be computed. I = 1 or I = 2. !> |
| [in] | D | !> D is REAL array, dimension (2) !> The original eigenvalues. We assume D(1) < D(2). !> |
| [in] | Z | !> Z is REAL array, dimension (2) !> The components of the updating vector. !> |
| [out] | DELTA | !> DELTA is REAL array, dimension (2) !> The vector DELTA contains the information necessary !> to construct the eigenvectors. !> |
| [in] | RHO | !> RHO is REAL !> The scalar in the symmetric updating formula. !> |
| [out] | DLAM | !> DLAM is REAL !> The computed lambda_I, the I-th updated eigenvalue. !> |
Definition at line 107 of file slaed5.f.
| subroutine slaed6 | ( | integer | kniter, |
| logical | orgati, | ||
| real | rho, | ||
| real, dimension( 3 ) | d, | ||
| real, dimension( 3 ) | z, | ||
| real | finit, | ||
| real | tau, | ||
| integer | info ) |
SLAED6 used by SSTEDC. Computes one Newton step in solution of the secular equation.
Download SLAED6 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAED6 computes the positive or negative root (closest to the origin) !> of !> z(1) z(2) z(3) !> f(x) = rho + --------- + ---------- + --------- !> d(1)-x d(2)-x d(3)-x !> !> It is assumed that !> !> if ORGATI = .true. the root is between d(2) and d(3); !> otherwise it is between d(1) and d(2) !> !> This routine will be called by SLAED4 when necessary. In most cases, !> the root sought is the smallest in magnitude, though it might not be !> in some extremely rare situations. !>
| [in] | KNITER | !> KNITER is INTEGER !> Refer to SLAED4 for its significance. !> |
| [in] | ORGATI | !> ORGATI is LOGICAL !> If ORGATI is true, the needed root is between d(2) and !> d(3); otherwise it is between d(1) and d(2). See !> SLAED4 for further details. !> |
| [in] | RHO | !> RHO is REAL !> Refer to the equation f(x) above. !> |
| [in] | D | !> D is REAL array, dimension (3) !> D satisfies d(1) < d(2) < d(3). !> |
| [in] | Z | !> Z is REAL array, dimension (3) !> Each of the elements in z must be positive. !> |
| [in] | FINIT | !> FINIT is REAL !> The value of f at 0. It is more accurate than the one !> evaluated inside this routine (if someone wants to do !> so). !> |
| [out] | TAU | !> TAU is REAL !> The root of the equation f(x). !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> > 0: if INFO = 1, failure to converge !> |
!> !> 10/02/03: This version has a few statements commented out for thread !> safety (machine parameters are computed on each entry). SJH. !> !> 05/10/06: Modified from a new version of Ren-Cang Li, use !> Gragg-Thornton-Warner cubic convergent scheme for better stability. !>
Definition at line 139 of file slaed6.f.
| subroutine slaed7 | ( | integer | icompq, |
| integer | n, | ||
| integer | qsiz, | ||
| integer | tlvls, | ||
| integer | curlvl, | ||
| integer | curpbm, | ||
| real, dimension( * ) | d, | ||
| real, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| integer, dimension( * ) | indxq, | ||
| real | rho, | ||
| integer | cutpnt, | ||
| real, dimension( * ) | qstore, | ||
| integer, dimension( * ) | qptr, | ||
| integer, dimension( * ) | prmptr, | ||
| integer, dimension( * ) | perm, | ||
| integer, dimension( * ) | givptr, | ||
| integer, dimension( 2, * ) | givcol, | ||
| real, dimension( 2, * ) | givnum, | ||
| real, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
SLAED7 used by SSTEDC. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is dense.
Download SLAED7 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAED7 computes the updated eigensystem of a diagonal !> matrix after modification by a rank-one symmetric matrix. This !> routine is used only for the eigenproblem which requires all !> eigenvalues and optionally eigenvectors of a dense symmetric matrix !> that has been reduced to tridiagonal form. SLAED1 handles !> the case in which all eigenvalues and eigenvectors of a symmetric !> tridiagonal matrix are desired. !> !> T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out) !> !> where Z = Q**Tu, u is a vector of length N with ones in the !> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere. !> !> The eigenvectors of the original matrix are stored in Q, and the !> eigenvalues are in D. The algorithm consists of three stages: !> !> The first stage consists of deflating the size of the problem !> when there are multiple eigenvalues or if there is a zero in !> the Z vector. For each such occurrence the dimension of the !> secular equation problem is reduced by one. This stage is !> performed by the routine SLAED8. !> !> The second stage consists of calculating the updated !> eigenvalues. This is done by finding the roots of the secular !> equation via the routine SLAED4 (as called by SLAED9). !> This routine also calculates the eigenvectors of the current !> problem. !> !> The final stage consists of computing the updated eigenvectors !> directly using the updated eigenvalues. The eigenvectors for !> the current problem are multiplied with the eigenvectors from !> the overall problem. !>
| [in] | ICOMPQ | !> ICOMPQ is INTEGER !> = 0: Compute eigenvalues only. !> = 1: Compute eigenvectors of original dense symmetric matrix !> also. On entry, Q contains the orthogonal matrix used !> to reduce the original matrix to tridiagonal form. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in] | QSIZ | !> QSIZ is INTEGER !> The dimension of the orthogonal matrix used to reduce !> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1. !> |
| [in] | TLVLS | !> TLVLS is INTEGER !> The total number of merging levels in the overall divide and !> conquer tree. !> |
| [in] | CURLVL | !> CURLVL is INTEGER !> The current level in the overall merge routine, !> 0 <= CURLVL <= TLVLS. !> |
| [in] | CURPBM | !> CURPBM is INTEGER !> The current problem in the current level in the overall !> merge routine (counting from upper left to lower right). !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the eigenvalues of the rank-1-perturbed matrix. !> On exit, the eigenvalues of the repaired matrix. !> |
| [in,out] | Q | !> Q is REAL array, dimension (LDQ, N) !> On entry, the eigenvectors of the rank-1-perturbed matrix. !> On exit, the eigenvectors of the repaired tridiagonal matrix. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [out] | INDXQ | !> INDXQ is INTEGER array, dimension (N) !> The permutation which will reintegrate the subproblem just !> solved back into sorted order, i.e., D( INDXQ( I = 1, N ) ) !> will be in ascending order. !> |
| [in] | RHO | !> RHO is REAL !> The subdiagonal element used to create the rank-1 !> modification. !> |
| [in] | CUTPNT | !> CUTPNT is INTEGER !> Contains the location of the last eigenvalue in the leading !> sub-matrix. min(1,N) <= CUTPNT <= N. !> |
| [in,out] | QSTORE | !> QSTORE is REAL array, dimension (N**2+1) !> Stores eigenvectors of submatrices encountered during !> divide and conquer, packed together. QPTR points to !> beginning of the submatrices. !> |
| [in,out] | QPTR | !> QPTR is INTEGER array, dimension (N+2) !> List of indices pointing to beginning of submatrices stored !> in QSTORE. The submatrices are numbered starting at the !> bottom left of the divide and conquer tree, from left to !> right and bottom to top. !> |
| [in] | PRMPTR | !> PRMPTR is INTEGER array, dimension (N lg N) !> Contains a list of pointers which indicate where in PERM a !> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i) !> indicates the size of the permutation and also the size of !> the full, non-deflated problem. !> |
| [in] | PERM | !> PERM is INTEGER array, dimension (N lg N) !> Contains the permutations (from deflation and sorting) to be !> applied to each eigenblock. !> |
| [in] | GIVPTR | !> GIVPTR is INTEGER array, dimension (N lg N) !> Contains a list of pointers which indicate where in GIVCOL a !> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i) !> indicates the number of Givens rotations. !> |
| [in] | GIVCOL | !> GIVCOL is INTEGER array, dimension (2, N lg N) !> Each pair of numbers indicates a pair of columns to take place !> in a Givens rotation. !> |
| [in] | GIVNUM | !> GIVNUM is REAL array, dimension (2, N lg N) !> Each number indicates the S value to be used in the !> corresponding Givens rotation. !> |
| [out] | WORK | !> WORK is REAL array, dimension (3*N+2*QSIZ*N) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (4*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: if INFO = 1, an eigenvalue did not converge !> |
Definition at line 256 of file slaed7.f.
| subroutine slaed8 | ( | integer | icompq, |
| integer | k, | ||
| integer | n, | ||
| integer | qsiz, | ||
| real, dimension( * ) | d, | ||
| real, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| integer, dimension( * ) | indxq, | ||
| real | rho, | ||
| integer | cutpnt, | ||
| real, dimension( * ) | z, | ||
| real, dimension( * ) | dlamda, | ||
| real, dimension( ldq2, * ) | q2, | ||
| integer | ldq2, | ||
| real, dimension( * ) | w, | ||
| integer, dimension( * ) | perm, | ||
| integer | givptr, | ||
| integer, dimension( 2, * ) | givcol, | ||
| real, dimension( 2, * ) | givnum, | ||
| integer, dimension( * ) | indxp, | ||
| integer, dimension( * ) | indx, | ||
| integer | info ) |
SLAED8 used by SSTEDC. Merges eigenvalues and deflates secular equation. Used when the original matrix is dense.
Download SLAED8 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAED8 merges the two sets of eigenvalues together into a single !> sorted set. Then it tries to deflate the size of the problem. !> There are two ways in which deflation can occur: when two or more !> eigenvalues are close together or if there is a tiny element in the !> Z vector. For each such occurrence the order of the related secular !> equation problem is reduced by one. !>
| [in] | ICOMPQ | !> ICOMPQ is INTEGER !> = 0: Compute eigenvalues only. !> = 1: Compute eigenvectors of original dense symmetric matrix !> also. On entry, Q contains the orthogonal matrix used !> to reduce the original matrix to tridiagonal form. !> |
| [out] | K | !> K is INTEGER !> The number of non-deflated eigenvalues, and the order of the !> related secular equation. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in] | QSIZ | !> QSIZ is INTEGER !> The dimension of the orthogonal matrix used to reduce !> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the eigenvalues of the two submatrices to be !> combined. On exit, the trailing (N-K) updated eigenvalues !> (those which were deflated) sorted into increasing order. !> |
| [in,out] | Q | !> Q is REAL array, dimension (LDQ,N) !> If ICOMPQ = 0, Q is not referenced. Otherwise, !> on entry, Q contains the eigenvectors of the partially solved !> system which has been previously updated in matrix !> multiplies with other partially solved eigensystems. !> On exit, Q contains the trailing (N-K) updated eigenvectors !> (those which were deflated) in its last N-K columns. !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,N). !> |
| [in] | INDXQ | !> INDXQ is INTEGER array, dimension (N) !> The permutation which separately sorts the two sub-problems !> in D into ascending order. Note that elements in the second !> half of this permutation must first have CUTPNT added to !> their values in order to be accurate. !> |
| [in,out] | RHO | !> RHO is REAL !> On entry, the off-diagonal element associated with the rank-1 !> cut which originally split the two submatrices which are now !> being recombined. !> On exit, RHO has been modified to the value required by !> SLAED3. !> |
| [in] | CUTPNT | !> CUTPNT is INTEGER !> The location of the last eigenvalue in the leading !> sub-matrix. min(1,N) <= CUTPNT <= N. !> |
| [in] | Z | !> Z is REAL array, dimension (N) !> On entry, Z contains the updating vector (the last row of !> the first sub-eigenvector matrix and the first row of the !> second sub-eigenvector matrix). !> On exit, the contents of Z are destroyed by the updating !> process. !> |
| [out] | DLAMDA | !> DLAMDA is REAL array, dimension (N) !> A copy of the first K eigenvalues which will be used by !> SLAED3 to form the secular equation. !> |
| [out] | Q2 | !> Q2 is REAL array, dimension (LDQ2,N) !> If ICOMPQ = 0, Q2 is not referenced. Otherwise, !> a copy of the first K eigenvectors which will be used by !> SLAED7 in a matrix multiply (SGEMM) to update the new !> eigenvectors. !> |
| [in] | LDQ2 | !> LDQ2 is INTEGER !> The leading dimension of the array Q2. LDQ2 >= max(1,N). !> |
| [out] | W | !> W is REAL array, dimension (N) !> The first k values of the final deflation-altered z-vector and !> will be passed to SLAED3. !> |
| [out] | PERM | !> PERM is INTEGER array, dimension (N) !> The permutations (from deflation and sorting) to be applied !> to each eigenblock. !> |
| [out] | GIVPTR | !> GIVPTR is INTEGER !> The number of Givens rotations which took place in this !> subproblem. !> |
| [out] | GIVCOL | !> GIVCOL is INTEGER array, dimension (2, N) !> Each pair of numbers indicates a pair of columns to take place !> in a Givens rotation. !> |
| [out] | GIVNUM | !> GIVNUM is REAL array, dimension (2, N) !> Each number indicates the S value to be used in the !> corresponding Givens rotation. !> |
| [out] | INDXP | !> INDXP is INTEGER array, dimension (N) !> The permutation used to place deflated values of D at the end !> of the array. INDXP(1:K) points to the nondeflated D-values !> and INDXP(K+1:N) points to the deflated eigenvalues. !> |
| [out] | INDX | !> INDX is INTEGER array, dimension (N) !> The permutation used to sort the contents of D into ascending !> order. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> |
Definition at line 240 of file slaed8.f.
| subroutine slaed9 | ( | integer | k, |
| integer | kstart, | ||
| integer | kstop, | ||
| integer | n, | ||
| real, dimension( * ) | d, | ||
| real, dimension( ldq, * ) | q, | ||
| integer | ldq, | ||
| real | rho, | ||
| real, dimension( * ) | dlamda, | ||
| real, dimension( * ) | w, | ||
| real, dimension( lds, * ) | s, | ||
| integer | lds, | ||
| integer | info ) |
SLAED9 used by SSTEDC. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is dense.
Download SLAED9 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAED9 finds the roots of the secular equation, as defined by the !> values in D, Z, and RHO, between KSTART and KSTOP. It makes the !> appropriate calls to SLAED4 and then stores the new matrix of !> eigenvectors for use in calculating the next level of Z vectors. !>
| [in] | K | !> K is INTEGER !> The number of terms in the rational function to be solved by !> SLAED4. K >= 0. !> |
| [in] | KSTART | !> KSTART is INTEGER !> |
| [in] | KSTOP | !> KSTOP is INTEGER !> The updated eigenvalues Lambda(I), KSTART <= I <= KSTOP !> are to be computed. 1 <= KSTART <= KSTOP <= K. !> |
| [in] | N | !> N is INTEGER !> The number of rows and columns in the Q matrix. !> N >= K (delation may result in N > K). !> |
| [out] | D | !> D is REAL array, dimension (N) !> D(I) contains the updated eigenvalues !> for KSTART <= I <= KSTOP. !> |
| [out] | Q | !> Q is REAL array, dimension (LDQ,N) !> |
| [in] | LDQ | !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max( 1, N ). !> |
| [in] | RHO | !> RHO is REAL !> The value of the parameter in the rank one update equation. !> RHO >= 0 required. !> |
| [in] | DLAMDA | !> DLAMDA is REAL array, dimension (K) !> The first K elements of this array contain the old roots !> of the deflated updating problem. These are the poles !> of the secular equation. !> |
| [in] | W | !> W is REAL array, dimension (K) !> The first K elements of this array contain the components !> of the deflation-adjusted updating vector. !> |
| [out] | S | !> S is REAL array, dimension (LDS, K) !> Will contain the eigenvectors of the repaired matrix which !> will be stored for subsequent Z vector calculation and !> multiplied by the previously accumulated eigenvectors !> to update the system. !> |
| [in] | LDS | !> LDS is INTEGER !> The leading dimension of S. LDS >= max( 1, K ). !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: if INFO = 1, an eigenvalue did not converge !> |
Definition at line 154 of file slaed9.f.
| subroutine slaeda | ( | integer | n, |
| integer | tlvls, | ||
| integer | curlvl, | ||
| integer | curpbm, | ||
| integer, dimension( * ) | prmptr, | ||
| integer, dimension( * ) | perm, | ||
| integer, dimension( * ) | givptr, | ||
| integer, dimension( 2, * ) | givcol, | ||
| real, dimension( 2, * ) | givnum, | ||
| real, dimension( * ) | q, | ||
| integer, dimension( * ) | qptr, | ||
| real, dimension( * ) | z, | ||
| real, dimension( * ) | ztemp, | ||
| integer | info ) |
SLAEDA used by SSTEDC. Computes the Z vector determining the rank-one modification of the diagonal matrix. Used when the original matrix is dense.
Download SLAEDA + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAEDA computes the Z vector corresponding to the merge step in the !> CURLVLth step of the merge process with TLVLS steps for the CURPBMth !> problem. !>
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in] | TLVLS | !> TLVLS is INTEGER !> The total number of merging levels in the overall divide and !> conquer tree. !> |
| [in] | CURLVL | !> CURLVL is INTEGER !> The current level in the overall merge routine, !> 0 <= curlvl <= tlvls. !> |
| [in] | CURPBM | !> CURPBM is INTEGER !> The current problem in the current level in the overall !> merge routine (counting from upper left to lower right). !> |
| [in] | PRMPTR | !> PRMPTR is INTEGER array, dimension (N lg N) !> Contains a list of pointers which indicate where in PERM a !> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i) !> indicates the size of the permutation and incidentally the !> size of the full, non-deflated problem. !> |
| [in] | PERM | !> PERM is INTEGER array, dimension (N lg N) !> Contains the permutations (from deflation and sorting) to be !> applied to each eigenblock. !> |
| [in] | GIVPTR | !> GIVPTR is INTEGER array, dimension (N lg N) !> Contains a list of pointers which indicate where in GIVCOL a !> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i) !> indicates the number of Givens rotations. !> |
| [in] | GIVCOL | !> GIVCOL is INTEGER array, dimension (2, N lg N) !> Each pair of numbers indicates a pair of columns to take place !> in a Givens rotation. !> |
| [in] | GIVNUM | !> GIVNUM is REAL array, dimension (2, N lg N) !> Each number indicates the S value to be used in the !> corresponding Givens rotation. !> |
| [in] | Q | !> Q is REAL array, dimension (N**2) !> Contains the square eigenblocks from previous levels, the !> starting positions for blocks are given by QPTR. !> |
| [in] | QPTR | !> QPTR is INTEGER array, dimension (N+2) !> Contains a list of pointers which indicate where in Q an !> eigenblock is stored. SQRT( QPTR(i+1) - QPTR(i) ) indicates !> the size of the block. !> |
| [out] | Z | !> Z is REAL array, dimension (N) !> On output this vector contains the updating vector (the last !> row of the first sub-eigenvector matrix and the first row of !> the second sub-eigenvector matrix). !> |
| [out] | ZTEMP | !> ZTEMP is REAL array, dimension (N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> |
Definition at line 164 of file slaeda.f.
| subroutine slagtf | ( | integer | n, |
| real, dimension( * ) | a, | ||
| real | lambda, | ||
| real, dimension( * ) | b, | ||
| real, dimension( * ) | c, | ||
| real | tol, | ||
| real, dimension( * ) | d, | ||
| integer, dimension( * ) | in, | ||
| integer | info ) |
SLAGTF computes an LU factorization of a matrix T-λI, where T is a general tridiagonal matrix, and λ a scalar, using partial pivoting with row interchanges.
Download SLAGTF + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAGTF factorizes the matrix (T - lambda*I), where T is an n by n !> tridiagonal matrix and lambda is a scalar, as !> !> T - lambda*I = PLU, !> !> where P is a permutation matrix, L is a unit lower tridiagonal matrix !> with at most one non-zero sub-diagonal elements per column and U is !> an upper triangular matrix with at most two non-zero super-diagonal !> elements per column. !> !> The factorization is obtained by Gaussian elimination with partial !> pivoting and implicit row scaling. !> !> The parameter LAMBDA is included in the routine so that SLAGTF may !> be used, in conjunction with SLAGTS, to obtain eigenvectors of T by !> inverse iteration. !>
| [in] | N | !> N is INTEGER !> The order of the matrix T. !> |
| [in,out] | A | !> A is REAL array, dimension (N) !> On entry, A must contain the diagonal elements of T. !> !> On exit, A is overwritten by the n diagonal elements of the !> upper triangular matrix U of the factorization of T. !> |
| [in] | LAMBDA | !> LAMBDA is REAL !> On entry, the scalar lambda. !> |
| [in,out] | B | !> B is REAL array, dimension (N-1) !> On entry, B must contain the (n-1) super-diagonal elements of !> T. !> !> On exit, B is overwritten by the (n-1) super-diagonal !> elements of the matrix U of the factorization of T. !> |
| [in,out] | C | !> C is REAL array, dimension (N-1) !> On entry, C must contain the (n-1) sub-diagonal elements of !> T. !> !> On exit, C is overwritten by the (n-1) sub-diagonal elements !> of the matrix L of the factorization of T. !> |
| [in] | TOL | !> TOL is REAL !> On entry, a relative tolerance used to indicate whether or !> not the matrix (T - lambda*I) is nearly singular. TOL should !> normally be chose as approximately the largest relative error !> in the elements of T. For example, if the elements of T are !> correct to about 4 significant figures, then TOL should be !> set to about 5*10**(-4). If TOL is supplied as less than eps, !> where eps is the relative machine precision, then the value !> eps is used in place of TOL. !> |
| [out] | D | !> D is REAL array, dimension (N-2) !> On exit, D is overwritten by the (n-2) second super-diagonal !> elements of the matrix U of the factorization of T. !> |
| [out] | IN | !> IN is INTEGER array, dimension (N) !> On exit, IN contains details of the permutation matrix P. If !> an interchange occurred at the kth step of the elimination, !> then IN(k) = 1, otherwise IN(k) = 0. The element IN(n) !> returns the smallest positive integer j such that !> !> abs( u(j,j) ) <= norm( (T - lambda*I)(j) )*TOL, !> !> where norm( A(j) ) denotes the sum of the absolute values of !> the jth row of the matrix A. If no such j exists then IN(n) !> is returned as zero. If IN(n) is returned as positive, then a !> diagonal element of U is small, indicating that !> (T - lambda*I) is singular or nearly singular, !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -k, the kth argument had an illegal value !> |
Definition at line 155 of file slagtf.f.
| subroutine slamrg | ( | integer | n1, |
| integer | n2, | ||
| real, dimension( * ) | a, | ||
| integer | strd1, | ||
| integer | strd2, | ||
| integer, dimension( * ) | index ) |
SLAMRG creates a permutation list to merge the entries of two independently sorted sets into a single set sorted in ascending order.
Download SLAMRG + dependencies [TGZ] [ZIP] [TXT]
!> !> SLAMRG will create a permutation list which will merge the elements !> of A (which is composed of two independently sorted sets) into a !> single set which is sorted in ascending order. !>
| [in] | N1 | !> N1 is INTEGER !> |
| [in] | N2 | !> N2 is INTEGER !> These arguments contain the respective lengths of the two !> sorted lists to be merged. !> |
| [in] | A | !> A is REAL array, dimension (N1+N2) !> The first N1 elements of A contain a list of numbers which !> are sorted in either ascending or descending order. Likewise !> for the final N2 elements. !> |
| [in] | STRD1 | !> STRD1 is INTEGER !> |
| [in] | STRD2 | !> STRD2 is INTEGER !> These are the strides to be taken through the array A. !> Allowable strides are 1 and -1. They indicate whether a !> subset of A is sorted in ascending (STRDx = 1) or descending !> (STRDx = -1) order. !> |
| [out] | INDEX | !> INDEX is INTEGER array, dimension (N1+N2) !> On exit this array will contain a permutation such that !> if B( I ) = A( INDEX( I ) ) for I=1,N1+N2, then B will be !> sorted in ascending order. !> |
Definition at line 98 of file slamrg.f.
| subroutine slartgs | ( | real | x, |
| real | y, | ||
| real | sigma, | ||
| real | cs, | ||
| real | sn ) |
SLARTGS generates a plane rotation designed to introduce a bulge in implicit QR iteration for the bidiagonal SVD problem.
Download SLARTGS + dependencies [TGZ] [ZIP] [TXT]
!> !> SLARTGS generates a plane rotation designed to introduce a bulge in !> Golub-Reinsch-style implicit QR iteration for the bidiagonal SVD !> problem. X and Y are the top-row entries, and SIGMA is the shift. !> The computed CS and SN define a plane rotation satisfying !> !> [ CS SN ] . [ X^2 - SIGMA ] = [ R ], !> [ -SN CS ] [ X * Y ] [ 0 ] !> !> with R nonnegative. If X^2 - SIGMA and X * Y are 0, then the !> rotation is by PI/2. !>
| [in] | X | !> X is REAL !> The (1,1) entry of an upper bidiagonal matrix. !> |
| [in] | Y | !> Y is REAL !> The (1,2) entry of an upper bidiagonal matrix. !> |
| [in] | SIGMA | !> SIGMA is REAL !> The shift. !> |
| [out] | CS | !> CS is REAL !> The cosine of the rotation. !> |
| [out] | SN | !> SN is REAL !> The sine of the rotation. !> |
Definition at line 89 of file slartgs.f.
| subroutine slasq1 | ( | integer | n, |
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| real, dimension( * ) | work, | ||
| integer | info ) |
SLASQ1 computes the singular values of a real square bidiagonal matrix. Used by sbdsqr.
Download SLASQ1 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLASQ1 computes the singular values of a real N-by-N bidiagonal !> matrix with diagonal D and off-diagonal E. The singular values !> are computed to high relative accuracy, in the absence of !> denormalization, underflow and overflow. The algorithm was first !> presented in !> !> by K. V. !> Fernando and B. N. Parlett, Numer. Math., Vol-67, No. 2, pp. 191-230, !> 1994, !> !> and the present implementation is described in , LAPACK Working Note. !>
| [in] | N | !> N is INTEGER !> The number of rows and columns in the matrix. N >= 0. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, D contains the diagonal elements of the !> bidiagonal matrix whose SVD is desired. On normal exit, !> D contains the singular values in decreasing order. !> |
| [in,out] | E | !> E is REAL array, dimension (N) !> On entry, elements E(1:N-1) contain the off-diagonal elements !> of the bidiagonal matrix whose SVD is desired. !> On exit, E is overwritten. !> |
| [out] | WORK | !> WORK is REAL array, dimension (4*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: the algorithm failed !> = 1, a split was marked by a positive value in E !> = 2, current block of Z not diagonalized after 100*N !> iterations (in inner while loop) On exit D and E !> represent a matrix with the same singular values !> which the calling subroutine could use to finish the !> computation, or even feed back into SLASQ1 !> = 3, termination criterion of outer while loop not met !> (program created more than N unreduced blocks) !> |
Definition at line 107 of file slasq1.f.
| subroutine slasq2 | ( | integer | n, |
| real, dimension( * ) | z, | ||
| integer | info ) |
SLASQ2 computes all the eigenvalues of the symmetric positive definite tridiagonal matrix associated with the qd Array Z to high relative accuracy. Used by sbdsqr and sstegr.
Download SLASQ2 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLASQ2 computes all the eigenvalues of the symmetric positive !> definite tridiagonal matrix associated with the qd array Z to high !> relative accuracy are computed to high relative accuracy, in the !> absence of denormalization, underflow and overflow. !> !> To see the relation of Z to the tridiagonal matrix, let L be a !> unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and !> let U be an upper bidiagonal matrix with 1's above and diagonal !> Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the !> symmetric tridiagonal to which it is similar. !> !> Note : SLASQ2 defines a logical variable, IEEE, which is true !> on machines which follow ieee-754 floating-point standard in their !> handling of infinities and NaNs, and false otherwise. This variable !> is passed to SLASQ3. !>
| [in] | N | !> N is INTEGER !> The number of rows and columns in the matrix. N >= 0. !> |
| [in,out] | Z | !> Z is REAL array, dimension ( 4*N ) !> On entry Z holds the qd array. On exit, entries 1 to N hold !> the eigenvalues in decreasing order, Z( 2*N+1 ) holds the !> trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If !> N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 ) !> holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of !> shifts that failed. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if the i-th argument is a scalar and had an illegal !> value, then INFO = -i, if the i-th argument is an !> array and the j-entry had an illegal value, then !> INFO = -(i*100+j) !> > 0: the algorithm failed !> = 1, a split was marked by a positive value in E !> = 2, current block of Z not diagonalized after 100*N !> iterations (in inner while loop). On exit Z holds !> a qd array with the same eigenvalues as the given Z. !> = 3, termination criterion of outer while loop not met !> (program created more than N unreduced blocks) !> |
!> !> Local Variables: I0:N0 defines a current unreduced segment of Z. !> The shifts are accumulated in SIGMA. Iteration count is in ITER. !> Ping-pong is controlled by PP (alternates between 0 and 1). !>
Definition at line 111 of file slasq2.f.
| subroutine slasq3 | ( | integer | i0, |
| integer | n0, | ||
| real, dimension( * ) | z, | ||
| integer | pp, | ||
| real | dmin, | ||
| real | sigma, | ||
| real | desig, | ||
| real | qmax, | ||
| integer | nfail, | ||
| integer | iter, | ||
| integer | ndiv, | ||
| logical | ieee, | ||
| integer | ttype, | ||
| real | dmin1, | ||
| real | dmin2, | ||
| real | dn, | ||
| real | dn1, | ||
| real | dn2, | ||
| real | g, | ||
| real | tau ) |
SLASQ3 checks for deflation, computes a shift and calls dqds. Used by sbdsqr.
Download SLASQ3 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLASQ3 checks for deflation, computes a shift (TAU) and calls dqds. !> In case of failure it changes shifts, and tries again until output !> is positive. !>
| [in] | I0 | !> I0 is INTEGER !> First index. !> |
| [in,out] | N0 | !> N0 is INTEGER !> Last index. !> |
| [in,out] | Z | !> Z is REAL array, dimension ( 4*N0 ) !> Z holds the qd array. !> |
| [in,out] | PP | !> PP is INTEGER !> PP=0 for ping, PP=1 for pong. !> PP=2 indicates that flipping was applied to the Z array !> and that the initial tests for deflation should not be !> performed. !> |
| [out] | DMIN | !> DMIN is REAL !> Minimum value of d. !> |
| [out] | SIGMA | !> SIGMA is REAL !> Sum of shifts used in current segment. !> |
| [in,out] | DESIG | !> DESIG is REAL !> Lower order part of SIGMA !> |
| [in] | QMAX | !> QMAX is REAL !> Maximum value of q. !> |
| [in,out] | NFAIL | !> NFAIL is INTEGER !> Increment NFAIL by 1 each time the shift was too big. !> |
| [in,out] | ITER | !> ITER is INTEGER !> Increment ITER by 1 for each iteration. !> |
| [in,out] | NDIV | !> NDIV is INTEGER !> Increment NDIV by 1 for each division. !> |
| [in] | IEEE | !> IEEE is LOGICAL !> Flag for IEEE or non IEEE arithmetic (passed to SLASQ5). !> |
| [in,out] | TTYPE | !> TTYPE is INTEGER !> Shift type. !> |
| [in,out] | DMIN1 | !> DMIN1 is REAL !> |
| [in,out] | DMIN2 | !> DMIN2 is REAL !> |
| [in,out] | DN | !> DN is REAL !> |
| [in,out] | DN1 | !> DN1 is REAL !> |
| [in,out] | DN2 | !> DN2 is REAL !> |
| [in,out] | G | !> G is REAL !> |
| [in,out] | TAU | !> TAU is REAL !> !> These are passed as arguments in order to save their values !> between calls to SLASQ3. !> |
Definition at line 179 of file slasq3.f.
| subroutine slasq4 | ( | integer | i0, |
| integer | n0, | ||
| real, dimension( * ) | z, | ||
| integer | pp, | ||
| integer | n0in, | ||
| real | dmin, | ||
| real | dmin1, | ||
| real | dmin2, | ||
| real | dn, | ||
| real | dn1, | ||
| real | dn2, | ||
| real | tau, | ||
| integer | ttype, | ||
| real | g ) |
SLASQ4 computes an approximation to the smallest eigenvalue using values of d from the previous transform. Used by sbdsqr.
Download SLASQ4 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLASQ4 computes an approximation TAU to the smallest eigenvalue !> using values of d from the previous transform. !>
| [in] | I0 | !> I0 is INTEGER !> First index. !> |
| [in] | N0 | !> N0 is INTEGER !> Last index. !> |
| [in] | Z | !> Z is REAL array, dimension ( 4*N0 ) !> Z holds the qd array. !> |
| [in] | PP | !> PP is INTEGER !> PP=0 for ping, PP=1 for pong. !> |
| [in] | N0IN | !> N0IN is INTEGER !> The value of N0 at start of EIGTEST. !> |
| [in] | DMIN | !> DMIN is REAL !> Minimum value of d. !> |
| [in] | DMIN1 | !> DMIN1 is REAL !> Minimum value of d, excluding D( N0 ). !> |
| [in] | DMIN2 | !> DMIN2 is REAL !> Minimum value of d, excluding D( N0 ) and D( N0-1 ). !> |
| [in] | DN | !> DN is REAL !> d(N) !> |
| [in] | DN1 | !> DN1 is REAL !> d(N-1) !> |
| [in] | DN2 | !> DN2 is REAL !> d(N-2) !> |
| [out] | TAU | !> TAU is REAL !> This is the shift. !> |
| [out] | TTYPE | !> TTYPE is INTEGER !> Shift type. !> |
| [in,out] | G | !> G is REAL !> G is passed as an argument in order to save its value between !> calls to SLASQ4. !> |
!> !> CNST1 = 9/16 !>
Definition at line 149 of file slasq4.f.
| subroutine slasq5 | ( | integer | i0, |
| integer | n0, | ||
| real, dimension( * ) | z, | ||
| integer | pp, | ||
| real | tau, | ||
| real | sigma, | ||
| real | dmin, | ||
| real | dmin1, | ||
| real | dmin2, | ||
| real | dn, | ||
| real | dnm1, | ||
| real | dnm2, | ||
| logical | ieee, | ||
| real | eps ) |
SLASQ5 computes one dqds transform in ping-pong form. Used by sbdsqr and sstegr.
Download SLASQ5 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLASQ5 computes one dqds transform in ping-pong form, one !> version for IEEE machines another for non IEEE machines. !>
| [in] | I0 | !> I0 is INTEGER !> First index. !> |
| [in] | N0 | !> N0 is INTEGER !> Last index. !> |
| [in] | Z | !> Z is REAL array, dimension ( 4*N ) !> Z holds the qd array. EMIN is stored in Z(4*N0) to avoid !> an extra argument. !> |
| [in] | PP | !> PP is INTEGER !> PP=0 for ping, PP=1 for pong. !> |
| [in] | TAU | !> TAU is REAL !> This is the shift. !> |
| [in] | SIGMA | !> SIGMA is REAL !> This is the accumulated shift up to this step. !> |
| [out] | DMIN | !> DMIN is REAL !> Minimum value of d. !> |
| [out] | DMIN1 | !> DMIN1 is REAL !> Minimum value of d, excluding D( N0 ). !> |
| [out] | DMIN2 | !> DMIN2 is REAL !> Minimum value of d, excluding D( N0 ) and D( N0-1 ). !> |
| [out] | DN | !> DN is REAL !> d(N0), the last value of d. !> |
| [out] | DNM1 | !> DNM1 is REAL !> d(N0-1). !> |
| [out] | DNM2 | !> DNM2 is REAL !> d(N0-2). !> |
| [in] | IEEE | !> IEEE is LOGICAL !> Flag for IEEE or non IEEE arithmetic. !> |
| [in] | EPS | !> EPS is REAL !> This is the value of epsilon used. !> |
Definition at line 142 of file slasq5.f.
| subroutine slasq6 | ( | integer | i0, |
| integer | n0, | ||
| real, dimension( * ) | z, | ||
| integer | pp, | ||
| real | dmin, | ||
| real | dmin1, | ||
| real | dmin2, | ||
| real | dn, | ||
| real | dnm1, | ||
| real | dnm2 ) |
SLASQ6 computes one dqd transform in ping-pong form. Used by sbdsqr and sstegr.
Download SLASQ6 + dependencies [TGZ] [ZIP] [TXT]
!> !> SLASQ6 computes one dqd (shift equal to zero) transform in !> ping-pong form, with protection against underflow and overflow. !>
| [in] | I0 | !> I0 is INTEGER !> First index. !> |
| [in] | N0 | !> N0 is INTEGER !> Last index. !> |
| [in] | Z | !> Z is REAL array, dimension ( 4*N ) !> Z holds the qd array. EMIN is stored in Z(4*N0) to avoid !> an extra argument. !> |
| [in] | PP | !> PP is INTEGER !> PP=0 for ping, PP=1 for pong. !> |
| [out] | DMIN | !> DMIN is REAL !> Minimum value of d. !> |
| [out] | DMIN1 | !> DMIN1 is REAL !> Minimum value of d, excluding D( N0 ). !> |
| [out] | DMIN2 | !> DMIN2 is REAL !> Minimum value of d, excluding D( N0 ) and D( N0-1 ). !> |
| [out] | DN | !> DN is REAL !> d(N0), the last value of d. !> |
| [out] | DNM1 | !> DNM1 is REAL !> d(N0-1). !> |
| [out] | DNM2 | !> DNM2 is REAL !> d(N0-2). !> |
Definition at line 117 of file slasq6.f.
| subroutine slasrt | ( | character | id, |
| integer | n, | ||
| real, dimension( * ) | d, | ||
| integer | info ) |
SLASRT sorts numbers in increasing or decreasing order.
Download SLASRT + dependencies [TGZ] [ZIP] [TXT]
!> !> Sort the numbers in D in increasing order (if ID = 'I') or !> in decreasing order (if ID = 'D' ). !> !> Use Quick Sort, reverting to Insertion sort on arrays of !> size <= 20. Dimension of STACK limits N to about 2**32. !>
| [in] | ID | !> ID is CHARACTER*1 !> = 'I': sort D in increasing order; !> = 'D': sort D in decreasing order. !> |
| [in] | N | !> N is INTEGER !> The length of the array D. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the array to be sorted. !> On exit, D has been sorted into increasing order !> (D(1) <= ... <= D(N) ) or into decreasing order !> (D(1) >= ... >= D(N) ), depending on ID. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> |
Definition at line 87 of file slasrt.f.
| subroutine spttrf | ( | integer | n, |
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| integer | info ) |
SPTTRF
Download SPTTRF + dependencies [TGZ] [ZIP] [TXT]
!> !> SPTTRF computes the L*D*L**T factorization of a real symmetric !> positive definite tridiagonal matrix A. The factorization may also !> be regarded as having the form A = U**T*D*U. !>
| [in] | N | !> N is INTEGER !> The order of the matrix A. N >= 0. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the n diagonal elements of the tridiagonal matrix !> A. On exit, the n diagonal elements of the diagonal matrix !> D from the L*D*L**T factorization of A. !> |
| [in,out] | E | !> E is REAL array, dimension (N-1) !> On entry, the (n-1) subdiagonal elements of the tridiagonal !> matrix A. On exit, the (n-1) subdiagonal elements of the !> unit bidiagonal factor L from the L*D*L**T factorization of A. !> E can also be regarded as the superdiagonal of the unit !> bidiagonal factor U from the U**T*D*U factorization of A. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -k, the k-th argument had an illegal value !> > 0: if INFO = k, the leading minor of order k is not !> positive definite; if k < N, the factorization could not !> be completed, while if k = N, the factorization was !> completed, but D(N) <= 0. !> |
Definition at line 90 of file spttrf.f.
| subroutine sstebz | ( | character | range, |
| character | order, | ||
| integer | n, | ||
| real | vl, | ||
| real | vu, | ||
| integer | il, | ||
| integer | iu, | ||
| real | abstol, | ||
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| integer | m, | ||
| integer | nsplit, | ||
| real, dimension( * ) | w, | ||
| integer, dimension( * ) | iblock, | ||
| integer, dimension( * ) | isplit, | ||
| real, dimension( * ) | work, | ||
| integer, dimension( * ) | iwork, | ||
| integer | info ) |
SSTEBZ
Download SSTEBZ + dependencies [TGZ] [ZIP] [TXT]
!> !> SSTEBZ computes the eigenvalues of a symmetric tridiagonal !> matrix T. The user may ask for all eigenvalues, all eigenvalues !> in the half-open interval (VL, VU], or the IL-th through IU-th !> eigenvalues. !> !> To avoid overflow, the matrix must be scaled so that its !> largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest !> accuracy, it should not be much smaller than that. !> !> See W. Kahan , Report CS41, Computer Science Dept., Stanford !> University, July 21, 1966. !>
| [in] | RANGE | !> RANGE is CHARACTER*1 !> = 'A': () all eigenvalues will be found. !> = 'V': () all eigenvalues in the half-open interval !> (VL, VU] will be found. !> = 'I': () the IL-th through IU-th eigenvalues (of the !> entire matrix) will be found. !> |
| [in] | ORDER | !> ORDER is CHARACTER*1 !> = 'B': () the eigenvalues will be grouped by !> split-off block (see IBLOCK, ISPLIT) and !> ordered from smallest to largest within !> the block. !> = 'E': () !> the eigenvalues for the entire matrix !> will be ordered from smallest to !> largest. !> |
| [in] | N | !> N is INTEGER !> The order of the tridiagonal matrix T. N >= 0. !> |
| [in] | VL | !> VL is REAL !> !> If RANGE='V', the lower bound of the interval to !> be searched for eigenvalues. Eigenvalues less than or equal !> to VL, or greater than VU, will not be returned. VL < VU. !> Not referenced if RANGE = 'A' or 'I'. !> |
| [in] | VU | !> VU is REAL !> !> If RANGE='V', the upper bound of the interval to !> be searched for eigenvalues. Eigenvalues less than or equal !> to VL, or greater than VU, will not be returned. VL < VU. !> Not referenced if RANGE = 'A' or 'I'. !> |
| [in] | IL | !> IL is INTEGER !> !> If RANGE='I', the index of the !> smallest eigenvalue to be returned. !> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. !> Not referenced if RANGE = 'A' or 'V'. !> |
| [in] | IU | !> IU is INTEGER !> !> If RANGE='I', the index of the !> largest eigenvalue to be returned. !> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. !> Not referenced if RANGE = 'A' or 'V'. !> |
| [in] | ABSTOL | !> ABSTOL is REAL
!> The absolute tolerance for the eigenvalues. An eigenvalue
!> (or cluster) is considered to be located if it has been
!> determined to lie in an interval whose width is ABSTOL or
!> less. If ABSTOL is less than or equal to zero, then ULP*|T|
!> will be used, where |T| means the 1-norm of T.
!>
!> Eigenvalues will be computed most accurately when ABSTOL is
!> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
!> |
| [in] | D | !> D is REAL array, dimension (N) !> The n diagonal elements of the tridiagonal matrix T. !> |
| [in] | E | !> E is REAL array, dimension (N-1) !> The (n-1) off-diagonal elements of the tridiagonal matrix T. !> |
| [out] | M | !> M is INTEGER !> The actual number of eigenvalues found. 0 <= M <= N. !> (See also the description of INFO=2,3.) !> |
| [out] | NSPLIT | !> NSPLIT is INTEGER !> The number of diagonal blocks in the matrix T. !> 1 <= NSPLIT <= N. !> |
| [out] | W | !> W is REAL array, dimension (N) !> On exit, the first M elements of W will contain the !> eigenvalues. (SSTEBZ may use the remaining N-M elements as !> workspace.) !> |
| [out] | IBLOCK | !> IBLOCK is INTEGER array, dimension (N) !> At each row/column j where E(j) is zero or small, the !> matrix T is considered to split into a block diagonal !> matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which !> block (from 1 to the number of blocks) the eigenvalue W(i) !> belongs. (SSTEBZ may use the remaining N-M elements as !> workspace.) !> |
| [out] | ISPLIT | !> ISPLIT is INTEGER array, dimension (N) !> The splitting points, at which T breaks up into submatrices. !> The first submatrix consists of rows/columns 1 to ISPLIT(1), !> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2), !> etc., and the NSPLIT-th consists of rows/columns !> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N. !> (Only the first NSPLIT elements will actually be used, but !> since the user cannot know a priori what value NSPLIT will !> have, N words must be reserved for ISPLIT.) !> |
| [out] | WORK | !> WORK is REAL array, dimension (4*N) !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (3*N) !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: some or all of the eigenvalues failed to converge or !> were not computed: !> =1 or 3: Bisection failed to converge for some !> eigenvalues; these eigenvalues are flagged by a !> negative block number. The effect is that the !> eigenvalues may not be as accurate as the !> absolute and relative tolerances. This is !> generally caused by unexpectedly inaccurate !> arithmetic. !> =2 or 3: RANGE='I' only: Not all of the eigenvalues !> IL:IU were found. !> Effect: M < IU+1-IL !> Cause: non-monotonic arithmetic, causing the !> Sturm sequence to be non-monotonic. !> Cure: recalculate, using RANGE='A', and pick !> out eigenvalues IL:IU. In some cases, !> increasing the PARAMETER may !> make things work. !> = 4: RANGE='I', and the Gershgorin interval !> initially used was too small. No eigenvalues !> were computed. !> Probable cause: your machine has sloppy !> floating-point arithmetic. !> Cure: Increase the PARAMETER , !> recompile, and try again. !> |
!> RELFAC REAL, default = 2.0e0 !> The relative tolerance. An interval (a,b] lies within !> if b-a < RELFAC*ulp*max(|a|,|b|), !> where is the machine precision (distance from 1 to !> the next larger floating point number.) !> !> FUDGE REAL, default = 2 !> A to widen the Gershgorin intervals. Ideally, !> a value of 1 should work, but on machines with sloppy !> arithmetic, this needs to be larger. The default for !> publicly released versions should be large enough to handle !> the worst machine around. Note that this has no effect !> on accuracy of the solution. !>
Definition at line 270 of file sstebz.f.
| subroutine sstedc | ( | character | compz, |
| integer | n, | ||
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| real, dimension( ldz, * ) | z, | ||
| integer | ldz, | ||
| real, dimension( * ) | work, | ||
| integer | lwork, | ||
| integer, dimension( * ) | iwork, | ||
| integer | liwork, | ||
| integer | info ) |
SSTEDC
Download SSTEDC + dependencies [TGZ] [ZIP] [TXT]
!> !> SSTEDC computes all eigenvalues and, optionally, eigenvectors of a !> symmetric tridiagonal matrix using the divide and conquer method. !> The eigenvectors of a full or band real symmetric matrix can also be !> found if SSYTRD or SSPTRD or SSBTRD has been used to reduce this !> matrix to tridiagonal form. !> !> This code makes very mild assumptions about floating point !> arithmetic. It will work on machines with a guard digit in !> add/subtract, or on those binary machines without guard digits !> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. !> It could conceivably fail on hexadecimal or decimal machines !> without guard digits, but we know of none. See SLAED3 for details. !>
| [in] | COMPZ | !> COMPZ is CHARACTER*1 !> = 'N': Compute eigenvalues only. !> = 'I': Compute eigenvectors of tridiagonal matrix also. !> = 'V': Compute eigenvectors of original dense symmetric !> matrix also. On entry, Z contains the orthogonal !> matrix used to reduce the original matrix to !> tridiagonal form. !> |
| [in] | N | !> N is INTEGER !> The dimension of the symmetric tridiagonal matrix. N >= 0. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the diagonal elements of the tridiagonal matrix. !> On exit, if INFO = 0, the eigenvalues in ascending order. !> |
| [in,out] | E | !> E is REAL array, dimension (N-1) !> On entry, the subdiagonal elements of the tridiagonal matrix. !> On exit, E has been destroyed. !> |
| [in,out] | Z | !> Z is REAL array, dimension (LDZ,N) !> On entry, if COMPZ = 'V', then Z contains the orthogonal !> matrix used in the reduction to tridiagonal form. !> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the !> orthonormal eigenvectors of the original symmetric matrix, !> and if COMPZ = 'I', Z contains the orthonormal eigenvectors !> of the symmetric tridiagonal matrix. !> If COMPZ = 'N', then Z is not referenced. !> |
| [in] | LDZ | !> LDZ is INTEGER !> The leading dimension of the array Z. LDZ >= 1. !> If eigenvectors are desired, then LDZ >= max(1,N). !> |
| [out] | WORK | !> WORK is REAL array, dimension (MAX(1,LWORK)) !> On exit, if INFO = 0, WORK(1) returns the optimal LWORK. !> |
| [in] | LWORK | !> LWORK is INTEGER !> The dimension of the array WORK. !> If COMPZ = 'N' or N <= 1 then LWORK must be at least 1. !> If COMPZ = 'V' and N > 1 then LWORK must be at least !> ( 1 + 3*N + 2*N*lg N + 4*N**2 ), !> where lg( N ) = smallest integer k such !> that 2**k >= N. !> If COMPZ = 'I' and N > 1 then LWORK must be at least !> ( 1 + 4*N + N**2 ). !> Note that for COMPZ = 'I' or 'V', then if N is less than or !> equal to the minimum divide size, usually 25, then LWORK need !> only be max(1,2*(N-1)). !> !> If LWORK = -1, then a workspace query is assumed; the routine !> only calculates the optimal size of the WORK array, returns !> this value as the first entry of the WORK array, and no error !> message related to LWORK is issued by XERBLA. !> |
| [out] | IWORK | !> IWORK is INTEGER array, dimension (MAX(1,LIWORK)) !> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. !> |
| [in] | LIWORK | !> LIWORK is INTEGER !> The dimension of the array IWORK. !> If COMPZ = 'N' or N <= 1 then LIWORK must be at least 1. !> If COMPZ = 'V' and N > 1 then LIWORK must be at least !> ( 6 + 6*N + 5*N*lg N ). !> If COMPZ = 'I' and N > 1 then LIWORK must be at least !> ( 3 + 5*N ). !> Note that for COMPZ = 'I' or 'V', then if N is less than or !> equal to the minimum divide size, usually 25, then LIWORK !> need only be 1. !> !> If LIWORK = -1, then a workspace query is assumed; the !> routine only calculates the optimal size of the IWORK array, !> returns this value as the first entry of the IWORK array, and !> no error message related to LIWORK is issued by XERBLA. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !> > 0: The algorithm failed to compute an eigenvalue while !> working on the submatrix lying in rows and columns !> INFO/(N+1) through mod(INFO,N+1). !> |
Definition at line 186 of file sstedc.f.
| subroutine ssteqr | ( | character | compz, |
| integer | n, | ||
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| real, dimension( ldz, * ) | z, | ||
| integer | ldz, | ||
| real, dimension( * ) | work, | ||
| integer | info ) |
SSTEQR
Download SSTEQR + dependencies [TGZ] [ZIP] [TXT]
!> !> SSTEQR computes all eigenvalues and, optionally, eigenvectors of a !> symmetric tridiagonal matrix using the implicit QL or QR method. !> The eigenvectors of a full or band symmetric matrix can also be found !> if SSYTRD or SSPTRD or SSBTRD has been used to reduce this matrix to !> tridiagonal form. !>
| [in] | COMPZ | !> COMPZ is CHARACTER*1 !> = 'N': Compute eigenvalues only. !> = 'V': Compute eigenvalues and eigenvectors of the original !> symmetric matrix. On entry, Z must contain the !> orthogonal matrix used to reduce the original matrix !> to tridiagonal form. !> = 'I': Compute eigenvalues and eigenvectors of the !> tridiagonal matrix. Z is initialized to the identity !> matrix. !> |
| [in] | N | !> N is INTEGER !> The order of the matrix. N >= 0. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the diagonal elements of the tridiagonal matrix. !> On exit, if INFO = 0, the eigenvalues in ascending order. !> |
| [in,out] | E | !> E is REAL array, dimension (N-1) !> On entry, the (n-1) subdiagonal elements of the tridiagonal !> matrix. !> On exit, E has been destroyed. !> |
| [in,out] | Z | !> Z is REAL array, dimension (LDZ, N) !> On entry, if COMPZ = 'V', then Z contains the orthogonal !> matrix used in the reduction to tridiagonal form. !> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the !> orthonormal eigenvectors of the original symmetric matrix, !> and if COMPZ = 'I', Z contains the orthonormal eigenvectors !> of the symmetric tridiagonal matrix. !> If COMPZ = 'N', then Z is not referenced. !> |
| [in] | LDZ | !> LDZ is INTEGER !> The leading dimension of the array Z. LDZ >= 1, and if !> eigenvectors are desired, then LDZ >= max(1,N). !> |
| [out] | WORK | !> WORK is REAL array, dimension (max(1,2*N-2)) !> If COMPZ = 'N', then WORK is not referenced. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: the algorithm has failed to find all the eigenvalues in !> a total of 30*N iterations; if INFO = i, then i !> elements of E have not converged to zero; on exit, D !> and E contain the elements of a symmetric tridiagonal !> matrix which is orthogonally similar to the original !> matrix. !> |
Definition at line 130 of file ssteqr.f.
| subroutine ssterf | ( | integer | n, |
| real, dimension( * ) | d, | ||
| real, dimension( * ) | e, | ||
| integer | info ) |
SSTERF
Download SSTERF + dependencies [TGZ] [ZIP] [TXT]
!> !> SSTERF computes all eigenvalues of a symmetric tridiagonal matrix !> using the Pal-Walker-Kahan variant of the QL or QR algorithm. !>
| [in] | N | !> N is INTEGER !> The order of the matrix. N >= 0. !> |
| [in,out] | D | !> D is REAL array, dimension (N) !> On entry, the n diagonal elements of the tridiagonal matrix. !> On exit, if INFO = 0, the eigenvalues in ascending order. !> |
| [in,out] | E | !> E is REAL array, dimension (N-1) !> On entry, the (n-1) subdiagonal elements of the tridiagonal !> matrix. !> On exit, E has been destroyed. !> |
| [out] | INFO | !> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: the algorithm failed to find all of the eigenvalues in !> a total of 30*N iterations; if INFO = i, then i !> elements of E have not converged to zero. !> |
Definition at line 85 of file ssterf.f.