heev(3)
π¦ heev(3) β part 1 of 2 π¦
okay bestie, welcome to heev(3) from the Library Functions Manual. This is part 1 of 2, lowkey the eigenvalue corner, highkey iconic β it's giving main character energy. Keep the group chat open. π
π NAME π
heev - {he,sy}ev: eig, QR iteration
β¨ SYNOPSIS β¨
π« Functions
subroutine cheev (jobz, uplo, n, a, lda, w, work, lwork, rwork, info)β CHEEV computes eigenvalues, and optionally the left and/or right eigenvectors, for HE matrices. πsubroutine dsyev (jobz, uplo, n, a, lda, w, work, lwork, info)β DSYEV computes eigenvalues, and optionally the left and/or right eigenvectors, for SY matrices. β¨subroutine ssyev (jobz, uplo, n, a, lda, w, work, lwork, info)β SSYEV computes eigenvalues, and optionally the left and/or right eigenvectors, for SY matrices. πΈsubroutine zheev (jobz, uplo, n, a, lda, w, work, lwork, rwork, info)β ZHEEV computes eigenvalues, and optionally the left and/or right eigenvectors, for HE matrices. π¦
πΈ Detailed Description πΈ
(The original page keeps this part quiet β the function docs are where the action is.)
π Function Documentation π
π cheev β HE-matrix eigenvalue slay π
subroutine cheev (character jobz, character uplo, integer n, complex,
dimension( lda, * ) a, integer lda, real, dimension( * ) w, complex,
dimension( * ) work, integer lwork, real, dimension( * ) rwork, integer
info)
CHEEV computes eigenvalues, and optionally the left and/or right eigenvectors, for HE matrices.
π― Purpose
CHEEV grabs all eigenvalues, and eigenvectors if you asked, of a complex Hermitian matrix A. Periodt. π
π§ Parameters
JOBZβCHARACTER*1.'N': eigenvalues only;'V': eigenvalues and eigenvectors. Pick your fighter. π«UPLOβCHARACTER*1.'U': upper triangle of A is stored;'L': lower triangle of A is stored.NβINTEGER. Order of matrix A.N >= 0.AβCOMPLEX array, dimension (LDA, N). On entry, this is the Hermitian matrix A. IfUPLO = 'U', the leading N-by-N upper triangular part of A holds the upper triangular part of the matrix A. IfUPLO = 'L', the leading N-by-N lower triangular part of A holds 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 β diagonal included β is destroyed. π No cap β destroyed.LDAβINTEGER. Leading dimension of array A.LDA >= max(1,N).WβREAL array, dimension (N). IfINFO = 0, eigenvalues come in ascending order. Sorted and serving. β¨WORKβCOMPLEX array, dimension (MAX(1,LWORK)). On the way out, ifINFO = 0,WORK(1)gives you the optimalLWORK.LWORKβINTEGER. Length of theWORKarray.LWORK >= max(1,2*N-1). For optimal efficiency,LWORK >= (NB+1)*N, whereNBis the blocksize forCHETRDreturned byILAENV. IfLWORK = -1, it's a workspace query: the routine only calculates the optimal size of theWORKarray, returns that value as the first entry ofWORK, andXERBLAdoes not issue an error message related toLWORK. πRWORKβREAL array, dimension (max(1, 3*N-2)).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 of an intermediate tridiagonal form did not converge to zero. π Convergence drama, but we move.
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 138 of file cheev.f.
π dsyev β SY-matrix eigenvalue slay, double precision edition π
subroutine dsyev (character jobz, character uplo, integer n, double
precision, dimension( lda, * ) a, integer lda, double precision,
dimension( * ) w, double precision, dimension( * ) work, integer lwork,
integer info)
DSYEV computes eigenvalues, and optionally the left and/or right eigenvectors, for SY matrices.
π― Purpose
DSYEV grabs all eigenvalues, and eigenvectors if you asked, of a real symmetric matrix A. Slay. β¨
π§ Parameters
JOBZβCHARACTER*1.'N': eigenvalues only;'V': eigenvalues and eigenvectors.UPLOβCHARACTER*1.'U': upper triangle of A is stored;'L': lower triangle of A is stored.NβINTEGER. Order of matrix A.N >= 0.AβDOUBLE PRECISION array, dimension (LDA, N). On entry, this is the symmetric matrix A. IfUPLO = 'U', the leading N-by-N upper triangular part of A holds the upper triangular part of the matrix A. IfUPLO = 'L', the leading N-by-N lower triangular part of A holds 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 β diagonal included β is destroyed. πLDAβINTEGER. Leading dimension of array A.LDA >= max(1,N).WβDOUBLE PRECISION array, dimension (N). IfINFO = 0, eigenvalues come in ascending order.WORKβDOUBLE PRECISION array, dimension (MAX(1,LWORK)). On the way out, ifINFO = 0,WORK(1)gives you the optimalLWORK.LWORKβINTEGER. Length of theWORKarray.LWORK >= max(1,3*N-1). For optimal efficiency,LWORK >= (NB+2)*N, whereNBis the blocksize forDSYTRDreturned byILAENV. IfLWORK = -1, it's a workspace query: the routine only calculates the optimal size of theWORKarray, returns that value as the first entry ofWORK, andXERBLAdoes not issue an error message related toLWORK. π«Ά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 of an intermediate tridiagonal form did not converge to zero.
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 131 of file dsyev.f.
πΈ ssyev β SY-matrix eigenvalue slay, single precision edition πΈ
subroutine ssyev (character jobz, character uplo, integer n, real,
dimension( lda, * ) a, integer lda, real, dimension( * ) w, real,
dimension( * ) work, integer lwork, integer info)
SSYEV computes eigenvalues, and optionally the left and/or right eigenvectors, for SY matrices.
π― Purpose
SSYEV grabs all eigenvalues, and eigenvectors if you asked, of a real symmetric matrix A. Iconic. π
π§ Parameters
JOBZβCHARACTER*1.'N': eigenvalues only;'V': eigenvalues and eigenvectors.UPLOβCHARACTER*1.'U': upper triangle of A is stored;'L': lower triangle of A is stored.NβINTEGER. Order of matrix A.N >= 0.AβREAL array, dimension (LDA, N). On entry, this is the symmetric matrix A. IfUPLO = 'U', the leading N-by-N upper triangular part of A holds the upper triangular part of the matrix A. IfUPLO = 'L', the leading N-by-N lower triangular part of A holds 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 β diagonal included β is destroyed. πLDAβINTEGER. Leading dimension of array A.LDA >= max(1,N).WβREAL array, dimension (N). IfINFO = 0, eigenvalues come in ascending order.WORKβREAL array, dimension (MAX(1,LWORK)). On the way out, ifINFO = 0,WORK(1)gives you the optimalLWORK.LWORKβINTEGER. Length of theWORKarray.LWORK >= max(1,3*N-1). For optimal efficiency,LWORK >= (NB+2)*N, whereNBis the blocksize forSSYTRDreturned byILAENV. IfLWORK = -1, it's a workspace query: the routine only calculates the optimal size of theWORKarray, returns that value as the first entry ofWORK, andXERBLAdoes not issue an error message related toLWORK. β¨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 of an intermediate tridiagonal form did not converge to zero. π
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 131 of file ssyev.f.
Okay so next up is zheev, and the pageβs own one-liner is literally: βZHEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matricesβ. Iconic. Hereβs the signature in all its Fortran glory:
subroutine zheev (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 info)
Purpose β¨
ZHEEV computes all eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix A. Thatβs the assignment, bestie β eigenvalues first, eigenvectors if you asked for them.
Parameters π
JOBZβCHARACTER*1.= 'N': compute eigenvalues only;= 'V': compute eigenvalues and eigenvectors. Pick your fighter.UPLOβCHARACTER*1.= 'U': upper triangle ofAis stored;= 'L': lower triangle ofAis stored.NβINTEGER. The order of the matrixA.N >= 0.AβCOMPLEX*16array, dimension(LDA, N). On entry, the Hermitian matrixA. 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, ifJOBZ = 'V', then ifINFO = 0,Acontains the orthonormal eigenvectors of the matrixA. IfJOBZ = 'N', then on exit the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed. πLDAβINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).WβDOUBLE PRECISIONarray, dimension(N). IfINFO = 0, the eigenvalues in ascending order. πWORKβCOMPLEX*16array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβINTEGER. The length of the arrayWORK.LWORK >= max(1,2*N-1). For optimal efficiency,LWORK >= (NB+1)*N, whereNBis the blocksize forZHETRDreturned byILAENV. IfLWORK = -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.RWORKβDOUBLE PRECISIONarray, dimension(max(1, 3*N-2)).INFOβ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. π«
β οΈ Yes, bestie: withJOBZ = 'N', the lower triangle (ifUPLO='L') or the upper triangle (ifUPLO='U') ofA, including the diagonal, is destroyed on exit. Thatβs not a vibe, thatβs the documented behavior.
Author π§βπ»
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 138 of file zheev.f.
Author (page-level, lol) π
Generated automatically by Doxygen for LAPACK from the source code.
And thatβs the whole zheev tea π« β footer energy says LAPACK, Version 3.12.0, man page heev(3). Date? Not printed on the line, so weβre not inventing one. Slay responsibly ππ¦
π¦ 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