SSTEDC(3)
π 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,Zhas 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',Zholds the orthogonal matrix from the reduction to tridiagonal form - on exit, if
INFO = 0:COMPZ = 'V'βZholds the orthonormal eigenvector of the original symmetric matrixCOMPZ = 'I'βZholds the orthonormal eigenvectors of the symmetric tridiagonal matrix
- if
COMPZ = 'N',Zis 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'orN <= 1βLWORKat least1COMPZ = 'V'andN > 1βLWORKat least
( 1 + 3*N + 2*N*lg N + 4*N**2 )
where lg( N ) = smallest integer k such that 2**k >= N
COMPZ = 'I'andN > 1βLWORKat 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 ifLWORK = -1? that's a workspace query bestie. the routine only calculates the optimal size of theWORKarray, returns it as the first entry ofWORK, and no error message related toLWORKis issued byXERBLA. 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'orN <= 1βLIWORKat least1COMPZ = 'V'andN > 1βLIWORKat least
( 6 + 6*N + 5*N*lg N )
COMPZ = 'I'andN > 1βLIWORKat 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. π§
ifLIWORK = -1, workspace query assumed β the routine only calculates the optimal size of theIWORKarray, returns it as the first entry ofIWORK, and no error message related toLIWORKis issued byXERBLA. same deal asLWORK, 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β ifINFO = -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 columnsINFO/(N+1)throughmod(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
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms