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. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = 'L', the leading 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). If INFO = 0, this is where your eigenvalues in ascending order live ✨. Organized, on-brand, graceful.
  • WORK β€” WORK is COMPLEX array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. She's efficient, she's telling you what she needs 😌.
  • LWORK β€” LWORK is INTEGER. The length of the array WORK. LWORK >= max(1,2*N-1). For optimal efficiency, LWORK >= (NB+1)*N, where NB 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