doubleOTHEReigen(3)
๐ doubleOTHEReigen(3) โ LAPACK ๐
โจ NAME โจ
doubleOTHEReigen โ double
๐ฆ SYNOPSIS ๐ฆ
okay so here's the whole squad of functions on this page, bestie:
Functions
dbdsvdxโsubroutine dbdsvdx (UPLO, JOBZ, RANGE, N, D, E, VL, VU, IL, IU, NS, S, Z, LDZ, WORK, IWORK, INFO)โDBDSVDXdggglmโsubroutine dggglm (N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK, INFO)โDGGGLMdsbevโsubroutine dsbev (JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, INFO)โDSBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdsbev_2stageโsubroutine dsbev_2stage (JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, LWORK, INFO)โDSBEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdsbevdโsubroutine dsbevd (JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)โDSBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdsbevd_2stageโsubroutine dsbevd_2stage (JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)โDSBEVD_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdsbevxโsubroutine dsbevx (JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)โDSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdsbevx_2stageโsubroutine dsbevx_2stage (JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO)โDSBEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdsbgvโsubroutine dsbgv (JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z, LDZ, WORK, INFO)โDSBGVdsbgvdโsubroutine dsbgvd (JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)โDSBGVDdsbgvxโsubroutine dsbgvx (JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)โDSBGVXdspevโsubroutine dspev (JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO)โDSPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdspevdโsubroutine dspevd (JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)โDSPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdspevxโsubroutine dspevx (JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)โDSPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdspgvโsubroutine dspgv (ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK, INFO)โDSPGVdspgvdโsubroutine dspgvd (ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)โDSPGVDdspgvxโsubroutine dspgvx (ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)โDSPGVXdstevโsubroutine dstev (JOBZ, N, D, E, Z, LDZ, WORK, INFO)โDSTEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdstevdโsubroutine dstevd (JOBZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)โDSTEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdstevrโsubroutine dstevr (JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO)โDSTEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matricesdstevxโsubroutine dstevx (JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)โDSTEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
๐ Detailed Description ๐
This is the group of double Other Eigenvalue routines ๐
๐ Function Documentation ๐
๐ง subroutine dbdsvdx ๐ง
subroutine dbdsvdx (character UPLO, character JOBZ, character RANGE, integer
N, double precision, dimension( * ) D, double precision, dimension( * )
E, double precision VL, double precision VU, integer IL, integer IU,
integer NS, double precision, dimension( * ) S, double precision,
dimension( ldz, * ) Z, integer LDZ, double precision, dimension( * )
WORK, integer, dimension( * ) IWORK, integer INFO)
DBDSVDX
โจ Purpose โจ
okay bestie, DBDSVDX computes the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B, B = U * S * VT, 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. ๐
Given an upper bidiagonal B with diagonal D = [ d_1 d_2 ... d_N ] and superdiagonal E = [ e_1 e_2 ... e_N-1 ], DBDSVDX computes the singular value decomposition of B through the eigenvalues and eigenvectors of the N*2-by-N*2 tridiagonal matrix
| 0 d_1 |
| d_1 0 e_1 |
TGK = | e_1 0 d_2 |
| d_2 . . |
| . . . |
If (s,u,v) is a singular triplet of B with ||u|| = ||v|| = 1, then (+/-s,q), ||q|| = 1, are eigenpairs of TGK, with q = P * ( u' +/-v' ) / sqrt(2) = ( v_1 u_1 v_2 u_2 ... v_n u_n ) / sqrt(2), and P = [ e_{n+1} e_{1} e_{n+2} e_{2} ... ].
Given a TGK matrix, one can either a) compute -s,-v and change signs so that the singular values (and corresponding vectors) are already in descending order (as in DGESVD/DGESDD) or b) compute s,v and reorder the values (and corresponding vectors). DBDSVDX implements a) by calling DSTEVX (bisection plus inverse iteration, to be replaced with a version of the Multiple Relative Robust Representation algorithm. (See P. Willems and B. Lang, A framework for the MR^3 algorithm: theory and implementation, SIAM J. Sci. Comput., 35:740-766, 2013.)
๐ Parameters ๐
UPLOโUPLOisCHARACTER*1= 'U':B is upper bidiagonal;= 'L':B is lower bidiagonal.
JOBZโJOBZisCHARACTER*1= 'N':Compute singular values only;= 'V':Compute singular values and singular vectors.
RANGEโRANGEisCHARACTER*1= 'A':all singular values will be found.= 'V':all singular values in the half-open interval[VL,VU)will be found.= 'I':theIL-th throughIU-th singular values will be found.
NโNisINTEGERThe order of the bidiagonal matrix.N >= 0.DโDisDOUBLE PRECISIONarray, dimension(N)Thendiagonal elements of the bidiagonal matrix B.EโEisDOUBLE PRECISIONarray, dimension(max(1,N-1))The(n-1)superdiagonal elements of the bidiagonal matrix B in elements1toN-1.VLโVLisDOUBLE PRECISIONIfRANGE='V', the lower bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'.VUโVUisDOUBLE PRECISIONIfRANGE='V', the upper bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'.ILโILisINTEGERIfRANGE='I', the index of the smallest singular value to be returned.1 <= IL <= IU <= min(M,N), if min(M,N) > 0. Not referenced ifRANGE = 'A'or'V'.IUโIUisINTEGERIfRANGE='I', the index of the largest singular value to be returned.1 <= IL <= IU <= min(M,N), if min(M,N) > 0. Not referenced ifRANGE = 'A'or'V'.NSโNSisINTEGERThe total number of singular values found.0 <= NS <= N. IfRANGE = 'A',NS = N, and ifRANGE = 'I',NS = IU-IL+1.SโSisDOUBLE PRECISIONarray, dimension(N)The firstNSelements contain the selected singular values in ascending order.ZโZisDOUBLE PRECISIONarray, dimension(2*N,K)IfJOBZ = 'V', then ifINFO = 0the firstNScolumns ofZcontain the singular vectors of the matrix B corresponding to the selected singular values, with U in rows1toNand V in rowsN+1toN*2, i.e.
Z = [ U ]
[ V ]
If JOBZ = 'N', then Z is not referenced. Note: The user must ensure that at least K = NS+1 columns are supplied in the array Z; if RANGE = 'V', the exact value of NS is not known in advance and an upper bound must be used.
LDZโLDZisINTEGERThe leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(2,N*2).WORKโWORKisDOUBLE PRECISIONarray, dimension(14*N)IWORKโIWORKisINTEGERarray, dimension(12*N)IfJOBZ = 'V', then ifINFO = 0, the firstNSelements ofIWORKare zero. IfINFO > 0, thenIWORKcontains the indices of the eigenvectors that failed to converge inDSTEVX.INFOโINFOisINTEGER= 0:successful exit< 0:ifINFO = -i, thei-th argument had an illegal value> 0:ifINFO = i, thenieigenvectors failed to converge inDSTEVX. The indices of the eigenvectors (as returned byDSTEVX) are stored in the arrayIWORK.- if
INFO = N*2 + 1, an internal error occurred.
- if
๐ธ Author ๐ธ
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ง subroutine dggglm ๐ง
subroutine dggglm (integer N, integer M, integer P, double precision,
dimension( lda, * ) A, integer LDA, double precision, dimension( ldb, *
) B, integer LDB, double precision, dimension( * ) D, double precision,
dimension( * ) X, double precision, dimension( * ) Y, double precision,
dimension( * ) WORK, integer LWORK, integer INFO)
DGGGLM
โจ Purpose โจ
DGGGLM solves a general Gauss-Markov linear model (GLM) problem:
minimize || y ||_2 subject to d = A*x + B*y
x
where A is an N-by-M matrix, B is an N-by-P matrix, and d is a given N-vector. It is assumed that M <= N <= M+P, and
rank(A) = M and rank( A B ) = N.
Under these assumptions, the constrained equation is always consistent ๐, and there's a unique solution x plus a minimal 2-norm solution y, and you get them using a generalized QR factorization of the matrices (A, B), which looks like this bestie:
A = Q*(R), B = Q*T*Z.
(0)
In particular, if the matrix B is square nonsingular, then the problem GLM is literally equivalent to this weighted linear least squares problem:
minimize || inv(B)*(d-A*x) ||_2
x
where inv(B) means the inverse of B. Slay. ๐
โจ Parameters โจ
NโN is INTEGER
The number of rows of the matrices A and B. N >= 0.
MโM is INTEGER
The number of columns of the matrix A. 0 <= M <= N.
PโP is INTEGER
The number of columns of the matrix B. P >= N-M.
AโA is DOUBLE PRECISION array, dimension (LDA,M)
On entry, the N-by-M matrix A.
On exit, the upper triangular part of the array A contains the M-by-M upper triangular matrix R. ๐
LDAโLDA is INTEGER
The leading dimension of the array A. LDA >= max(1,N).
BโB is DOUBLE PRECISION array, dimension (LDB,P)
On entry, the N-by-P matrix B.
On exit, if N <= P, the upper triangle of the subarray B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T; if N > P, the elements on and above the (N-P)th subdiagonal contain the N-by-P upper trapezoidal matrix T. ๐ฆ
LDBโLDB is INTEGER
The leading dimension of the array B. LDB >= max(1,N).
DโD is DOUBLE PRECISION array, dimension (N)
On entry, D is the left hand side of the GLM equation.
On exit, D is destroyed. ๐ rip bestie, it gave everything it had.
XโX is DOUBLE PRECISION array, dimension (M)YโY is DOUBLE PRECISION array, dimension (P)
On exit, X and Y are the solutions of the GLM problem. โจ
WORKโWORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
LWORKโLWORK is INTEGER
The dimension of the array WORK. LWORK >= max(1,N+M+P).
For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB, where NB is an upper bound for the optimal blocksizes for DGEQRF, SGERQF, DORMQR and SORMRQ.
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. cute, right?
INFOโINFO is INTEGER= 0: successful exit. ๐< 0: ifINFO = -i, thei-th argument had an illegal value.= 1: the upper triangular factorRassociated withAin the generalized QR factorization of the pair(A, B)is singular, so thatrank(A) < M; the least squares solution could not be computed. ๐ญ= 2: the bottom (N-M) by (N-M) part of the upper trapezoidal factorTassociated withBin the generalized QR factorization of the pair(A, B)is singular, so thatrank( A B ) < N; the least squares solution could not be computed. ๐ญ
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
subroutine dsbev
subroutine dsbev (character JOBZ, character UPLO, integer N, integer KD,
double precision, dimension( ldab, * ) AB, integer LDAB, double
precision, dimension( * ) W, double precision, dimension( ldz, * ) Z,
integer LDZ, double precision, dimension( * ) WORK, integer INFO)
DSBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices.
Purpose
DSBEV computes all the eigenvalues and, optionally, eigenvectors of a real symmetric band matrix A. ๐ธ
Parameters
JOBZโJOBZ is CHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOโUPLO is CHARACTER*1= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NโN is INTEGER
The order of the matrix A. N >= 0.
KDโKD is INTEGER
The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0.
ABโAB is DOUBLE PRECISION array, dimension (LDAB, N)
On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
On exit, AB is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T are returned in rows KD and KD+1 of AB, and if UPLO = 'L', the diagonal and first subdiagonal of T are returned in the first two rows of AB. ๐
LDABโLDAB is INTEGER
The leading dimension of the array AB. LDAB >= KD + 1.
WโW is DOUBLE PRECISION array, dimension (N)
If INFO = 0, the eigenvalues in ascending order. โญ
ZโZ is DOUBLE PRECISION array, dimension (LDZ, N)
If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal eigenvectors of the matrix A, with the i-th column of Z holding the eigenvector associated with W(i).
If JOBZ = 'N', then Z is not referenced.
LDZโLDZ is INTEGER
The leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N).
WORKโWORK is DOUBLE PRECISION array, dimension (max(1,3*N-2))INFOโINFO is INTEGER= 0: successful exit ๐< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
subroutine dsbev_2stage
subroutine dsbev_2stage (character JOBZ, character UPLO, integer N, integer
KD, double precision, dimension( ldab, * ) AB, integer LDAB, double
precision, dimension( * ) W, double precision, dimension( ldz, * ) Z,
integer LDZ, double precision, dimension( * ) WORK, integer LWORK,
integer INFO)
DSBEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices.
Purpose
DSBEV_2STAGE computes all the eigenvalues and, optionally, eigenvectors of a real symmetric band matrix A using the 2stage technique for the reduction to tridiagonal. ๐ฅ
Parameters
JOBZโJOBZ is CHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors. Not available in this release.
UPLOโUPLO is CHARACTER*1= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NโN is INTEGER
The order of the matrix A. N >= 0.
KDโKD is INTEGER
The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0.
ABโAB is DOUBLE PRECISION array, dimension (LDAB, N)
On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
On exit, AB is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T are returned in rows KD and KD+1 of AB, and if UPLO = 'L', the diagonal and first subdiagonal of T are returned in the first two rows of AB. ๐
LDABโLDAB is INTEGER
The leading dimension of the array AB. LDAB >= KD + 1.
WโW is DOUBLE PRECISION array, dimension (N)
If INFO = 0, the eigenvalues in ascending order. โญ
ZโZ is DOUBLE PRECISION array, dimension (LDZ, N)
If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal eigenvectors of the matrix A, with the i-th column of Z holding the eigenvector associated with W(i).
If JOBZ = 'N', then Z is not referenced.
LDZโLDZ is INTEGER
The leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N).
WORKโWORK is DOUBLE PRECISION array, dimension LWORK
On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
LWORK
okay bestie we are still in the parameter list, do not scroll away, this is the good part ๐
LWORKโLWORK is INTEGER. It's the length of the arrayWORK.LWORK >= 1, when N <= 1; otherwise ๐- If
JOBZ = 'N'andN > 1,LWORKmust be queried. No guessing, fr fr. LWORK = MAX(1, dimension)wheredimension = (2KD+1)*N + KD*NTHREADS + N- where
KDis the size of the band. NTHREADSis the number of threads used when openMP compilation is enabled, otherwise=1.- If
JOBZ = 'V'andN > 1,LWORKmust be queried. Not yet available. ๐ sorry bestie. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.
- If
INFOโINFO is INTEGER, the receipts ๐งพ= 0:successful exit โจ< 0:ifINFO = -i, the i-th argument had an illegal value ๐> 0:ifINFO = i, the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero. it just kept going and going and going
๐ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ Further Details:
All details about the 2stage techniques are available in:
- Azzam Haidar, Hatem Ltaief, and Jack Dongarra. Parallel reduction to condensed forms for symmetric eigenvalue problems using aggregated fine-grained and memory-aware kernels. In Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC '11), New York, NY, USA, Article 8 , 11 pages. http://doi.acm.org/10.1145/2063384.2063394
- A. Haidar, J. Kurzak, P. Luszczek, 2013. An improved parallel singular value algorithm and its implementation for multicore hardware, In Proceedings of 2013 International Conference for High Performance Computing, Networking, Storage and Analysis (SC '13). Denver, Colorado, USA, 2013. Article 90, 12 pages. http://doi.acm.org/10.1145/2503210.2503292
- A. Haidar, R. Solca, S. Tomov, T. Schulthess and J. Dongarra. A novel hybrid CPU-GPU generalized eigensolver for electronic structure calculations based on fine-grained memory aware tasks. International Journal of High Performance Computing Applications. Volume 28 Issue 2, Pages 196-209, May 2014. http://hpc.sagepub.com/content/28/2/196
๐ธ subroutine dsbevd ๐ธ
subroutine dsbevd (character JOBZ, character UPLO, integer N, integer KD,
double precision, dimension( ldab, * ) AB, integer LDAB, double
precision, dimension( * ) W, double precision, dimension( ldz, * ) Z,
integer LDZ, double precision, dimension( * ) WORK, integer LWORK,
integer, dimension( * ) IWORK, integer LIWORK, integer INFO)
DSBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices ๐ฆ
Purpose:
DSBEVD computes all the eigenvalues and, optionally, eigenvectors of a real symmetric band matrix A. If eigenvectors are desired, it uses a divide and conquer algorithm.
The divide and conquer algorithm 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. (iconic behaviour, honestly)
Parameters
JOBZโJOBZ is CHARACTER*1= 'N':Compute eigenvalues only;= 'V':Compute eigenvalues and eigenvectors.
UPLOโUPLO is CHARACTER*1= 'U':Upper triangle of A is stored;= 'L':Lower triangle of A is stored.
NโN is INTEGER. The order of the matrix A.N >= 0.KDโKD is INTEGER. The number of superdiagonals of the matrix A ifUPLO = 'U', or the number of subdiagonals ifUPLO = 'L'.KD >= 0.ABโAB is DOUBLE PRECISION array, dimension (LDAB, N). On entry, the upper or lower triangle of the symmetric band matrix A, stored in the firstKD+1rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
On exit, AB is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T are returned in rows KD and KD+1 of AB, and if UPLO = 'L', the diagonal and first subdiagonal of T are returned in the first two rows of AB. she's not the same matrix she was when she came in ๐
LDABโLDAB is INTEGER. The leading dimension of the array AB.LDAB >= KD + 1.WโW is DOUBLE PRECISION array, dimension (N). IfINFO = 0, the eigenvalues in ascending order. โญZโZ is DOUBLE PRECISION array, dimension (LDZ, N). IfJOBZ = 'V', then ifINFO = 0, Z contains the orthonormal eigenvectors of the matrix A, with the i-th column of Z holding the eigenvector associated withW(i). IfJOBZ = 'N', then Z is not referenced. (ghosted, respectfully)LDZโLDZ is INTEGER. The leading dimension of the array Z.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKโWORK is DOUBLE PRECISION array, dimension (LWORK). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKโLWORK is INTEGER. The dimension of the array WORK.IF N <= 1, LWORK must be at least 1.- If
JOBZ = 'N'andN > 2,LWORKmust be at least2*N. - If
JOBZ = 'V'andN > 2,LWORKmust be at least( 1 + 5*N + 2*N**2 ). - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORKandIWORKarrays, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA.
IWORKโIWORK is INTEGER array, dimension (MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the optimalLIWORK.LIWORKโLIWORK is INTEGER. The dimension of the array IWORK.- If
JOBZ = 'N'orN <= 1,LIWORKmust be at least1. - If
JOBZ = 'V'andN > 2,LIWORKmust be at least3 + 5*N. - If
LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORKandIWORKarrays, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA.
- If
INFOโINFO is INTEGER= 0:successful exit โจ< 0:ifINFO = -i, the i-th argument had an illegal value ๐> 0:ifINFO = i, the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero.
๐ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ฆ subroutine dsbevd_2stage ๐ฆ
subroutine dsbevd_2stage (character JOBZ, character UPLO, integer N, integer
KD, double precision, dimension( ldab, * ) AB, integer LDAB, double
precision, dimension( * ) W, double precision, dimension( ldz, * ) Z,
integer LDZ, double precision, dimension( * ) WORK, integer LWORK,
integer, dimension( * ) IWORK, integer LIWORK, integer INFO)
DSBEVD_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices ๐
Purpose:
DSBEVD_2STAGE computes all the eigenvalues and, optionally, eigenvectors of a real symmetric band matrix A using the 2stage technique for the reduction to tridiagonal. If eigenvectors are desired, it uses a divide and conquer algorithm. two stages, zero regrets
The divide and conquer algorithm 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.
Parameters
JOBZโJOBZ is CHARACTER*1= 'N':Compute eigenvalues only;= 'V':Compute eigenvalues and eigenvectors. Not available in this release. ๐ญ she said "not yet" and meant it
UPLOโUPLO is CHARACTER*1= 'U':Upper triangle of A is stored;= 'L':Lower triangle of A is stored.
NโN is INTEGER. The order of the matrix A.N >= 0.KDโKD is INTEGER. The number of superdiagonals of the matrix A ifUPLO = 'U', or the number of subdiagonals ifUPLO = 'L'.KD >= 0.ABโAB is DOUBLE PRECISION array, dimension (LDAB, N). On entry, the upper or lower triangle of the symmetric band matrix A, stored in the firstKD+1rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
On exit, AB is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T are returned in rows KD and KD+1 of AB, and if UPLO = 'L', the diagonal and first subdiagonal of T are returned in the first two rows of AB.
LDABLDABโ INTEGER energy โจ this is the leading dimension of the arrayAB. So like,LDAB >= KD + 1, no exceptions bestie ๐Wโ DOUBLE PRECISION array, dimension (N). IfINFO = 0, this bad boy holds the eigenvalues in ascending order ๐Zโ DOUBLE PRECISION array, dimension (LDZ, N). IfJOBZ = 'V', then whenINFO = 0,Zcontains the orthonormal eigenvectors of the matrix A, and the i-th column ofZis holding the eigenvector that goes withW(i)๐ซถ. IfJOBZ = 'N'? ThenZis literally not referenced, she's off the clock ๐LDZโ INTEGER, the leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V', thenLDZ >= max(1,N)๐ธWORKโ DOUBLE PRECISION array, dimension LWORK. On exit, ifINFO = 0,WORK(1)returns the optimal LWORK โญLWORKโ INTEGER, the length of the arrayWORK.LWORK >= 1, whenN <= 1; otherwise:
If JOBZ = 'N' and N > 1, LWORK must be queried.
LWORK = MAX(1, dimension) where
dimension = (2KD+1)*N + KD*NTHREADS + N
where KD is the size of the band.
NTHREADS is the number of threads used when
openMP compilation is enabled, otherwise =1.
If JOBZ = 'V' and N > 1, LWORK must be queried. Not yet available ๐
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA. Sneaky little peek, no drama ๐
IWORKโ INTEGER array, dimension (MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the optimal LIWORK โจLIWORKโ INTEGER, the dimension of the arrayIWORK. IfJOBZ = 'N'orN <= 1,LIWORKmust be at least 1. IfJOBZ = 'V'andN > 2,LIWORKmust be at least3 + 5*N๐
If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA. Same vibe, different array ๐
INFOโ INTEGER, the receipts ๐= 0: successful exit, we ate ๐< 0: ifINFO = -i, the i-th argument had an illegal value ๐ญ> 0: ifINFO = i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero ๐
Author ๐
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details: ๐ฆ
All details about the 2stage techniques are available in:
Azzam Haidar, Hatem Ltaief, and Jack Dongarra. Parallel reduction to condensed forms for symmetric eigenvalue problems using aggregated fine-grained and memory-aware kernels. In Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC '11), New York, NY, USA, Article 8 , 11 pages. http://doi.acm.org/10.1145/2063384.2063394
A. Haidar, J. Kurzak, P. Luszczek, 2013. An improved parallel singular value algorithm and its implementation for multicore hardware, In Proceedings of 2013 International Conference for High Performance Computing, Networking, Storage and Analysis (SC '13). Denver, Colorado, USA, 2013. Article 90, 12 pages. http://doi.acm.org/10.1145/2503210.2503292
A. Haidar, R. Solca, S. Tomov, T. Schulthess and J. Dongarra. A novel hybrid CPU-GPU generalized eigensolver for electronic structure calculations based on fine-grained memory aware tasks. International Journal of High Performance Computing Applications. Volume 28 Issue 2, Pages 196-209, May 2014. http://hpc.sagepub.com/content/28/2/196
subroutine dsbevx (character JOBZ, character RANGE, character UPLO, integer N, integer KD, double precision, dimension( ldab, * ) AB, integer LDAB, double precision, dimension( ldq, * ) Q, integer LDQ, double precision VL, double precision VU, integer IL, integer IU, double precision ABSTOL, integer M, double precision, dimension( * ) W, double precision, dimension( ldz, * ) Z, integer LDZ, double precision, dimension( * ) WORK, integer, dimension( * ) IWORK, integer, dimension( * ) IFAIL, integer INFO)
DSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices ๐
Purpose: โจ
DSBEVX computes selected eigenvalues and, optionally, eigenvectors of a real symmetric band matrix A. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. Choose your own adventure, bestie ๐
Parameters ๐ธ
JOBZโJOBZis CHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGEโRANGEis 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 will be found.
UPLOโUPLOis CHARACTER*1= 'U': Upper triangle of A is stored;= 'L': Lower triangle of A is stored.
NโNis INTEGER. The order of the matrix A.N >= 0.KDโKDis INTEGER. The number of superdiagonals of the matrix A ifUPLO = 'U', or the number of subdiagonals ifUPLO = 'L'.KD >= 0.ABโABis DOUBLE PRECISION array, dimension (LDAB, N). On entry, the upper or lower triangle of the symmetric band matrix A, stored in the firstKD+1rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:- if
UPLO = 'U',AB(kd+1+i-j,j) = A(i,j)formax(1,j-kd)<=i<=j; - if
UPLO = 'L',AB(1+i-j,j) = A(i,j)forj<=i<=min(n,j+kd).
- if
On exit, AB is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T are returned in rows KD and KD+1 of AB, and if UPLO = 'L', the diagonal and first subdiagonal of T are returned in the first two rows of AB. She changes outfits on the way out ๐
LDABโLDABis INTEGER. The leading dimension of the array AB.LDAB >= KD + 1.QโQis DOUBLE PRECISION array, dimension (LDQ, N).- If
JOBZ = 'V', the N-by-N orthogonal matrix used in the reduction to tridiagonal form. - If
JOBZ = 'N', the array Q is not referenced.
- If
LDQโLDQis INTEGER. The leading dimension of the array Q. IfJOBZ = 'V', thenLDQ >= max(1,N).VLโVLis DOUBLE PRECISION. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'๐ฆVUโVUis DOUBLE PRECISION. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'๐ฆILโILis INTEGER. IfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUโIUis INTEGER. IfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLโABSTOLis DOUBLE PRECISION. The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AB to tridiagonal form.
Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*DLAMCH('S'). Lowkey important, don't skip this part ๐ญ
See 'Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy,' by Demmel and Kahan, LAPACK Working Note #3.
MโMis INTEGER. The total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1๐งฎWโWis DOUBLE PRECISION array, dimension (N). The first M elements contain the selected eigenvalues in ascending order ๐Zโ
Z
Z is a DOUBLE PRECISION array, dimension (LDZ, max(1,M)). okay bestie listen โ if JOBZ = 'V', then when INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of matrix A that match the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). If an eigenvector fails to converge, that column of Z contains the latest approximation to the eigenvector, and the index of that eigenvector is returned in IFAIL. If JOBZ = 'N', then Z is not referenced at all. Note: the user must ensure that at least max(1,M) columns are supplied in the array Z; if RANGE = 'V', the exact value of M is not known in advance and an upper bound must be used. no cap, plan ahead ๐
LDZ
LDZ is INTEGER. The leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N).
WORK
WORK is DOUBLE PRECISION array, dimension (7*N).
IWORK
IWORK is INTEGER array, dimension (5*N).
IFAIL
IFAIL is INTEGER array, dimension (N). If JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge. If JOBZ = 'N', then IFAIL is not referenced.
INFO
INFO is INTEGER.
= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: ifINFO = i, then i eigenvectors failed to converge. Their indices are stored in arrayIFAIL.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
subroutine dsbevx_2stage (...)
subroutine dsbevx_2stage (character JOBZ, character RANGE, character UPLO,
integer N, integer KD, double precision, dimension( ldab, * ) AB,
integer LDAB, double precision, dimension( ldq, * ) Q, integer LDQ,
double precision VL, double precision VU, integer IL, integer IU, double
precision ABSTOL, integer M, double precision, dimension( * ) W, double
precision, dimension( ldz, * ) Z, integer LDZ, double precision,
dimension( * ) WORK, integer LWORK, integer, dimension( * ) IWORK,
integer, dimension( * ) IFAIL, integer INFO)
DSBEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices. iconic behavior honestly โจ
Purpose
DSBEVX_2STAGE computes selected eigenvalues and, optionally, eigenvectors of a real symmetric band matrix A using the 2stage technique for the reduction to tridiagonal. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.
Parameters
JOBZโJOBZisCHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors. Not available in this release.
RANGEโRANGEisCHARACTER*1= 'A': all eigenvalues will be found;= 'V': all eigenvalues in the half-open interval(VL,VU]will be found;= 'I': theIL-th throughIU-th eigenvalues will be found.
UPLOโUPLOisCHARACTER*1= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NโNisINTEGER. The order of the matrixA.N >= 0.KDโKDisINTEGER. The number of superdiagonals of the matrixAifUPLO = 'U', or the number of subdiagonals ifUPLO = 'L'.KD >= 0.ABโABisDOUBLE PRECISIONarray, dimension(LDAB, N). On entry, the upper or lower triangle of the symmetric band matrixA, stored in the firstKD+1rows of the array. The j-th column ofAis stored in the j-th column of the arrayABas follows:- if
UPLO = 'U',AB(kd+1+i-j,j) = A(i,j)formax(1,j-kd)<=i<=j; - if
UPLO = 'L',AB(1+i-j,j) = A(i,j)forj<=i<=min(n,j+kd).
- if
On exit, AB is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T are returned in rows KD and KD+1 of AB, and if UPLO = 'L', the diagonal and first subdiagonal of T are returned in the first two rows of AB.
LDABโLDABisINTEGER. The leading dimension of the arrayAB.LDAB >= KD + 1.QโQisDOUBLE PRECISIONarray, dimension(LDQ, N). IfJOBZ = 'V', theN-by-Northogonal matrix used in the reduction to tridiagonal form. IfJOBZ = 'N', the arrayQis not referenced.LDQโLDQisINTEGER. The leading dimension of the arrayQ. IfJOBZ = 'V', thenLDQ >= max(1,N).VLโVLisDOUBLE PRECISION. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUโVUisDOUBLE PRECISION. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.ILโILisINTEGER. IfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUโIUisINTEGER. IfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLโABSTOLisDOUBLE PRECISION. The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval[a,b]of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AB to tridiagonal form.
Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*DLAMCH('S').
See 'Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy,' by Demmel and Kahan, LAPACK Working Note #3.
MโMisINTEGER. The total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.WโWisDOUBLE PRECISIONarray, dimension(N). The firstMelements contain the selected eigenvalues in ascending order.ZโZisDOUBLE PRECISIONarray, dimension(LDZ, max(1,M)). IfJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with the i-th column ofZholding the eigenvector associated withW(i). If an eigenvector fails to converge, then that column ofZcontains the latest approximation to the eigenvector, and the index of the eigenvector is returned inIFAIL. IfJOBZ = 'N', thenZis not referenced. Note: the user must ensure that at leastmax(1,M)columns are supplied in the arrayZ; ifRANGE = 'V', the exact value ofMis not known in advance and an upper bound must be used.LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKโWORKisDOUBLE PRECISIONarray, dimension(LWORK).LWORKโLWORKisINTEGER. The length of the arrayWORK.LWORK >= 1, whenN <= 1; otherwise IfJOBZ = 'N'andN > 1,LWORKmust be queried.
LWORK = MAX(1, 7*N, dimension) where
dimension = (2KD+1)*N + KD*NTHREADS + 2*N
where KD is the size of the band.
NTHREADS is the number of threads used when
openMP compilation is enabled, otherwise =1.
If JOBZ = 'V' and N > 1, LWORK must be queried. Not yet available
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
IWORKโIWORKisINTEGERarray, dimension(5*N).IFAILโIFAILisINTEGERarray, dimension(N). IfJOBZ = 'V', then ifINFO = 0, the firstMelements ofIFAILare zero. IfINFO > 0, thenIFAILcontains the indices of the eigenvectors that failed to converge. IfJOBZ = 'N', thenIFAILis not referenced.INFOโINFOisINTEGER.= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: ifINFO = i, then i eigenvectors failed to converge. Their indices are stored in arrayIFAIL.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
All details about the 2stage techniques are available in:
- Azzam Haidar, Hatem Ltaief, and Jack Dongarra. Parallel reduction to condensed forms for symmetric eigenvalue problems using aggregated fine-grained and memory-aware kernels. In Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC '11), New York, NY, USA, Article 8 , 11 pages.
http://doi.acm.org/10.1145/2063384.2063394 - A. Haidar, J. Kurzak, P. Luszczek, 2013. An improved parallel singular value algorithm and its implementation for multicore hardware, In Proceedings of 2013 International Conference for High Performance Computing, Networking, Storage and Analysis (SC '13). Denver, Colorado, USA, 2013. Article 90, 12 pages.
http://doi.acm.org/10.1145/2503210.2503292 - A. Haidar, R. Solca, S. Tomov, T. Schulthess and J. Dongarra. A novel hybrid CPU-GPU generalized eigensolver for electronic structure calculations based on fine-grained memory aware tasks. International Journal of High Performance Computing Applications. Volume 28 Issue 2, Pages 196-209, May 2014.
http://hpc.sagepub.com/content/28/2/196
๐ DSBGV ๐
subroutine dsbgv (character JOBZ, character UPLO, integer N, integer KA,
integer KB, double precision, dimension( ldab, * ) AB, integer LDAB,
double precision, dimension( ldbb, * ) BB, integer LDBB, double
precision, dimension( * ) W, double precision, dimension( ldz, * ) Z,
integer LDZ, double precision, dimension( * ) WORK, integer INFO)
Purpose ๐
Bestie. DSBGV computes all the eigenvalues, and optionally the eigenvectors, of a real generalized symmetric-definite banded eigenproblem, of the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric and banded, and B is also positive definite. That's the whole vibe. โจ
Parameters
JOBZโJOBZisCHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOโUPLOisCHARACTER*1= 'U': Upper triangles ofAandBare stored;= 'L': Lower triangles ofAandBare stored.
NโNisINTEGER. The order of the matricesAandB.N >= 0.KAโKAisINTEGER. The number of superdiagonals of the matrixAifUPLO = 'U', or the number of subdiagonals ifUPLO = 'L'.KA >= 0.KBโKBisINTEGER. The number of superdiagonals of the matrixBifUPLO = 'U', or the number of subdiagonals ifUPLO = 'L'.KB >= 0.ABโABisDOUBLE PRECISIONarray, dimension(LDAB, N).
On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first ka+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
On exit, the contents of AB are destroyed. Gone. Ghosted. ๐ญ
LDABโLDABisINTEGER. The leading dimension of the arrayAB.LDAB >= KA+1.BBโBBisDOUBLE PRECISIONarray, dimension(LDBB, N).
On entry, the upper or lower triangle of the symmetric band matrix B, stored in the first kb+1 rows of the array. The j-th column of B is stored in the j-th column of the array BB as follows:
if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
On exit, the factor S from the split Cholesky factorization B = S**T*S, as returned by DPBSTF.
LDBBโLDBBisINTEGER. The leading dimension of the arrayBB.LDBB >= KB+1.WโWisDOUBLE PRECISIONarray, dimension(N). IfINFO = 0, the eigenvalues in ascending order.ZโZisDOUBLE PRECISIONarray, dimension(LDZ, N). IfJOBZ = 'V', then ifINFO = 0,Zcontains the matrixZof eigenvectors, with thei-th column ofZholding the eigenvector associated withW(i). The eigenvectors are normalized so thatZ**T*B*Z = I. IfJOBZ = 'N', thenZis not referenced. (She's off-duty, don't @ her. ๐ )LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= N.WORKโWORKisDOUBLE PRECISIONarray, dimension(3*N)INFOโINFOisINTEGER= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, andiis:<= N: the algorithm failed to converge:ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero;> N: ifINFO = N + i, for1 <= i <= N, thenDPBSTFreturnedINFO = i:Bis not positive definite. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
๐ฆ DSBGVD ๐ฆ
subroutine dsbgvd (character JOBZ, character UPLO, integer N, integer KA,
integer KB, double precision, dimension( ldab, * ) AB, integer LDAB,
double precision, dimension( ldbb, * ) BB, integer LDBB, double
precision, dimension( * ) W, double precision, dimension( ldz, * ) Z,
integer LDZ, double precision, dimension( * ) WORK, integer LWORK,
integer, dimension( * ) IWORK, integer LIWORK, integer INFO)
Purpose ๐
DSBGVD computes all the eigenvalues, and optionally the eigenvectors, of a real generalized symmetric-definite banded eigenproblem, of the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric and banded, and B is also positive definite. If eigenvectors are desired, it uses a divide and conquer algorithm. Slay. โจ
The divide and conquer algorithm 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.
Parameters
JOBZโJOBZisCHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOโUPLOisCHARACTER*1= 'U': Upper triangles ofAandBare stored;= 'L': Lower triangles ofAandBare stored.
NโNisINTEGER. The order of the matricesAandB.N >= 0.KAโKAisINTEGER. The number of superdiagonals of the matrixAifUPLO = 'U', or the number of subdiagonals ifUPLO = 'L'.KA >= 0.KBโKBisINTEGER. The number of superdiagonals of the matrixBifUPLO = 'U', or the number of subdiagonals ifUPLO = 'L'.KB >= 0.ABโABisDOUBLE PRECISIONarray, dimension(LDAB, N).
On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first ka+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
On exit, the contents of AB are destroyed. ๐ญ
LDABโLDABisINTEGER. The leading dimension of the arrayAB.LDAB >= KA+1.BBโBBisDOUBLE PRECISIONarray, dimension(LDBB, N).
On entry, the upper or lower triangle of the symmetric band matrix B, stored in the first kb+1 rows of the array. The j-th column of B is stored in the j-th column of the array BB as follows:
if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
On exit, the factor S from the split Cholesky factorization B = S**T*S, as returned by DPBSTF.
LDBBโLDBBisINTEGER. The leading dimension of the arrayBB.LDBB >= KB+1.WโWisDOUBLE PRECISIONarray, dimension(N). IfINFO = 0, the eigenvalues in ascending order.ZโZisDOUBLE PRECISIONarray, dimension(LDZ, N). IfJOBZ = 'V', then ifINFO = 0,Zcontains the matrixZof eigenvectors, with thei-th column ofZholding the eigenvector associated withW(i). The eigenvectors are normalized soZ**T*B*Z = I. IfJOBZ = 'N', thenZis not referenced.LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKโWORKisDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKโLWORKisINTEGER. The dimension of the arrayWORK.- If
N <= 1,LWORK >= 1. - If
JOBZ = 'N'andN > 1,LWORK >= 2*N. - If
JOBZ = 'V'andN > 1,LWORK >= 1 + 5*N + 2*N**2.
- If
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.
IWORKโIWORKisINTEGERarray, dimension(MAX(1,LIWORK)). On exit, ifLIWORK > 0,IWORK(1)returns the optimalLIWORK.LIWORKโLIWORKisINTEGER. The dimension of the arrayIWORK.- If
JOBZ = 'N'orN <= 1,LIWORK >= 1. - If
JOBZ = 'V'andN > 1,LIWORK >= 3 + 5*N.
- If
If LIWORK = -1, then a workspace query is assumed ๐ โ the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA. so like, it's a vibe check first, no yelling ๐
INFOโINFOisINTEGER= 0: successful exit โจ< 0: ifINFO = -i, the i-th argument had an illegal value ๐> 0: ifINFO = i, and i is:<= N: the algorithm failed to converge โ i off-diagonal elements of an intermediate tridiagonal form did not converge to zero ๐ญ> N: ifINFO = N + i, for1 <= i <= N, thenDPBSTFreturnedINFO = i: B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed ๐
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Contributors:
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
subroutine dsbgvx ๐
subroutine dsbgvx (character JOBZ, character RANGE, character UPLO, integer
N, integer KA, integer KB, double precision, dimension( ldab, * ) AB,
integer LDAB, double precision, dimension( ldbb, * ) BB, integer LDBB,
double precision, dimension( ldq, * ) Q, integer LDQ, double precision
VL, double precision VU, integer IL, integer IU, double precision
ABSTOL, integer M, double precision, dimension( * ) W, double precision,
dimension( ldz, * ) Z, integer LDZ, double precision, dimension( * )
WORK, integer, dimension( * ) IWORK, integer, dimension( * ) IFAIL,
integer INFO)
DSBGVX
Purpose:
DSBGVX computes selected eigenvalues, and optionally, eigenvectors of a real generalized symmetric-definite banded eigenproblem, of the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric and banded, and B is also positive definite ๐ซถ. Eigenvalues and eigenvectors can be selected by specifying either all eigenvalues, a range of values or a range of indices for the desired eigenvalues โ pick your fighter, bestie โจ
Parameters
JOBZโJOBZisCHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGEโRANGEisCHARACTER*1= 'A': all eigenvalues will be found.= 'V': all eigenvalues in the half-open interval(VL,VU]will be found.= 'I': theIL-th throughIU-th eigenvalues will be found.
UPLOโUPLOisCHARACTER*1= 'U': Upper triangles of A and B are stored;= 'L': Lower triangles of A and B are stored.
NโNisINTEGER
The order of the matrices A and B. N >= 0.
KAโKAisINTEGER
The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KA >= 0.
KBโKBisINTEGER
The number of superdiagonals of the matrix B if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KB >= 0.
ABโABisDOUBLE PRECISIONarray, dimension(LDAB, N)
On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first ka+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
On exit, the contents of AB are destroyed ๐ like bestie she does not come back the same.
LDABโLDABisINTEGER
The leading dimension of the array AB. LDAB >= KA+1.
BBโBBisDOUBLE PRECISIONarray, dimension(LDBB, N)
On entry, the upper or lower triangle of the symmetric band matrix B, stored in the first kb+1 rows of the array. The j-th column of B is stored in the j-th column of the array BB as follows:
if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
On exit, the factor S from the split Cholesky factorization B = S**T*S, as returned by DPBSTF.
LDBBโLDBBisINTEGER
The leading dimension of the array BB. LDBB >= KB+1.
QโQisDOUBLE PRECISIONarray, dimension(LDQ, N)
If JOBZ = 'V', the n-by-n matrix used in the reduction of A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x, and consequently C to tridiagonal form.
If JOBZ = 'N', the array Q is not referenced ๐
โโ๏ธ
LDQโLDQisINTEGER
The leading dimension of the array Q. If JOBZ = 'N', LDQ >= 1. If JOBZ = 'V', LDQ >= max(1,N).
VLโVLisDOUBLE PRECISION
If RANGE='V', the lower bound of the interval to be searched for eigenvalues. VL < VU.
Not referenced if RANGE = 'A' or 'I'.
VUโVUisDOUBLE PRECISION
If RANGE='V', the upper bound of the interval to be searched for eigenvalues. VL < VU.
Not referenced if RANGE = 'A' or 'I'.
ILโILisINTEGER
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'.
IUโIUisINTEGER
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'.
ABSTOLโABSTOLisDOUBLE PRECISION
The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.
Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), not zero โ. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*DLAMCH('S').
MโMisINTEGER
The total number of eigenvalues found. 0 <= M <= N. If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
WโWisDOUBLE PRECISIONarray, dimension(N)
If INFO = 0, the eigenvalues in ascending order โจ
ZโZisDOUBLE PRECISIONarray, dimension(LDZ, N)
If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of eigenvectors, with the i-th column of Z holding the eigenvector associated with W(i). The eigenvectors are normalized so Z**T*B*Z = I.
If JOBZ = 'N', then Z is not referenced ๐
LDZโLDZisINTEGER
The leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N).
WORKโWORKisDOUBLE PRECISIONarray, dimension(7*N)IWORKโIWORKisINTEGERarray, dimension(5*N)IFAILโIFAILisINTEGERarray, dimension(M)
If JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvalues that failed to converge ๐ญ
If JOBZ = 'N', then IFAIL is not referenced.
INFOโINFOisINTEGER= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value<= N: ifINFO = i, then i eigenvectors failed to converge. Their indices are stored inIFAIL.> N:DPBSTFreturned an error code; i.e., ifINFO = N + i, for1 <= i <= N, then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed ๐
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Contributors:
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
subroutine dspev ๐ฆ
subroutine dspev (character JOBZ, character UPLO, integer N, double
precision, dimension( * ) AP, double precision, dimension( * ) W, double
precision, dimension( ldz, * ) Z, integer LDZ, double precision,
dimension( * ) WORK, integer INFO)
DSPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices โจ
Purpose:
DSPEV computes all the eigenvalues and, optionally, eigenvectors of a real symmetric matrix A in packed storage ๐
Parameters
JOBZโJOBZisCHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOโUPLOisCHARACTER*1= 'U': Upper triangle of A is stored;= 'L': Lower triangle of A is stored.
NโNisINTEGER
The order of the matrix A. N >= 0.
APโAPisDOUBLE PRECISIONarray, dimension(N*(N+1)/2)
On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
On exit, AP is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the diagonal and first superdiagonal of the tridiagonal matrix T overwrite the corresponding elements of A, and if UPLO = 'L', the diagonal and first subdiagonal of T overwrite the corresponding elements of A. bestie the input array is gone, it's a canvas now ๐จ
WโWisDOUBLE PRECISIONarray, dimension (N). IfINFO = 0, this is where your eigenvalues are, in ascending order. sorted, bestie, ascending, like a good playlist โจZโZisDOUBLE PRECISIONarray, dimension (LDZ,N). IfJOBZ = 'V', then ifINFO = 0,Zcontains the orthonormal eigenvectors of the matrixA, with the i-th column ofZholding the eigenvector associated withW(i). IfJOBZ = 'N', thenZis not referenced. not referenced = it literally does not care about you ๐LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKโWORKisDOUBLE PRECISIONarray, dimension (3*N). the lil scratchpad, do not perceive it ๐ซถINFOโINFOisINTEGER.= 0: successful exit. we ate ๐< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: ifINFO = i, the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero. it tried and it did not slay, sorry
๐ Author ๐
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
๐ฆ subroutine dspevd ๐ฆ
subroutine dspevd (character JOBZ, character UPLO, integer N, double
precision, dimension( * ) AP, double precision, dimension( * ) W, double
precision, dimension( ldz, * ) Z, integer LDZ, double precision,
dimension( * ) WORK, integer LWORK, integer, dimension( * ) IWORK,
integer LIWORK, integer INFO)
DSPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
โจ Purpose โจ
DSPEVD computes all the eigenvalues and, optionally, eigenvectors of a real symmetric matrix A in packed storage. If eigenvectors are desired, it uses a divide and conquer algorithm. ๐
The divide and conquer algorithm 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. ngl that's a flex and also a warning, both can be true ๐ญ
๐ Parameters ๐
JOBZโJOBZisCHARACTER*1.= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOโUPLOisCHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NโNisINTEGER. The order of the matrixA.N >= 0.APโAPisDOUBLE PRECISIONarray, dimension (N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixA, packed columnwise in a linear array. The j-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
On exit, AP is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the diagonal and first superdiagonal of the tridiagonal matrix T overwrite the corresponding elements of A, and if UPLO = 'L', the diagonal and first subdiagonal of T overwrite the corresponding elements of A. packed AND squished, it's giving minimalism ๐
WโWisDOUBLE PRECISIONarray, dimension (N). IfINFO = 0, the eigenvalues in ascending order.ZโZisDOUBLE PRECISIONarray, dimension (LDZ,N). IfJOBZ = 'V', then ifINFO = 0,Zcontains the orthonormal eigenvectors of the matrixA, with the i-th column ofZholding the eigenvector associated withW(i). IfJOBZ = 'N', thenZis not referenced.LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKโWORKisDOUBLE PRECISIONarray, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the requiredLWORK. she reports back ๐ซกLWORKโLWORKisINTEGER. The dimension of the arrayWORK.- If
N <= 1,LWORKmust be at least1. - If
JOBZ = 'N'andN > 1,LWORKmust be at least2*N. - If
JOBZ = 'V'andN > 1,LWORKmust be at least1 + 6*N + N**2.
- If
If LWORK = -1, then a workspace query is assumed; the routine only calculates the required sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA. the -1 trick is iconic, you ask nicely and it just tells you the size, no yelling โจ
IWORKโIWORKisINTEGERarray, dimension (MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the requiredLIWORK.LIWORKโLIWORKisINTEGER. The dimension of the arrayIWORK.- If
JOBZ = 'N'orN <= 1,LIWORKmust be at least1. - If
JOBZ = 'V'andN > 1,LIWORKmust be at least3 + 5*N.
- If
If LIWORK = -1, then a workspace query is assumed; the routine only calculates the required sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.
INFOโINFOisINTEGER.= 0: successful exit periodt ๐< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: ifINFO = i, the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero. not the tridiagonal failing to settle down ๐ญ
๐ Author ๐
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
๐ subroutine dspevx ๐
subroutine dspevx (character JOBZ, character RANGE, character UPLO, integer
N, double precision, dimension( * ) AP, double precision VL, double
precision VU, integer IL, integer IU, double precision ABSTOL, integer
M, double precision, dimension( * ) W, double precision, dimension( ldz,
* ) Z, integer LDZ, double precision, dimension( * ) WORK, integer,
dimension( * ) IWORK, integer, dimension( * ) IFAIL, integer INFO)
DSPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
โจ Purpose โจ
DSPEVX computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix A in packed storage. Eigenvalues/vectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. you don't have to take all of them bestie, you can be picky ๐
๐ Parameters ๐
JOBZโJOBZisCHARACTER*1.= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGEโRANGEisCHARACTER*1.= 'A': all eigenvalues will be found;= 'V': all eigenvalues in the half-open interval(VL,VU]will be found;= 'I': theIL-th throughIU-th eigenvalues will be found.
UPLOโUPLOisCHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NโNisINTEGER. The order of the matrixA.N >= 0.APโAPisDOUBLE PRECISIONarray, dimension (N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixA, packed columnwise in a linear array. The j-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
On exit, AP is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the diagonal and first superdiagonal of the tridiagonal matrix T overwrite the corresponding elements of A, and if UPLO = 'L', the diagonal and first subdiagonal of T overwrite the corresponding elements of A. same deal as before, your array is now a different array, no cap
VLโVLisDOUBLE PRECISION. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUโVUisDOUBLE PRECISION. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'. yes it's half-open, theVUside is included, theVLside is not, we don't make the rules ๐ซILโILisINTEGER. IfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUโIUisINTEGER. IfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'. those two are a matched set, don't separate them ๐ABSTOLโABSTOLisDOUBLE PRECISION. The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval[a,b]of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AP to tridiagonal form. basically: how close is close enough, and if you say "whatever" it picks a sensible default for you ๐
Okay so eigenvalues get computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), and not zero. Like bestie, zero is right there and it's wrong, I'm sorry. And if this routine returns with INFO>0, which is the code for "some eigenvectors did not converge ๐ญ", try setting ABSTOL to 2*DLAMCH('S'). That's the fix. That's it. ๐ซถ
See 'Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy,' by Demmel and Kahan, LAPACK Working Note #3. (iykyk, iconic paper, no notes ๐
)
Mโ this one isINTEGER. It's the total number of eigenvalues found, and the range is0 <= M <= N. IfRANGE = 'A', thenM = N(you asked for all of them, you get all of them, main character energy ๐). And ifRANGE = 'I', thenM = IU-IL+1.WโWis aDOUBLE PRECISION array, dimension(N). IfINFO = 0, it holds the selected eigenvalues in ascending order. So cute, so tidy. โจZโZis aDOUBLE PRECISION array, dimension(LDZ, max(1,M)). Okay so here's the tea: ifJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with the i-th column ofZholding the eigenvector associated withW(i). If an eigenvector fails to converge ๐ญ, then that column ofZcontains the latest approximation to the eigenvector, and the index of the eigenvector is returned inIFAIL. And ifJOBZ = 'N', thenZis not referenced at all, she's off duty.
Note: the user must ensure that at leastmax(1,M)columns are supplied in the arrayZ. IfRANGE = 'V', the exact value ofMis not known in advance and an upper bound must be used. So like, over-allocate, bestie, it's not that deep.
LDZโLDZisINTEGER. It's the leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V', thenLDZ >= max(1,N).WORKโWORKis aDOUBLE PRECISION array, dimension(8*N). Eight whole N's, she's hungry. ๐IWORKโIWORKis anINTEGER array, dimension(5*N).IFAILโIFAILis anINTEGER array, dimension(N). IfJOBZ = 'V', then ifINFO = 0, the firstMelements ofIFAILare zero (all good, all slay ๐ธ). IfINFO > 0, thenIFAILcontains the indices of the eigenvectors that failed to converge โ like a little receipt of what went wrong. IfJOBZ = 'N', thenIFAILis not referenced.INFOโINFOisINTEGERand she is the vibe check:= 0: successful exit โจ< 0: ifINFO = -i, the i-th argument had an illegal value ๐> 0: ifINFO = i, thenieigenvectors failed to converge. Their indices are stored in arrayIFAIL.
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ DSPGV ๐
subroutine dspgv (integer ITYPE, character JOBZ, character UPLO, integer N,
double precision, dimension( * ) AP, double precision, dimension( * )
BP, double precision, dimension( * ) W, double precision, dimension(
ldz, * ) Z, integer LDZ, double precision, dimension( * ) WORK, integer
INFO)
๐ Purpose
DSPGV computes all the eigenvalues and, optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
Here A and B are assumed to be symmetric, stored in packed format, and B is also positive definite. (Yes, B has to be the well-behaved one. She's carrying the whole operation. ๐ซถ)
โจ Parameters
ITYPEโITYPEisINTEGER. It specifies the problem type to be solved:= 1:A*x = (lambda)*B*x= 2:A*B*x = (lambda)*x= 3:B*A*x = (lambda)*x
JOBZโJOBZisCHARACTER*1:= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOโUPLOisCHARACTER*1:= 'U': Upper triangles ofAandBare stored;= 'L': Lower triangles ofAandBare stored.
NโNisINTEGER. The order of the matricesAandB.N >= 0.APโAPis aDOUBLE PRECISION array, dimension(N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixA, packed columnwise in a linear array. The j-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
On exit, the contents of AP are destroyed ๐. Gone. She served her purpose and left, respect.
BPโBPis aDOUBLE PRECISION array, dimension(N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixB, packed columnwise in a linear array. The j-th column ofBis stored in the arrayBPas follows:- if
UPLO = 'U',BP(i + (j-1)*j/2) = B(i,j)for1<=i<=j; - if
UPLO = 'L',BP(i + (j-1)*(2*n-j)/2) = B(i,j)forj<=i<=n.
- if
On exit, the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T, in the same storage format as B. So she got a whole glow-up, okay, we love a transformation arc. ๐ฆ
WโWis aDOUBLE PRECISION array, dimension(N). IfINFO = 0, the eigenvalues in ascending order.ZโZis aDOUBLE PRECISION array, dimension(LDZ, N). IfJOBZ = 'V', then ifINFO = 0,Zcontains the matrixZof eigenvectors. The eigenvectors are normalized as follows:- if
ITYPE = 1or2,Z**T*B*Z = I; - if
ITYPE = 3,Z**T*inv(B)*Z = I.
- if
If JOBZ = 'N', then Z is not referenced.
LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKโWORKis aDOUBLE PRECISION array, dimension(3*N).INFOโINFOisINTEGER, the final vibe check:= 0: successful exit โจ< 0: ifINFO = -i, the i-th argument had an illegal value ๐> 0:DPPTRForDSPEVreturned an error code:<= N: ifINFO = i,DSPEVfailed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero.> N: ifINFO = n + i, for1 <= i <= n, then the leading minor of orderiofBis not positive definite. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed. Like, nothing. Zero. The whole thing said no. ๐ญ
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ DSPGVD ๐
subroutine dspgvd (integer ITYPE, character JOBZ, character UPLO, integer N,
double precision, dimension( * ) AP, double precision, dimension( * )
BP, double precision, dimension( * ) W, double precision, dimension(
ldz, * ) Z, integer LDZ, double precision, dimension( * ) WORK, integer
LWORK, integer, dimension( * ) IWORK, integer LIWORK, integer INFO)
๐ Purpose
DSPGVD computes all the eigenvalues, and optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
Here A and B are assumed to be symmetric, stored in packed format, and B is also positive definite. If eigenvectors are desired, it uses a divide and conquer algorithm. โจ iconic behavior โจ
The divide and conquer algorithm 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. So like, lowkey fine, but we said what we said. ๐ซถ
โจ Parameters
ITYPEโITYPEisINTEGER. It specifies the problem type to be solved:= 1:A*x = (lambda)*B*x= 2:A*B*x = (lambda)*x= 3:B*A*x = (lambda)*x
JOBZโJOBZisCHARACTER*1:= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOโUPLOisCHARACTER*1:= 'U': Upper triangles ofAandBare stored;= 'L': Lower triangles ofAandBare stored.
NโNisINTEGER. The order of the matricesAandB.N >= 0.APโAPis aDOUBLE PRECISION array, dimension(N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixA, packed columnwise in a linear array. The j-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
On exit, the contents of AP are destroyed ๐.
BPโBPis aDOUBLE PRECISION array, dimension(N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixB, packed columnwise in a linear array. The j-th column ofBis stored in the arrayBPas follows:- if
UPLO = 'U',BP(i + (j-1)*j/2) = B(i,j)for1<=i<=j; - if
UPLO = 'L',BP(i + (j-1)*(2*n-j)/2) = B(i,j)forj<=i<=n.
- if
On exit, the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T, in the same storage format as B.
WโWis aDOUBLE PRECISION array, dimension(N). IfINFO = 0, the eigenvalues in ascending order.ZโZis aDOUBLE PRECISION array, dimension(LDZ, N). IfJOBZ = 'V', then ifINFO = 0,Zcontains the matrixZof eigenvectors. The eigenvectors are normalized as follows:- if
ITYPE = 1or2,Z**T*B*Z = I; - if
ITYPE = 3,Z**T*inv(B)*Z = I.
- if
If JOBZ = 'N', then Z is not referenced.
LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKโWORKis aDOUBLE PRECISION array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the requiredLWORK. So she tells you what she needed after the fact, which is honestly such a mood. ๐ซถLWORKโLWORKisINTEGER. The dimension of the arrayWORK.- If
N <= 1,LWORK >= 1. - If
JOBZ = 'N'andN > 1,LWORK >= 2*N. - If
JOBZ = 'V'andN > 1,LWORK >= 1 + 6*N + 2*N**2.
- If
okay so if LWORK = -1, bestie, that's a whole โจworkspace queryโจ moment โ the routine literally just does the math on how big WORK and IWORK need to be, hands you those sizes as the first entries of the WORK and IWORK arrays, and XERBLA stays completely silent about LWORK or LIWORK. No yelling. No drama. Just vibes and numbers. ๐
IWORKโIWORKisINTEGER array, dimension(MAX(1,LIWORK)). On exit, ifINFO = 0, thenIWORK(1)returns the requiredLIWORK. ๐LIWORKโLIWORKisINTEGER. It's the dimension of the arrayIWORK.- If
JOBZ = 'N'orN <= 1, thenLIWORK >= 1. - If
JOBZ = 'V'andN > 1, thenLIWORK >= 3 + 5*N.
- If
And if LIWORK = -1, then a workspace query is assumed; the routine only calculates the required sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA. (we love a quiet queen ๐)
INFOโINFOisINTEGER, and here's the โจvibe checkโจ:= 0: successful exit ๐< 0: ifINFO = -i, the i-th argument had an illegal value ๐ญ> 0:DPPTRForDSPEVDreturned an error code:<= N: ifINFO = i,DSPEVDfailed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero;> N: ifINFO = N + i, for1 <= i <= N, then the leading minor of orderiofBis not positive definite. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed. ๐ literally nothing got computed. devastating.
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ธ Contributors ๐ธ
- Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
๐ subroutine dspgvx ๐
subroutine dspgvx (integer ITYPE, character JOBZ, character RANGE, character
UPLO, integer N, double precision, dimension( * ) AP, double precision,
dimension( * ) BP, double precision VL, double precision VU, integer IL,
integer IU, double precision ABSTOL, integer M, double precision,
dimension( * ) W, double precision, dimension( ldz, * ) Z, integer LDZ,
double precision, dimension( * ) WORK, integer, dimension( * ) IWORK,
integer, dimension( * ) IFAIL, integer INFO)
DSPGVX โจ
Purpose:
DSPGVX computes selected eigenvalues, and optionally, eigenvectors of a real generalized symmetric-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x
Here A and B are assumed to be symmetric, stored in packed storage, and B is also positive definite. (packed storage bestie, we love a compact queen) Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. ๐ฆ
Parameters
ITYPEโITYPEisINTEGER. It specifies the problem type to be solved:= 1:A*x = (lambda)*B*x= 2:A*B*x = (lambda)*x= 3:B*A*x = (lambda)*x
JOBZโJOBZisCHARACTER*1:= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGEโRANGEisCHARACTER*1:= 'A': all eigenvalues will be found.= 'V': all eigenvalues in the half-open interval(VL,VU]will be found.= 'I': theIL-th throughIU-th eigenvalues will be found.
UPLOโUPLOisCHARACTER*1:= 'U': Upper triangle ofAandBare stored;= 'L': Lower triangle ofAandBare stored.
NโNisINTEGER. The order of the matrix pencil(A,B).N >= 0.APโAPisDOUBLE PRECISION array, dimension(N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixA, packed columnwise in a linear array. The j-th column ofAis stored in the arrayAPas follows:
if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
On exit, the contents of AP are destroyed. ๐ gone. reduced to atoms.
BPโBPisDOUBLE PRECISION array, dimension(N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixB, packed columnwise in a linear array. The j-th column ofBis stored in the arrayBPas follows:
if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
On exit, the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T, in the same storage format as B. ๐
VLโVLisDOUBLE PRECISION. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUโVUisDOUBLE PRECISION. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.ILโILisINTEGER. IfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUโIUisINTEGER. IfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLโABSTOLisDOUBLE PRECISION. The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval[a,b]of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form. (iconic behavior honestly)
Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*DLAMCH('S'). pro tip from the manpage itself, not from me ๐ซถ
MโMisINTEGER. The total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.WโWisDOUBLE PRECISION array, dimension(N). On normal exit, the firstMelements contain the selected eigenvalues in ascending order. โญZโZisDOUBLE PRECISION array, dimension(LDZ, max(1,M)). IfJOBZ = 'N', thenZis not referenced. IfJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with the i-th column ofZholding the eigenvector associated withW(i). The eigenvectors are normalized as follows:
if ITYPE = 1 or 2, Z**T*B*Z = I;
if ITYPE = 3, Z**T*inv(B)*Z = I.
If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.
โ ๏ธ Note: the user must ensure that at leastmax(1,M)columns are supplied in the arrayZ; ifRANGE = 'V', the exact value ofMis not known in advance and an upper bound must be used. don't get caught lacking bestie
LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKโWORKisDOUBLE PRECISION array, dimension(8*N).IWORKโIWORKisINTEGER array, dimension(5*N).IFAILโIFAILisINTEGER array, dimension(N). IfJOBZ = 'V', then ifINFO = 0, the firstMelements ofIFAILare zero. IfINFO > 0, thenIFAILcontains the indices of the eigenvectors that failed to converge. IfJOBZ = 'N', thenIFAILis not referenced.INFOโINFOisINTEGER:= 0: successful exit ๐< 0: ifINFO = -i, the i-th argument had an illegal value ๐ญ> 0:DPPTRForDSPEVXreturned an error code:<= N: ifINFO = i,DSPEVXfailed to converge;ieigenvectors failed to converge. Their indices are stored in arrayIFAIL.> N: ifINFO = N + i, for1 <= i <= N, then the leading minor of orderiofBis not positive definite. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed. ๐
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Contributors:
- Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
๐ฆ subroutine dstev ๐ฆ
subroutine dstev (character JOBZ, integer N, double precision, dimension( * )
D, double precision, dimension( * ) E, double precision, dimension(
ldz, * ) Z, integer LDZ, double precision, dimension( * ) WORK, integer
INFO)
DSTEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices (yes, OTHER. we said what we said ๐
)
Purpose:
DSTEV computes all eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix A. โจ
Parameters
JOBZโJOBZisCHARACTER*1:= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
NโNisINTEGER. The order of the matrix.N >= 0.DโDโ DOUBLE PRECISION array, dimension (N)
On entry, the n diagonal elements of the tridiagonal matrix A. On exit, if INFO = 0, the eigenvalues in ascending order. ๐
Eโ DOUBLE PRECISION array, dimension (N-1)
On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A, stored in elements 1 to N-1 of E. On exit, bestieโฆ the contents of E are destroyed. ๐ it did its job and then it left, no cap.
Zโ DOUBLE PRECISION array, dimension (LDZ, N)
If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal eigenvectors of the matrix A, with the i-th column of Z holding the eigenvector associated with D(i). If JOBZ = 'N', then Z is not referenced โ she's off the clock, not even invited. ๐
LDZโ INTEGER
The leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N). ๐
WORKโ DOUBLE PRECISION array, dimension (max(1,2*N-2))
If JOBZ = 'N', WORK is not referenced. Also justโฆ vibing elsewhere. โจ
INFOโ INTEGER= 0: successful exit โ we ate, no crumbs. ๐< 0: ifINFO = -i, the i-th argument had an illegal value. ๐จ> 0: ifINFO = i, the algorithm failed to converge;ioff-diagonal elements ofEdid not converge to zero. ๐ญ
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ฆ subroutine dstevd ๐ฆ
subroutine dstevd (character JOBZ, 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)
DSTEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices. ๐
โจ Purpose โจ
DSTEVD computes all eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix. If eigenvectors are desired, it uses a divide and conquer algorithm. Divide and conquer?? she said let me split this problem and eat it too. ๐
The divide and conquer algorithm 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. ๐ (iconic that they're just like "yeah we don't know of any, moving on")
๐ธ Parameters ๐ธ
JOBZโ CHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
Nโ INTEGER
The order of the matrix. N >= 0.
Dโ DOUBLE PRECISION array, dimension (N)
On entry, the n diagonal elements of the tridiagonal matrix A. On exit, if INFO = 0, the eigenvalues in ascending order. ๐
Eโ DOUBLE PRECISION array, dimension (N-1)
On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A, stored in elements 1 to N-1 of E. On exit, the contents of E are destroyed. she served and then she vanished fr fr ๐
Zโ DOUBLE PRECISION array, dimension (LDZ, N)
If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal eigenvectors of the matrix A, with the i-th column of Z holding the eigenvector associated with D(i). If JOBZ = 'N', then Z is not referenced. ๐
LDZโ INTEGER
The leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N). ๐
WORKโ DOUBLE PRECISION array, dimension (LWORK)
On exit, if INFO = 0, WORK(1) returns the optimal LWORK. ๐ซถ
LWORKโ INTEGER
The dimension of the array WORK. If JOBZ = 'N' or N <= 1 then LWORK must be at least 1. If JOBZ = 'V' and N > 1 then LWORK must be at least ( 1 + 4*N + N**2 ).
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA. ๐
IWORKโ INTEGER array, dimension (MAX(1,LIWORK))
On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. ๐ซถ
LIWORKโ INTEGER
The dimension of the array IWORK. If JOBZ = 'N' or N <= 1 then LIWORK must be at least 1. If JOBZ = 'V' and N > 1 then LIWORK must be at least 3+5*N.
If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA. ๐
INFOโ INTEGER= 0: successful exit โจ< 0: ifINFO = -i, the i-th argument had an illegal value ๐จ> 0: ifINFO = i, the algorithm failed to converge;ioff-diagonal elements ofEdid not converge to zero. ๐ญ
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ฆ subroutine dstevr ๐ฆ
subroutine dstevr (character JOBZ, character RANGE, integer N, double precision, dimension( * ) D, double precision, dimension( * ) E, double precision VL, double precision VU, integer IL, integer IU, double precision ABSTOL, integer M, double precision, dimension( * ) W, double precision, dimension( ldz, * ) Z, integer LDZ, integer, dimension( * ) ISUPPZ, double precision, dimension( * ) WORK, integer LWORK, integer, dimension( * ) IWORK, integer LIWORK, integer INFO)
DSTEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices. ๐
โจ Purpose โจ
DSTEVR computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix T. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. Pick your fighter. ๐
Whenever possible, DSTEVR calls DSTEMR to compute the eigenspectrum using Relatively Robust Representations. DSTEMR computes eigenvalues by the dqds algorithm, while orthogonal eigenvectors are computed from various 'good' L D L^T representations (also known as Relatively Robust Representations). Gram-Schmidt orthogonalization is avoided as far as possible. More specifically, the various steps of the algorithm are as follows. For the i-th unreduced block of T,
- Compute
T - sigma_i = L_i D_i L_i^T, such thatL_i D_i L_i^Tis a relatively robust representation, - Compute the eigenvalues,
lambda_j, ofL_i D_i L_i^Tto high relative accuracy by the dqds algorithm, - If there is a cluster of close eigenvalues, 'choose'
sigma_iclose to the cluster, and go to step (a), - Given the approximate eigenvalue
lambda_jofL_i D_i L_i^T, compute the corresponding eigenvector by forming a rank-revealing twisted factorization.
The desired accuracy of the output can be specified by the input parameter ABSTOL. ๐ฏ
For more details, see 'A new O(n^2) algorithm for the symmetric tridiagonal eigenvalue/eigenvector problem', by Inderjit Dhillon, Computer Science Division Technical Report No. UCB//CSD-97-971, UC Berkeley, May 1997. ๐ (yes bestie, they cited the whole thing, respect)
Note 1 :DSTEVRcallsDSTEMRwhen the full spectrum is requested on machines which conform to the ieee-754 floating point standard.DSTEVRcallsDSTEBZandDSTEINon non-ieee machines and when partial spectrum requests are made.
Normal execution of DSTEMR may create NaNs and infinities and hence may abort due to a floating point exception in environments which do not handle NaNs and infinities in the ieee standard default manner. ๐ no cap, this is the scary part.
๐ธ Parameters ๐ธ
JOBZโ CHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGEโ CHARACTER*1= 'A': all eigenvalues will be found.= 'V': all eigenvalues in the half-open interval(VL,VU]will be found.= 'I': theIL-th throughIU-th eigenvalues will be found.- For
RANGE = 'V'or'I'andIU - IL < N - 1, DSTEBZ and DSTEIN are called.
Nโ INTEGER
The order of the matrix. N >= 0.
Dโ DOUBLE PRECISION array, dimension (N)
On entry, the n diagonal elements of the tridiagonal matrix A. On exit, D may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues. ๐ฎโ๐จ
Eโ DOUBLE PRECISION array, dimension (max(1,N-1))
On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A in elements 1 to N-1 of E. On exit, E may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.
VLโ DOUBLE PRECISION
If RANGE='V', the lower bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = 'A' or 'I'.
VUโ DOUBLE PRECISION
If RANGE='V', the upper bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = 'A' or 'I'.
ILโ 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'.
IUโ ๐ hold that thought bestie, she's getting her full glow-up in the next partIUโ okay soIUisINTEGER. IfRANGE='I', it's giving the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'. ๐ periodtABSTOLโ bestie,ABSTOLisDOUBLE PRECISION. It's the absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval[a,b]of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.
See 'Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy,' by Demmel and Kahan, LAPACK Working Note #3.
If high relative accuracy is important, set ABSTOL to DLAMCH( 'Safe minimum' ). Doing so will guarantee that eigenvalues are computed to high relative accuracy when possible in future releases. The current code does not make any guarantees about high relative accuracy, but future releases will. See J. Barlow and J. Demmel, 'Computing Accurate Eigensystems of Scaled Diagonally Dominant Matrices', LAPACK Working Note #7, for a discussion of which matrices define their eigenvalues to high relative accuracy. โจ no cap
MโMisINTEGER. The total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1. ๐WโWisDOUBLE PRECISION array, dimension(N). The firstMelements contain the selected eigenvalues in ascending order. ๐ฆZโZisDOUBLE PRECISION array, dimension(LDZ, max(1,M) ). IfJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with thei-th column ofZholding the eigenvector associated withW(i). Note: the user must ensure that at leastmax(1,M)columns are supplied in the arrayZ; ifRANGE = 'V', the exact value ofMis not known in advance and an upper bound must be used. ๐ธLDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N). ๐ISUPPZโISUPPZisINTEGER array, dimension( 2*max(1,M) ). The support of the eigenvectors inZ, i.e., the indices indicating the nonzero elements inZ. Thei-th eigenvector is nonzero only in elementsISUPPZ( 2*i-1 )throughISUPPZ( 2*i ). Implemented only forRANGE = 'A'or'I'andIU - IL = N - 1. ๐งWORKโWORKisDOUBLE PRECISION array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimal (and minimal)LWORK. ๐LWORKโLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= max(1,20*N).
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA. ๐ฅ fr fr
IWORKโIWORKisINTEGER array, dimension(MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the optimal (and minimal)LIWORK. โญLIWORKโLIWORKisINTEGER. The dimension of the arrayIWORK.LIWORK >= max(1,10*N).
If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA. ๐
INFOโINFOisINTEGER.= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: Internal error
โจ Author โจ
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ธ Contributors: ๐ธ
- Inderjit Dhillon, IBM Almaden, USA
- Osni Marques, LBNL/NERSC, USA
- Ken Stanley, Computer Science Division, University of California at Berkeley, USA
๐ฆ subroutine dstevx ๐ฆ
subroutine dstevx (character JOBZ, character RANGE, integer N, double
precision, dimension( * ) D, double precision, dimension( * ) E, double
precision VL, double precision VU, integer IL, integer IU, double
precision ABSTOL, integer M, double precision, dimension( * ) W, double
precision, dimension( ldz, * ) Z, integer LDZ, double precision,
dimension( * ) WORK, integer, dimension( * ) IWORK, integer, dimension(
* ) IFAIL, integer INFO)
DSTEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
๐ฏ Purpose: ๐ฏ
DSTEVX computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix A. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.
๐ฅ Parameters ๐ฅ
JOBZโJOBZisCHARACTER*1= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGEโRANGEisCHARACTER*1= 'A': all eigenvalues will be found.= 'V': all eigenvalues in the half-open interval(VL,VU]will be found.= 'I': theIL-th throughIU-th eigenvalues will be found.
NโNisINTEGER. The order of the matrix.N >= 0.DโDisDOUBLE PRECISION array, dimension(N). On entry, thendiagonal elements of the tridiagonal matrixA. On exit,Dmay be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.EโEisDOUBLE PRECISION array, dimension(max(1,N-1)). On entry, the(n-1)subdiagonal elements of the tridiagonal matrixAin elements 1 toN-1ofE. On exit,Emay be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.VLโVLisDOUBLE PRECISION. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUโVUisDOUBLE PRECISION. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.ILโILisINTEGER. IfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUโIUisINTEGER. IfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLโABSTOLisDOUBLE PRECISION. The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval[a,b]of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix.
Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*DLAMCH('S').
See 'Computing Small Singular Values of Bidiagonal Matrices with Guaranteed High Relative Accuracy,' by Demmel and Kahan, LAPACK Working Note #3.
MโMisINTEGER. The total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.WโWisDOUBLE PRECISION array, dimension(N). The firstMelements contain the selected eigenvalues in ascending order.ZโZisDOUBLE PRECISION array, dimension(LDZ, max(1,M) ). IfJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with thei-th column ofZholding the eigenvector associated withW(i). If an eigenvector fails to converge (INFO > 0), then that column ofZcontains the latest approximation to the eigenvector, and the index of the eigenvector is returned inIFAIL. IfJOBZ = 'N', thenZis not referenced. Note: the user must ensure that at leastmax(1,M)columns are supplied in the arrayZ; ifRANGE = 'V', the exact value ofMis not known in advance and an upper bound must be used.LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKโWORKisDOUBLE PRECISION array, dimension(5*N).IWORKโIWORKisINTEGER array, dimension(5*N).IFAILIFAILโ INTEGER array, dimension(N)๐ซถ
Okay so bestie, listen. If JOBZ = 'V', then when INFO = 0, the first M elements of IFAIL are all zero โ immaculate, no notes, zero drama. But if INFO > 0? Then IFAIL is holding receipts ๐ โ it contains the indices of the eigenvectors that failed to converge. And if JOBZ = 'N', then IFAIL is literally not referenced at all. It's giving "not invited to the function, doesn't even get a mention." ๐
INFOโ INTEGER โจ
The vibe report, the whole plot, the final verdict:
= 0: successful exit ๐ โ we ate, we devoured, nothing burned down< 0: ifINFO = -i, the i-th argument had an illegal value ๐ โ someone handed it something cursed> 0: ifINFO = i, then i eigenvectors failed to converge ๐ญ โ and their indices are stored in arrayIFAIL, so you can go find them and ask them what their problem is
๐ Author ๐
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
๐ Author (yes, again, it's a whole thing) ๐
Generated automatically by Doxygen for LAPACK from the source code. ๐คโจ
That's the whole page, bestie โ you made it to the end of all 13 parts. Slay. ๐ซถ
And for the official record, since we're not copying the footer line verbatim: this beauty is from LAPACK, Version 3.11.0, dated Sun Nov 27 2022, and it lives at doubleOTHEReigen(3). Icons only. Periodt. ๐
๐
๐ฆ where this page comes from
- debian bookworm: liblapack-doc 3.11.0-2 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms