SRC/ssteqr.f(3)

πŸ’œ SRC/ssteqr.f β€” like, the whole manual page, bestie

okay so this is the ssteqr.f(3) page from the LAPACK Library Functions Manual, and honestly? it's giving "quietly does something iconic." it's a Fortran subroutine page, so grab a lil snack πŸ“ and let's get into it.


✨ NAME ✨

SRC/ssteqr.f β€” that's the file, that's the name, and that's the whole NAME section. short and sweet, no cap.


🌸 SYNOPSIS 🌸

Functions/Subroutines

  • subroutine ssteqr (compz, n, d, e, z, ldz, work, info) β€” the one and only, the main character herself: SSTEQR πŸ’…

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine ssteqr (character compz, integer n, real, dimension( * ) d, real,
     dimension( * ) e, real, dimension( ldz, * ) z, integer ldz, real,
     dimension( * ) work, integer info)

SSTEQR β€” say it with me β€” SSTEQR. πŸ‘‘

πŸŽ€ Purpose πŸŽ€

!>
!> SSTEQR computes all eigenvalues and, optionally, eigenvectors of a
!> symmetric tridiagonal matrix using the implicit QL or QR method.
!> The eigenvectors of a full or band symmetric matrix can also be found
!> if SSYTRD or SSPTRD or SSBTRD has been used to reduce this matrix to
!> tridiagonal form.
!>

so basically: SSTEQR computes all eigenvalues and, optionally, eigenvectors of a symmetric tridiagonal matrix, and it does it with the implicit QL or QR method. ✨ and listen β€” you can also get the eigenvectors of a full or band symmetric matrix, but only if SSYTRD or SSPTRD or SSBTRD already did the glow-up of reducing your matrix to tridiagonal form. iykyk 🫢


🌈 Parameters 🌈

πŸ’– COMPZ

!>          COMPZ is CHARACTER*1
!>          = 'N':  Compute eigenvalues only.
!>          = 'V':  Compute eigenvalues and eigenvectors of the original
!>                  symmetric matrix.  On entry, Z must contain the
!>                  orthogonal matrix used to reduce the original matrix
!>                  to tridiagonal form.
!>          = 'I':  Compute eigenvalues and eigenvectors of the
!>                  tridiagonal matrix.  Z is initialized to the identity
!>                  matrix.
!>

COMPZ is a CHARACTER*1, and it's literally the vibe check for what you want computed:

  • 'N' β€” eigenvalues only. that's it, that's the ask. no eigenvectors for you today 🫑
  • 'V' β€” eigenvalues and eigenvectors of the original symmetric matrix. heads up: on entry, Z must already contain the orthogonal matrix that was used to reduce the original matrix to tridiagonal form.
  • 'I' β€” eigenvalues and eigenvectors of the tridiagonal matrix. Z gets initialized to the identity matrix. πŸͺ„

⭐ N

!>          N is INTEGER
!>          The order of the matrix.  N >= 0.
!>

N is an INTEGER β€” the order of the matrix. and the rule is N >= 0. periodt.


🧚 D

!>          D is REAL array, dimension (N)
!>          On entry, the diagonal elements of the tridiagonal matrix.
!>          On exit, if INFO = 0, the eigenvalues in ascending order.
!>

D is a REAL array, dimension (N). on entry it's holding the diagonal elements of the tridiagonal matrix. on exit, if INFO = 0, it's holding the eigenvalues in ascending order β€” she sorted them for you, you're welcome πŸ’…


πŸ“ E

!>          E is REAL array, dimension (N-1)
!>          On entry, the (n-1) subdiagonal elements of the tridiagonal
!>          matrix.
!>          On exit, E has been destroyed.
!>

E is a REAL array, dimension (N-1). on entry: the (n-1) subdiagonal elements of the tridiagonal matrix. on exit? ngl, E has been destroyed. 😭 she served her purpose and then she was gone.


🌟 Z

!>          Z is REAL array, dimension (LDZ, N)
!>          On entry, if  COMPZ = 'V', then Z contains the orthogonal
!>          matrix used in the reduction to tridiagonal form.
!>          On exit, if INFO = 0, then if  COMPZ = 'V', Z contains the
!>          orthonormal eigenvectors of the original symmetric matrix,
!>          and if COMPZ = 'I', Z contains the orthonormal eigenvectors
!>          of the symmetric tridiagonal matrix.
!>          If COMPZ = 'N', then Z is not referenced.
!>

Z is a REAL array, dimension (LDZ, N). the tea β˜•:

  • on entry, if COMPZ = 'V', then Z contains the orthogonal matrix used in the reduction to tridiagonal form.
  • on exit, if INFO = 0:
    • if COMPZ = 'V', Z contains the orthonormal eigenvectors of the original symmetric matrix.
    • if COMPZ = 'I', Z contains the orthonormal eigenvectors of the symmetric tridiagonal matrix.
  • if COMPZ = 'N', then Z is not referenced. she's not even invited to the function, honestly πŸ™ˆ

πŸ‘‘ LDZ

!>          LDZ is INTEGER
!>          The leading dimension of the array Z.  LDZ >= 1, and if
!>          eigenvectors are desired, then  LDZ >= max(1,N).
!>

LDZ is an INTEGER β€” the leading dimension of the array Z. constraints: LDZ >= 1, and if you actually want eigenvectors, then LDZ >= max(1,N). don't skip this one, she will notice. πŸ‘€


πŸ”₯ WORK

!>          WORK is REAL array, dimension (max(1,2*N-2))
!>          If COMPZ = 'N', then WORK is not referenced.
!>

WORK is a REAL array, dimension (max(1,2*N-2)). it's the workspace, the backstage crew, the unsung hero. and if COMPZ = 'N', then WORK is not referenced β€” she gets the night off. πŸ’€


πŸ’€ INFO

!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>          > 0:  the algorithm has failed to find all the eigenvalues in
!>                a total of 30*N iterations; if INFO = i, then i
!>                elements of E have not converged to zero; on exit, D
!>                and E contain the elements of a symmetric tridiagonal
!>                matrix which is orthogonally similar to the original
!>                matrix.
!>

INFO is an INTEGER, and it's the status report:

  • = 0 β€” successful exit. we love a happy ending πŸ₯³
  • < 0 β€” if INFO = -i, the i-th argument had an illegal value. you passed her something cursed.
  • > 0 β€” the algorithm has failed to find all the eigenvalues in a total of 30*N iterations. if INFO = i, then i elements of E have not converged to zero. and heads up: on exit, D and E contain the elements of a symmetric tridiagonal matrix which is orthogonally similar to the original matrix. so like… it didn't fully slay, but the data's still there. πŸ’€

🫢 Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

the whole squad, fr fr. πŸ§‘β€πŸ€β€πŸ§‘


🧡 Definition at line 130 of file ssteqr.f.


🌸 Author (again, yes, it's a whole section) 🌸

Generated automatically by Doxygen for LAPACK from the source code.

so nobody hand-wrote that part β€” Doxygen did it, automatically, from the source code. iconic behavior honestly. πŸ€–βœ¨


and that's the page, bestie!! πŸŽ€ this was LAPACK, Version 3.12.0, straight out of SRC/ssteqr.f(3) β€” mwah, go compute some eigenvalues, you got this πŸ’œπŸ¦‹

πŸ“¦ where this page comes from