heevd(3)
heevd(3) โ Library Functions Manual ๐
โจ NAME โจ
heevd โ {he,sy}evd: eig, divide and conquer. The whole Hermitian/symmetric eigenvalue squad, together in one manual page ๐
๐ธ SYNOPSIS ๐ธ
๐ฆ Functions
cheevdโ CHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices.
subroutine cheevd (jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info)
dsyevdโ DSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices.
subroutine dsyevd (jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info)
ssyevdโ SSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices.
subroutine ssyevd (jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info)
zheevdโ ZHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices.
subroutine zheevd (jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info)
๐ Detailed Description ๐
Okay so this is the function-by-function tea, bestie. Function Documentation is literally right below, no cap โจ
๐ Function Documentation ๐
๐ฆ subroutine cheevd
subroutine cheevd (character jobz, character uplo, integer n, complex, dimension( lda, * ) a, integer lda, real, dimension( * ) w, complex, dimension( * ) work, integer lwork, real, dimension( * ) rwork, integer lrwork, integer, dimension( * ) iwork, integer liwork, integer info)
CHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices.
๐ Purpose
CHEEVD computes all eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix A. If eigenvectors are desired, it uses a divide and conquer algorithm. Iconic. ๐
๐ 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.AโAisCOMPLEX array, dimension (LDA, N). On entry, the Hermitian matrix A. IfUPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. IfUPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A. On exit, ifJOBZ = 'V', then ifINFO = 0, A contains the orthonormal eigenvectors of the matrix A. IfJOBZ = 'N', then on exit the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') of A, including the diagonal, is destroyed. Gone. Periodt. ๐LDAโLDAisINTEGER. The leading dimension of the array A.LDA >= max(1,N).WโWisREAL array, dimension (N). IfINFO = 0, the eigenvalues in ascending order.WORKโWORKisCOMPLEX array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKโLWORKisINTEGER. The length of the arrayWORK.- If
N <= 1,LWORKmust be at least1. - If
JOBZ = 'N'andN > 1,LWORKmust be at leastN + 1. - If
JOBZ = 'V'andN > 1,LWORKmust be at least2*N + N**2. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORK,RWORKandIWORKarrays, returns these values as the first entries of theWORK,RWORKandIWORKarrays, and no error message related toLWORKorLRWORKorLIWORKis issued byXERBLA.
- If
RWORKโRWORKisREAL array, dimension (MAX(1,LRWORK)). On exit, ifINFO = 0,RWORK(1)returns the optimalLRWORK.LRWORKโLRWORKisINTEGER. The dimension of the arrayRWORK.- If
N <= 1,LRWORKmust be at least1. - If
JOBZ = 'N'andN > 1,LRWORKmust be at leastN. - If
JOBZ = 'V'andN > 1,LRWORKmust be at least1 + 5*N + 2*N**2. - If
LRWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORK,RWORKandIWORKarrays, returns these values as the first entries of theWORK,RWORKandIWORKarrays, and no error message related toLWORKorLRWORKorLIWORKis issued byXERBLA.
- If
IWORKโIWORKisINTEGER array, dimension (MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the optimalLIWORK.LIWORKโLIWORKisINTEGER. The dimension of the arrayIWORK.- If
N <= 1,LIWORKmust be at least1. - If
JOBZ = 'N'andN > 1,LIWORKmust be at least1. - If
JOBZ = 'V'andN > 1,LIWORKmust be at least3 + 5*N. - If
LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of theWORK,RWORKandIWORKarrays, returns these values as the first entries of theWORK,RWORKandIWORKarrays, and no error message related toLWORKorLRWORKorLIWORKis issued byXERBLA.
- If
INFOโINFOisINTEGER:= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value> 0: ifINFO = iandJOBZ = 'N', then the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero; ifINFO = iandJOBZ = 'V', then the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columnsINFO/(N+1)throughmod(INFO,N+1).
๐ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ฆ Further Details
Modified description of INFO. Sven, 16 Feb 05.
๐ธ Contributors
Jeff Rutter, Computer Science Division, University of California at Berkeley, USA
Definition at line 196 of file cheevd.f.
๐ฆ subroutine dsyevd
subroutine dsyevd (character jobz, character uplo, integer n, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( * ) w, double precision, dimension( * ) work, integer lwork, integer, dimension( * ) iwork, integer liwork, integer info)
DSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices.
๐ Purpose
DSYEVD computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A. If eigenvectors are desired, it uses a divide and conquer algorithm.
Because of large use of BLAS of level 3, DSYEVD needs N**2 more workspace than DSYEVX. She's hungry for workspace, bestie. ๐ญ
๐ 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.AโAisDOUBLE PRECISION array, dimension (LDA, N). On entry, the symmetric matrix A. IfUPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. IfUPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A. On exit, ifJOBZ = 'V', then ifINFO = 0, A contains the orthonormal eigenvectors of the matrix A. IfJOBZ = 'N', then on exit the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') of A, including the diagonal, is destroyed. Say bye to that triangle ๐๐LDAโLDAisINTEGER. The leading dimension of the array A.LDA >= max(1,N).WโWisDOUBLE PRECISION array, dimension (N). IfINFO = 0, the eigenvalues in ascending order.WORKโWORKisDOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKโLWORKisINTEGER. The dimension of the arrayWORK.- If
N <= 1,LWORKmust be at least1. - If
JOBZ = 'N'andN > 1,LWORKmust be at least2*N+1. - If
JOBZ = 'V'andN > 1,LWORKmust be at least1 + 6*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.
- If
IWORKโIWORKisINTEGER array, dimension (MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the optimalLIWORK.
๐ LIWORK
LIWORK(INTEGER) โ the dimension of theIWORKarray, i.e. how much integer scratch space you're handing over. The minimums are:- if
N <= 1,LIWORKmust be at least1 - if
JOBZ = 'N'andN > 1,LIWORKmust be at least1 - if
JOBZ = 'V'andN > 1,LIWORKmust be at least3 + 5*N
- if
๐ฎ and ifLIWORK = -1, that's a workspace query bestie! The routine then only calculates the optimal sizes of theWORKandIWORKarrays, hands those values back as the first entries of theWORKandIWORKarrays, and XERBLA stays completely quiet โ no error message related toLWORKorLIWORKgets thrown at you.
INFO(INTEGER) โ the vibe report, aka did it work:0โ slay, successful exit ๐< 0โ ifINFO = -i, the i-th argument had an illegal value (you passed something cursed)> 0โ ifINFO = iandJOBZ = 'N', then the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero> 0โ ifINFO = iandJOBZ = 'V', then the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columnsINFO/(N+1)throughmod(INFO,N+1)
๐ธ Author ๐ธ
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ซถ Contributors ๐ซถ
- Jeff Rutter, Computer Science Division, University of California at Berkeley, USA
- Modified by Francoise Tisseur, University of Tennessee
- Modified description of
INFO. Sven, 16 Feb 05.
๐ Definition at line 175 of file dsyevd.f.
โจ subroutine ssyevd โจ
subroutine ssyevd (character jobz, character uplo, integer n, real,
dimension( lda, * ) a, integer lda, real, dimension( * ) w, real,
dimension( * ) work, integer lwork, integer, dimension( * ) iwork,
integer liwork, integer info)
SSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices. Single precision edition, let's go ๐
๐ Purpose ๐
okay so here's the whole point: SSYEVD computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A. If eigenvectors are desired, it uses a divide and conquer algorithm. Fancy, iconic, we love her ๐
Because of large use of BLAS of level 3, SSYEVD needs N**2 more workspace than SSYEVX. Not a glow-up that comes for free, bestie โ that's the trade ๐
๐ Parameters ๐
JOBZ(CHARACTER1)* โ what you actually want out of this:'N'โ compute eigenvalues only'V'โ compute eigenvalues and eigenvectors
UPLO(CHARACTER1)* โ which triangle ofAyou've actually filled in:'U'โ upper triangle ofAis stored'L'โ lower triangle ofAis stored
N(INTEGER) โ the order of the matrixA.N >= 0. (Zero is allowed, don't come for me.)A(REAL array, dimension(LDA, N)) โ the star of the show:- on entry, the symmetric matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. - on exit, if
JOBZ = 'V', then ifINFO = 0,Acontains the orthonormal eigenvectors of the matrixA๐ฆ - if
JOBZ = 'N', then on exit the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed ๐
- on entry, the symmetric matrix
โ ๏ธ yeah, "destroyed" is the actual word in the docs. Your input matrix does not survive JOBZ = 'N'. Copy it first if you're attached to it.
LDA(INTEGER) โ the leading dimension of the arrayA.LDA >= max(1,N).W(REAL array, dimension(N)) โ ifINFO = 0, the eigenvalues in ascending order โญWORK(REAL array, dimension(MAX(1,LWORK))) โ on exit, ifINFO = 0,WORK(1)returns the optimalLWORK๐LWORK(INTEGER) โ the dimension of the arrayWORK:- if
N <= 1,LWORKmust be at least1 - if
JOBZ = 'N'andN > 1,LWORKmust be at least2*N+1 - if
JOBZ = 'V'andN > 1,LWORKmust be at least1 + 6*N + 2*N**2
- if
๐ฎ ifLWORK = -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 by XERBLA.
IWORK(INTEGER array, dimension(MAX(1,LIWORK))) โ on exit, ifINFO = 0,IWORK(1)returns the optimalLIWORK.LIWORK(INTEGER) โ the dimension of the arrayIWORK:- if
N <= 1,LIWORKmust be at least1 - if
JOBZ = 'N'andN > 1,LIWORKmust be at least1 - if
JOBZ = 'V'andN > 1,LIWORKmust be at least3 + 5*N
- if
๐ฎ and ifLIWORK = -1, a workspace query is assumed again: the routine only calculates the optimal sizes of theWORKandIWORKarrays, returns them as the first entries of theWORKandIWORKarrays, and XERBLA issues no error message related toLWORKorLIWORK.
INFO(INTEGER):= 0โ successful exit โ< 0โ ifINFO = -i, the i-th argument had an illegal value> 0โ ifINFO = iandJOBZ = 'N', then the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero> 0โ ifINFO = iandJOBZ = 'V', then the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columnsINFO/(N+1)throughmod(INFO,N+1)
๐ธ Author ๐ธ
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ซถ Contributors ๐ซถ
- Jeff Rutter, Computer Science Division, University of California at Berkeley, USA
- Modified by Francoise Tisseur, University of Tennessee
- Modified description of
INFO. Sven, 16 Feb 05.
๐ Definition at line 173 of file ssyevd.f.
๐ subroutine zheevd ๐
subroutine zheevd (character jobz, character uplo, integer n, complex*16,
dimension( lda, * ) a, integer lda, double precision, dimension( * ) w,
complex*16, dimension( * ) work, integer lwork, double precision,
dimension( * ) rwork, integer lrwork, integer, dimension( * ) iwork,
integer liwork, integer info)
ZHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices. Complex double precision, our most extra version yet ๐ โจ
๐ Purpose ๐
ZHEEVD computes all eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix A. If eigenvectors are desired, it uses a divide and conquer algorithm. Same iconic energy as her siblings ๐ฆ
๐ Parameters ๐
JOBZ(CHARACTER1)* โ pick your fighter:'N'โ compute eigenvalues only'V'โ compute eigenvalues and eigenvectors
UPLO(CHARACTER1)*:'U'โ upper triangle ofAis stored'L'โ lower triangle ofAis stored
N(INTEGER) โ the order of the matrixA.N >= 0.A(COMPLEX16 array, dimension(LDA, N))*:- on entry, the Hermitian matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA. - on exit, if
JOBZ = 'V', then ifINFO = 0,Acontains the orthonormal eigenvectors of the matrixA๐ฆ - if
JOBZ = 'N', then on exit the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed ๐
- on entry, the Hermitian matrix
LDA(INTEGER) โ the leading dimension of the arrayA.LDA >= max(1,N).W(DOUBLE PRECISION array, dimension(N)) โ ifINFO = 0, the eigenvalues in ascending order โญWORK(COMPLEX16 array, dimension(MAX(1,LWORK)))* โ on exit, ifINFO = 0,WORK(1)returns the optimalLWORK๐LWORK(INTEGER) โ the length of the arrayWORK:- if
N <= 1,LWORKmust be at least1 - if
JOBZ = 'N'andN > 1,LWORKmust be at leastN + 1 - if
JOBZ = 'V'andN > 1,LWORKmust be at least2*N + N**2
- if
๐ฎ and ifLWORK = -1, a workspace query is assumed: the routine only calculates the optimal sizes of theWORK,RWORKandIWORKarrays, returns these values as the first entries of theWORK,RWORKandIWORKarrays, and no error message related toLWORKorLRWORKorLIWORKis issued by XERBLA. Three arrays, one query, no drama.
RWORK(DOUBLE PRECISION array, dimension(MAX(1,LRWORK))) โ on exit, ifINFO = 0,RWORK(1)returns the optimalLRWORK.LRWORK(INTEGER) โ the dimension of the arrayRWORK:- if
N <= 1,LRWORKmust be at least1 - if
JOBZ = 'N'andN > 1,LRWORKmust be at leastN - if
JOBZ = 'V'andN > 1,LRWORKmust be at least1 + 5*N + 2*N**2
- if
๐ฎ ifLRWORK = -1, a workspace query is assumed; the routine only calculates the optimal sizes of theWORK,RWORKandIWORKarrays, returns these values as the first entries of theWORK,RWORKandIWORKarrays, and no error message related toLWORKorLRWORKorLIWORKis issued by XERBLA.
IWORK
โฆand that's exactly where this chunk runs out, bestie โ IWORK's whole breakdown picks up in the next part, don't go anywhere ๐ซถ
IWORKโ okay so this one is anINTEGER array, dimension (MAX(1,LIWORK)). On exit, ifINFO = 0,IWORK(1)returns the optimalLIWORK. It's literally telling you what it wishes it had. ๐LIWORKโINTEGER. It's the dimension of the arrayIWORK. The minimums are giving:- If
N <= 1,LIWORKmust be at least1. - If
JOBZ = 'N'andN > 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 optimal sizes of the WORK, RWORK and IWORK arrays, returns these values as the first entries of the WORK, RWORK and IWORK arrays, and no error message related to LWORK or LRWORK or LIWORK is issued by XERBLA. ๐ซถ
INFOโINTEGER. Exit-status tea:= 0: successful exit โ periodt.< 0: ifINFO = -i, thei-th argument had an illegal value.> 0: ifINFO = iandJOBZ = 'N', then the algorithm failed to converge;ioff-diagonal elements of an intermediate tridiagonal form did not converge to zero; ifINFO = iandJOBZ = 'V', then the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columnsINFO/(N+1)throughmod(INFO,N+1).
๐ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ Further Details:
Modified description of INFO. Sven, 16 Feb 05.
๐ซถ Contributors:
Jeff Rutter, Computer Science Division, University of California at Berkeley, USA
๐ Definition
Definition at line 196 of file zheevd.f.
๐ง Author
Generated automatically by Doxygen for LAPACK from the source code.
Okay that's the whole heevd(3) page, bestie. ๐ Cute sign-off / footer vibe: source is LAPACK, version is Version 3.12.0, and the page is heevd(3) โ that's the tea. ๐
โจ
๐ฆ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 ยท custom
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms