stein(3)
๐ NAME ๐
stein โ like, the whole stein situation: eig, inverse iteration โจ (this is the stein(3) page from your Library Functions Manual, bestie, and yes it's a two-parter ๐ซถ)
๐ธ SYNOPSIS ๐ธ
โจ Functions โจ
Here's the squad โ four subroutines, all doing the same iconic thing in different precisions and flavours ๐
subroutine cstein (n, d, e, m, w, iblock, isplit, z, ldz, work, iwork,
ifail, info)
That's CSTEIN ๐
subroutine dstein (n, d, e, m, w, iblock, isplit, z, ldz, work, iwork,
ifail, info)
That's DSTEIN ๐ฆ
subroutine sstein (n, d, e, m, w, iblock, isplit, z, ldz, work, iwork,
ifail, info)
That's SSTEIN ๐ฟ
subroutine zstein (n, d, e, m, w, iblock, isplit, z, ldz, work, iwork,
ifail, info)
That's ZSTEIN ๐
๐ซ Detailed Description ๐ซ
okay so the actual deets live down in the function docs โ keep scrolling, it's giving very "the lore is in the comments" energy ๐ญ
๐ Function Documentation ๐
๐ง subroutine cstein
subroutine cstein (integer n, real, dimension( * ) d, real, dimension( * )
e, integer m, real, dimension( * ) w, integer, dimension( * ) iblock,
integer, dimension( * ) isplit, complex, dimension( ldz, * ) z, integer
ldz, real, dimension( * ) work, integer, dimension( * ) iwork, integer,
dimension( * ) ifail, integer info)
CSTEIN ๐
๐ Purpose
ok so CSTEIN computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. no cap, that's the whole job ๐ฅ
The maximum number of iterations allowed for each eigenvector is specified by an internal parameter MAXITS (currently set to 5). five. that's the budget. periodt ๐
and here's the cute little plot twist: although the eigenvectors are real, they are stored in a complex array, which may be passed to CUNMTR or CUPMTR for back transformation to the eigenvectors of a complex Hermitian matrix which was reduced to tridiagonal form. iykyk ๐
๐ Parameters
NโNisINTEGER. The order of the matrix.N >= 0. โจDโDisREALarray, dimension(N). Thendiagonal elements of the tridiagonal matrixT. ๐EโEisREALarray, dimension(N-1). The(n-1)subdiagonal elements of the tridiagonal matrixT, stored in elements 1 toN-1. ๐ฆMโMisINTEGER. The number of eigenvectors to be found.0 <= M <= N. ๐ฏWโWisREALarray, dimension(N). The firstMelements ofWcontain the eigenvalues for which eigenvectors are to be computed. The eigenvalues should be grouped by split-off block and ordered from smallest to largest within the block. ( The output arrayWfromSSTEBZwithORDER = 'B'is expected here. ) ๐IBLOCKโIBLOCKisINTEGERarray, dimension(N). The submatrix indices associated with the corresponding eigenvalues inW;IBLOCK(i)=1if eigenvalueW(i)belongs to the first submatrix from the top,=2ifW(i)belongs to the second submatrix, etc. ( The output arrayIBLOCKfromSSTEBZis expected here. ) ๐ธISPLITโISPLITisINTEGERarray, dimension(N). The splitting points, at whichTbreaks up into submatrices. The first submatrix consists of rows/columns 1 toISPLIT( 1 ), the second of rows/columnsISPLIT( 1 )+1throughISPLIT( 2 ), etc. ( The output arrayISPLITfromSSTEBZis expected here. ) โ๏ธZโZisCOMPLEXarray, dimension(LDZ, M). The computed eigenvectors. The eigenvector associated with the eigenvalueW(i)is stored in thei-th column ofZ. Any vector which fails to converge is set to its current iterate afterMAXITSiterations. The imaginary parts of the eigenvectors are set to zero. ๐ฉทLDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= max(1,N). ๐WORKโWORKisREALarray, dimension(5*N). ๐งฐIWORKโIWORKisINTEGERarray, dimension(N). ๐๏ธIFAILโIFAILisINTEGERarray, dimension(M). On normal exit, all elements ofIFAILare zero. If one or more eigenvectors fail to converge afterMAXITSiterations, then their indices are stored in arrayIFAIL. ๐ฉINFOโINFOisINTEGER:= 0: successful exit ๐< 0: ifINFO = -i, thei-th argument had an illegal value ๐> 0: ifINFO = i, thenieigenvectors failed to converge inMAXITSiterations. Their indices are stored in arrayIFAIL. ๐ญ
๐ฆ Internal Parameters
MAXITSโINTEGER, default =5. The maximum number of iterations performed. โณEXTRAโINTEGER, default =2. The number of iterations performed after norm growth criterion is satisfied, should be at least 1. ๐งฎ
๐ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 180 of file cstein.f. ๐
๐ง subroutine dstein
subroutine dstein (integer n, double precision, dimension( * ) d, double
precision, dimension( * ) e, integer m, double precision, dimension( * )
w, integer, dimension( * ) iblock, integer, dimension( * ) isplit,
double precision, dimension( ldz, * ) z, integer ldz, double precision,
dimension( * ) work, integer, dimension( * ) iwork, integer, dimension(
* ) ifail, integer info)
DSTEIN ๐ฆ
๐ Purpose
DSTEIN computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. same gig, double precision edition, we love consistency ๐
The maximum number of iterations allowed for each eigenvector is specified by an internal parameter MAXITS (currently set to 5). yeah, still 5 ๐
๐ Parameters
NโNisINTEGER. The order of the matrix.N >= 0. โจDโDisDOUBLE PRECISIONarray, dimension(N). Thendiagonal elements of the tridiagonal matrixT. ๐EโEisDOUBLE PRECISIONarray, dimension(N-1). The(n-1)subdiagonal elements of the tridiagonal matrixT, in elements 1 toN-1. note the phrasing bestie, it'sinthis time, notstored inโ we keep the receipts ๐งพMโMisINTEGER. The number of eigenvectors to be found.0 <= M <= N. ๐ฏWโWisDOUBLE PRECISIONarray, dimension(N). The firstMelements ofWcontain the eigenvalues for which eigenvectors are to be computed. The eigenvalues should be grouped by split-off block and ordered from smallest to largest within the block. ( The output arrayWfromDSTEBZwithORDER = 'B'is expected here. ) ๐IBLOCKโIBLOCKisINTEGERarray, dimension(N). The submatrix indices associated with the corresponding eigenvalues inW;IBLOCK(i)=1if eigenvalueW(i)belongs to the first submatrix from the top,=2ifW(i)belongs to the second submatrix, etc. ( The output arrayIBLOCKfromDSTEBZis expected here. ) ๐ธISPLITโISPLITisINTEGERarray, dimension(N). The splitting points, at whichTbreaks up into submatrices. The first submatrix consists of rows/columns 1 toISPLIT( 1 ), the second of rows/columnsISPLIT( 1 )+1throughISPLIT( 2 ), etc. ( The output arrayISPLITfromDSTEBZis expected here. ) โ๏ธZโZisDOUBLE PRECISIONarray, dimension(LDZ, M). The computed eigenvectors. The eigenvector associated with the eigenvalueW(i)is stored in thei-th column ofZ. Any vector which fails to converge is set to its current iterate afterMAXITSiterations. ๐ฉทLDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= max(1,N). ๐WORKโWORKisDOUBLE PRECISIONarray, dimension(5*N). ๐งฐIWORKโIWORKisINTEGERarray, dimension(N). ๐๏ธIFAILโIFAILisINTEGERarray, dimension(M). On normal exit, all elements ofIFAILare zero. If one or more eigenvectors fail to converge afterMAXITSiterations, then their indices are stored in arrayIFAIL. ๐ฉINFOโINFOisINTEGER:= 0: successful exit. ๐< 0: ifINFO = -i, thei-th argument had an illegal value ๐> 0: ifINFO = i, thenieigenvectors failed to converge inMAXITSiterations. Their indices are stored in arrayIFAIL. ๐ญ
๐ฆ Internal Parameters
MAXITSโINTEGER, default =5. The maximum number of iterations performed. โณEXTRAโINTEGER, default =2. The number of iterations performed after norm growth criterion is satisfied, should be at least 1. ๐งฎ
๐ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 172 of file dstein.f. ๐
๐ง subroutine sstein
subroutine sstein (integer n, real, dimension( * ) d, real, dimension( * )
e, integer m, real, dimension( * ) w, integer, dimension( * ) iblock,
integer, dimension( * ) isplit, real, dimension( ldz, * ) z, integer
ldz, real, dimension( * ) work, integer, dimension( * ) iwork, integer,
dimension( * ) ifail, integer info)
SSTEIN ๐ฟ
๐ Purpose
SSTEIN computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. single precision, same energy, still slaying ๐ฅ
The maximum number of iterations allowed for each eigenvector is specified by an internal parameter MAXITS (currently set to 5). โณ
๐ Parameters
NโNisINTEGER. The order of the matrix.N >= 0. โจDโDisREALarray, dimension(N). Thendiagonal elements of the tridiagonal matrixT. ๐Eโ and this is where part 1 of the page dips, bestie ๐ญE's whole description drops in part 2 โ don't worry, it's coming ๐ซถ
Eโ okay soEis aREAL array, dimension (N-1), and it's holding the(n-1)subdiagonal elements of the tridiagonal matrixT, in elements1toN-1. slay.MโMisINTEGER, the number of eigenvectors to be found.0 <= M <= N, bestie.WโWis aREAL array, dimension (N). The firstMelements contain the eigenvalues for which eigenvectors are to be computed. Group them by split-off block and order them from smallest to largest within each block, no cap. (The output arrayWfromSSTEBZwithORDER = 'B'is expected here.) ๐IBLOCKโIBLOCKis anINTEGER array, dimension (N), holding the submatrix indices associated with the corresponding eigenvalues inW.IBLOCK(i)=1if eigenvalueW(i)belongs to the first submatrix from the top,=2ifW(i)belongs to the second submatrix, etc. (The output arrayIBLOCKfromSSTEBZis expected here.) โจISPLITโISPLITis anINTEGER array, dimension (N): the splitting points whereTbreaks up into submatrices. The first submatrix consists of rows/columns1toISPLIT( 1 ), the second of rows/columnsISPLIT( 1 )+1throughISPLIT( 2 ), etc. (The output arrayISPLITfromSSTEBZis expected here.) ๐ฆZโZis aREAL array, dimension (LDZ, M): the computed eigenvectors. The eigenvector associated with eigenvalueW(i)is stored in thei-th column ofZ. Any vector which fails to converge is set to its current iterate afterMAXITSiterations. ๐ญLDZโLDZisINTEGER, the leading dimension of the arrayZ.LDZ >= max(1,N), periodt.WORKโWORKis aREAL array, dimension (5*N). that's the whole vibe. ๐ซถIWORKโIWORKis anINTEGER array, dimension (N). iconic.IFAILโIFAILis anINTEGER array, dimension (M). On normal exit, all elements ofIFAILare zero. If one or more eigenvectors fail to converge afterMAXITSiterations, then their indices are stored in arrayIFAIL. ๐INFOโINFOisINTEGER:= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value.> 0: ifINFO = i, thenieigenvectors failed to converge inMAXITSiterations. Their indices are stored in arrayIFAIL.
Internal Parameters ๐
MAXITSโINTEGER, default = 5. The maximum number of iterations performed.EXTRAโINTEGER, default = 2. The number of iterations performed after norm growth criterion is satisfied, should be at least1.
Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ Definition at line 172 of file sstein.f.
๐ subroutine zstein
okay next up, the complex-array sibling. the signature is literally:
subroutine zstein (integer n, double precision, dimension( * ) d, double precision, dimension( * ) e, integer m, double precision, dimension( * ) w, integer, dimension( * ) iblock, integer, dimension( * ) isplit, complex*16, dimension( ldz, * ) z, integer ldz, double precision, dimension( * ) work, integer, dimension( * ) iwork, integer, dimension( * ) ifail, integer info)
ZSTEIN is here to serve. ๐
Purpose ๐ซ
ZSTEIN computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration.
The maximum number of iterations allowed for each eigenvector is specified by an internal parameter MAXITS (currently set to 5). no cap.
Although the eigenvectors are real, they are stored in a complex array, which may be passed to ZUNMTR or ZUPMTR for back transformation to the eigenvectors of a complex Hermitian matrix which was reduced to tridiagonal form. it's giving practical and iconic. ๐ฆ
Parameters โจ
NโNisINTEGER. The order of the matrix.N >= 0.DโDis aDOUBLE PRECISION array, dimension (N). Thendiagonal elements of the tridiagonal matrixT.EโEis aDOUBLE PRECISION array, dimension (N-1). The(n-1)subdiagonal elements of the tridiagonal matrixT, stored in elements1toN-1.MโMisINTEGER. The number of eigenvectors to be found.0 <= M <= N.WโWis aDOUBLE PRECISION array, dimension (N). The firstMelements ofWcontain the eigenvalues for which eigenvectors are to be computed. The eigenvalues should be grouped by split-off block and ordered from smallest to largest within the block. (The output arrayWfromDSTEBZwithORDER = 'B'is expected here.) ๐ธIBLOCKโIBLOCKis anINTEGER array, dimension (N). The submatrix indices associated with the corresponding eigenvalues inW;IBLOCK(i)=1if eigenvalueW(i)belongs to the first submatrix from the top,=2ifW(i)belongs to the second submatrix, etc. (The output arrayIBLOCKfromDSTEBZis expected here.)ISPLITโISPLITis anINTEGER array, dimension (N). The splitting points, at whichTbreaks up into submatrices. The first submatrix consists of rows/columns1toISPLIT( 1 ), the second of rows/columnsISPLIT( 1 )+1throughISPLIT( 2 ), etc. (The output arrayISPLITfromDSTEBZis expected here.)ZโZis aCOMPLEX*16 array, dimension (LDZ, M). The computed eigenvectors. The eigenvector associated with the eigenvalueW(i)is stored in thei-th column ofZ. Any vector which fails to converge is set to its current iterate afterMAXITSiterations. The imaginary parts of the eigenvectors are set to zero. ๐LDZโLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= max(1,N).WORKโWORKis aDOUBLE PRECISION array, dimension (5*N).IWORKโIWORKis anINTEGER array, dimension (N).IFAILโIFAILis anINTEGER array, dimension (M). On normal exit, all elements ofIFAILare zero. If one or more eigenvectors fail to converge afterMAXITSiterations, then their indices are stored in arrayIFAIL. ๐INFOโINFOisINTEGER:= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value.> 0: ifINFO = i, thenieigenvectors failed to converge inMAXITSiterations. Their indices are stored in arrayIFAIL.
Internal Parameters ๐
MAXITSโINTEGER, default = 5. The maximum number of iterations performed.EXTRAโINTEGER, default = 2. The number of iterations performed after norm growth criterion is satisfied, should be at least1.
Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
๐ Definition at line 180 of file zstein.f.
Author ๐
Generated automatically by Doxygen for LAPACK from the source code.
๐ and that's the whole stein(3) saga, bestie โ source: LAPACK, version 3.12.0, manpage stein(3). the footer doesn't give a date, so no cap, no invented date. go slay those eigenvectors ๐
โจ
๐ฆ 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