SSTEDC(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’œ sstedc.f(3) β€” Library Functions Manual πŸ’œ

ok so bestie. this is a page from the Library Functions Manual, and it's all about sstedc.f β€” yes the .f is doing Fortran things, we love that for her. she lives at:

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/sstedc.f

like that's her whole address, iconic, no notes πŸŽ€


✨ SYNOPSIS ✨

Functions/Subroutines

  • subroutine SSTEDC (compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info) β€” the whole vibe in one line πŸ’…
  • SSTEDC β€” same thing, just the name, we're being chill about it

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

subroutine SSTEDC (character compz, integer n, real, dimension( * ) d, real,
    dimension( * ) e, real, dimension( ldz, * ) z, integer ldz, real,
    dimension( * ) work, integer lwork, integer, dimension( * ) iwork,
    integer liwork, integer info)

SSTEDC β€” she's the main character, obviously πŸ’–

🌸 Purpose 🌸

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

so basically: give her a symmetric tridiagonal matrix and she'll hand you back all the eigenvalues, and if you want, the eigenvectors too. divide and conquer, she ate πŸ”₯

and if you already have a full or band real symmetric matrix? no stress β€” if you ran SSYTRD or SSPTRD or SSBTRD to squash it down to tridiagonal form first, she can get the eigenvectors of the original one too. that's the pipeline bestie 🫢


πŸ’« Parameters πŸ’«

COMPZ

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

your whole personality switch, lowkey. it's a CHARACTER*1:

  • 'N' β€” eigenvalues only, we're keeping it minimal
  • 'I' β€” eigenvalues plus eigenvectors of the tridiagonal matrix
  • 'V' β€” eigenvalues plus eigenvectors of the original dense symmetric matrix. heads up: on entry, Z has the orthogonal matrix that reduced the original matrix to tridiagonal form, so don't clear it out πŸ™ˆ

N

!>          N is INTEGER
!>          The dimension of the symmetric tridiagonal matrix.  N >= 0.
!>

INTEGER, the dimension of the symmetric tridiagonal matrix. and N >= 0 β€” zero is allowed, negative is not, we have boundaries ✨

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.
!>

REAL array, dimension (N). on entry she holds the diagonal elements. on exit, if INFO = 0, she's holding the eigenvalues in ascending order β€” sorted, tidy, slay πŸ‘‘

E

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

REAL array, dimension (N-1). on entry: the subdiagonal elements. on exit: E has been destroyed. πŸ’€ she's gone. do not expect her back. if you needed that data you should've copied it, ngl.

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.
!>

REAL array, dimension (LDZ,N). the glow-up arc of this whole routine tbh:

  • on entry, if COMPZ = 'V', Z holds the orthogonal matrix from the reduction to tridiagonal form
  • on exit, if INFO = 0:
    • COMPZ = 'V' β†’ Z holds the orthonormal eigenvector of the original symmetric matrix
    • COMPZ = 'I' β†’ Z holds the orthonormal eigenvectors of the symmetric tridiagonal matrix
  • if COMPZ = 'N', Z is not referenced at all. she's not even invited to the function πŸ’…

LDZ

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

INTEGER, leading dimension of Z. LDZ >= 1 always. but if you actually want eigenvectors? LDZ >= max(1,N), periodt.

WORK

!>          WORK is REAL array, dimension (MAX(1,LWORK))
!>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
!>

REAL array, dimension (MAX(1,LWORK)). on exit, if INFO = 0, WORK(1) tells you the optimal LWORK πŸŽ€

LWORK

!>          LWORK is INTEGER
!>          The dimension of the array WORK.
!>          If COMPZ = 'N' or N <= 1 then LWORK must be at least 1.
!>          If COMPZ = 'V' and N > 1 then LWORK must be at least
!>                         ( 1 + 3*N + 2*N*lg N + 4*N**2 ),
!>                         where lg( N ) = smallest integer k such
!>                         that 2**k >= N.
!>          If COMPZ = 'I' and N > 1 then LWORK must be at least
!>                         ( 1 + 4*N + N**2 ).
!>          Note that for COMPZ = 'I' or 'V', then if N is less than or
!>          equal to the minimum divide size, usually 25, then LWORK need
!>          only be max(1,2*(N-1)).
!>
!>          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.
!>

INTEGER, the dimension of the WORK array. the sizing rules, respectfully, are a lot:

  • COMPZ = 'N' or N <= 1 β†’ LWORK at least 1
  • COMPZ = 'V' and N > 1 β†’ LWORK at least
( 1 + 3*N + 2*N*lg N + 4*N**2 )

where lg( N ) = smallest integer k such that 2**k >= N

  • COMPZ = 'I' and N > 1 β†’ LWORK at least
( 1 + 4*N + N**2 )

important note: for COMPZ = 'I' or 'V', if N is less than or equal to the minimum divide size, usually 25, then LWORK need only be max(1,2*(N-1)). so like, small matrices get a break 🌸

and if LWORK = -1? that's a workspace query bestie. the routine only calculates the optimal size of the WORK array, returns it as the first entry of WORK, and no error message related to LWORK is issued by XERBLA. she's just answering a question, not doing the whole job πŸ’…

IWORK

!>          IWORK is INTEGER array, dimension (MAX(1,LIWORK))
!>          On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
!>

INTEGER array, dimension (MAX(1,LIWORK)). on exit, if INFO = 0, IWORK(1) gives you the optimal LIWORK. same energy as WORK(1), just the integer squad πŸ”₯

LIWORK

!>          LIWORK is INTEGER
!>          The dimension of the array IWORK.
!>          If COMPZ = 'N' or N <= 1 then LIWORK must be at least 1.
!>          If COMPZ = 'V' and N > 1 then LIWORK must be at least
!>                         ( 6 + 6*N + 5*N*lg N ).
!>          If COMPZ = 'I' and N > 1 then LIWORK must be at least
!>                         ( 3 + 5*N ).
!>          Note that for COMPZ = 'I' or 'V', then if N is less than or
!>          equal to the minimum divide size, usually 25, then LIWORK
!>          need only be 1.
!>
!>          If LIWORK = -1, then a workspace query is assumed; the
!>          routine only calculates the optimal size of the IWORK array,
!>          returns this value as the first entry of the IWORK array, and
!>          no error message related to LIWORK is issued by XERBLA.
!>

INTEGER, the dimension of the IWORK array. the rules again, but make it integers:

  • COMPZ = 'N' or N <= 1 β†’ LIWORK at least 1
  • COMPZ = 'V' and N > 1 β†’ LIWORK at least
( 6 + 6*N + 5*N*lg N )
  • COMPZ = 'I' and N > 1 β†’ LIWORK at least
( 3 + 5*N )

and again: for COMPZ = 'I' or 'V', if N is less than or equal to the minimum divide size, usually 25, then LIWORK need only be 1. one. singular. a whole unit. 🧚

if LIWORK = -1, workspace query assumed β€” the routine only calculates the optimal size of the IWORK array, returns it as the first entry of IWORK, and no error message related to LIWORK is issued by XERBLA. same deal as LWORK, different array πŸŽ€

INFO

!>          INFO is INTEGER
!>          = 0:  successful exit.
!>          < 0:  if INFO = -i, the i-th argument had an illegal value.
!>          > 0:  The algorithm failed to compute an eigenvalue while
!>                working on the submatrix lying in rows and columns
!>                INFO/(N+1) through mod(INFO,N+1).
!>

INTEGER, the vibe check at the end:

  • = 0 β†’ successful exit, we love a clean run ✨
  • < 0 β†’ if INFO = -i, the i-th argument had an illegal value. you passed something cursed 😭
  • > 0 β†’ the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1). so she's telling you exactly which lil submatrix caused the drama, which is honestly very generous of her πŸ’€

πŸ‘‘ Author πŸ‘‘

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

the whole academic friend group showed up 🫢


🌈 Contributors: 🌈

Jeff Rutter, Computer Science Division, University of California at Berkeley, USA

Modified by Francoise Tisseur, University of Tennessee

collab of the year, honestly πŸŽ€


⭐ Also ⭐

Definition at line 180 of file sstedc.f.


Author (the other one)

Generated automatically by Doxygen for LAPACK from the source code.

(so nobody hand-wrote this, a robot did, and honestly? the robot understood the assignment πŸ€–πŸ’–)


and that's the page!! LAPACK, Version 3.12.0, and the file path wrapping it all up: /home/abui...RC/sstedc.f(3) β€” ok bye bestie, go compute some eigenvalues πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from