SRC/cheev.f(3)
β¨ SRC/cheev.f β¨
Okay bestie, so this is a page from the Library Functions Manual, and it's literally all about cheev β a Fortran subroutine that's giving major main character energy for Hermitian matrices π
. Let's get into it.
π SYNOPSIS π
Functions/Subroutines
subroutine cheev (jobz, uplo, n, a, lda, w, work, lwork, rwork, info)β CHEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
π¦ Function/Subroutine Documentation π¦
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 the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices. No cap, that's the whole vibe.
πΈ Purpose
!>
!> CHEEV computes all eigenvalues and, optionally, eigenvectors of a
!> complex Hermitian matrix A.
!>
Like, all of them. Not a single eigenvalue left behind. Periodt.
π Parameters
JOBZβJOBZ is CHARACTER*1. Bestie, this is your vibe selector:= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
UPLOβUPLO is CHARACTER*1. Which triangle of A are we even working with?= '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. That's it, that's the whole rule.AβA is COMPLEX array, dimension (LDA, N). Okay so here's the tea on entry: it's the Hermitian matrix A. IfUPLO = 'U', theleading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. IfUPLO = 'L', theleading N-by-N lower triangular part of A contains the lower triangular part of the matrix A.
On exit tho? If JOBZ = 'V', then if INFO = 0, A contains the orthonormal eigenvectors of the matrix A. But if JOBZ = 'N', then on exit the lower triangle (if UPLO='L') or the upper triangle (if UPLO='U') of A, including the diagonal, is destroyed. π Yeah. Destroyed. So don't come crying if you needed that data, bestie.
LDAβLDA is INTEGER. The leading dimension of the array A.LDA >= max(1,N). Respect the bounds fr fr.WβW is REAL array, dimension (N). IfINFO = 0, this is where youreigenvalues in ascending orderlive β¨. Organized, on-brand, graceful.WORKβWORK is COMPLEX array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1) returns the optimal LWORK. She's efficient, she's telling you what she needs π.LWORKβLWORK is INTEGER. Thelength of the array WORK.LWORK >= max(1,2*N-1). For optimal efficiency,LWORK >= (NB+1)*N, whereNB is the blocksize for CHETRD returned by ILAENV.
And okay, important: 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. So that's the whole "just tell me how much room you need" move. Love her for that.
RWORKβRWORK is REAL array, dimension (max(1, 3*N-2)). Just a little real-valued workspace, no big deal πββοΈ.INFOβINFO is INTEGER. The ultimate vibe check on whether this worked:= 0: successful exit< 0: if INFO = -i, the i-th argument had an illegal value> 0: if INFO = i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.π When she just can't pull it together.
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 138 of file cheev.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code. (Not me writing the manpage, that's for sure π)
Alright bestie, that's the whole page. LAPACK, Version 3.12.0, and this is the tea on SRC/cheev.f(3). Go compute those eigenvalues, you absolute icon π«Άβ¨.
π¦ 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