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 โ€” N is INTEGER. The order of the matrix. N >= 0. โœจ
  • D โ€” D is REAL array, dimension (N). The n diagonal elements of the tridiagonal matrix T. ๐Ÿ’–
  • E โ€” E is REAL array, dimension (N-1). The (n-1) subdiagonal elements of the tridiagonal matrix T, stored in elements 1 to N-1. ๐Ÿฆ‹
  • M โ€” M is INTEGER. The number of eigenvectors to be found. 0 <= M <= N. ๐ŸŽฏ
  • W โ€” W is REAL array, dimension (N). The first M elements of W contain 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 array W from SSTEBZ with ORDER = 'B' is expected here. ) ๐Ÿ‘‘
  • IBLOCK โ€” IBLOCK is INTEGER array, dimension (N). The submatrix indices associated with the corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to the first submatrix from the top, =2 if W(i) belongs to the second submatrix, etc. ( The output array IBLOCK from SSTEBZ is expected here. ) ๐ŸŒธ
  • ISPLIT โ€” ISPLIT is INTEGER array, dimension (N). The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1 through ISPLIT( 2 ), etc. ( The output array ISPLIT from SSTEBZ is expected here. ) โœ‚๏ธ
  • Z โ€” Z is COMPLEX array, dimension (LDZ, M). The computed eigenvectors. The eigenvector associated with the eigenvalue W(i) is stored in the i-th column of Z. Any vector which fails to converge is set to its current iterate after MAXITS iterations. The imaginary parts of the eigenvectors are set to zero. ๐Ÿฉท
  • LDZ โ€” LDZ is INTEGER. The leading dimension of the array Z. LDZ >= max(1,N). ๐Ÿ“
  • WORK โ€” WORK is REAL array, dimension (5*N). ๐Ÿงฐ
  • IWORK โ€” IWORK is INTEGER array, dimension (N). ๐Ÿ—‚๏ธ
  • IFAIL โ€” IFAIL is INTEGER array, dimension (M). On normal exit, all elements of IFAIL are zero. If one or more eigenvectors fail to converge after MAXITS iterations, then their indices are stored in array IFAIL. ๐Ÿšฉ
  • INFO โ€” INFO is INTEGER:
    • = 0: successful exit ๐ŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value ๐Ÿ™ˆ
    • > 0: if INFO = i, then i eigenvectors failed to converge in MAXITS iterations. Their indices are stored in array IFAIL. ๐Ÿ˜ญ

๐Ÿฆ‹ 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 โ€” N is INTEGER. The order of the matrix. N >= 0. โœจ
  • D โ€” D is DOUBLE PRECISION array, dimension (N). The n diagonal elements of the tridiagonal matrix T. ๐Ÿ’–
  • E โ€” E is DOUBLE PRECISION array, dimension (N-1). The (n-1) subdiagonal elements of the tridiagonal matrix T, in elements 1 to N-1. note the phrasing bestie, it's in this time, not stored in โ€” we keep the receipts ๐Ÿงพ
  • M โ€” M is INTEGER. The number of eigenvectors to be found. 0 <= M <= N. ๐ŸŽฏ
  • W โ€” W is DOUBLE PRECISION array, dimension (N). The first M elements of W contain 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 array W from DSTEBZ with ORDER = 'B' is expected here. ) ๐Ÿ‘‘
  • IBLOCK โ€” IBLOCK is INTEGER array, dimension (N). The submatrix indices associated with the corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to the first submatrix from the top, =2 if W(i) belongs to the second submatrix, etc. ( The output array IBLOCK from DSTEBZ is expected here. ) ๐ŸŒธ
  • ISPLIT โ€” ISPLIT is INTEGER array, dimension (N). The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1 through ISPLIT( 2 ), etc. ( The output array ISPLIT from DSTEBZ is expected here. ) โœ‚๏ธ
  • Z โ€” Z is DOUBLE PRECISION array, dimension (LDZ, M). The computed eigenvectors. The eigenvector associated with the eigenvalue W(i) is stored in the i-th column of Z. Any vector which fails to converge is set to its current iterate after MAXITS iterations. ๐Ÿฉท
  • LDZ โ€” LDZ is INTEGER. The leading dimension of the array Z. LDZ >= max(1,N). ๐Ÿ“
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension (5*N). ๐Ÿงฐ
  • IWORK โ€” IWORK is INTEGER array, dimension (N). ๐Ÿ—‚๏ธ
  • IFAIL โ€” IFAIL is INTEGER array, dimension (M). On normal exit, all elements of IFAIL are zero. If one or more eigenvectors fail to converge after MAXITS iterations, then their indices are stored in array IFAIL. ๐Ÿšฉ
  • INFO โ€” INFO is INTEGER:
    • = 0: successful exit. ๐ŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value ๐Ÿ™ˆ
    • > 0: if INFO = i, then i eigenvectors failed to converge in MAXITS iterations. Their indices are stored in array IFAIL. ๐Ÿ˜ญ

๐Ÿฆ‹ 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 โ€” N is INTEGER. The order of the matrix. N >= 0. โœจ
  • D โ€” D is REAL array, dimension (N). The n diagonal elements of the tridiagonal matrix T. ๐Ÿ’–
  • 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 so E is a REAL array, dimension (N-1), and it's holding the (n-1) subdiagonal elements of the tridiagonal matrix T, in elements 1 to N-1. slay.
  • M โ€” M is INTEGER, the number of eigenvectors to be found. 0 <= M <= N, bestie.
  • W โ€” W is a REAL array, dimension (N). The first M elements 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 array W from SSTEBZ with ORDER = 'B' is expected here.) ๐Ÿ’…
  • IBLOCK โ€” IBLOCK is an INTEGER array, dimension (N), holding the submatrix indices associated with the corresponding eigenvalues in W. IBLOCK(i)=1 if eigenvalue W(i) belongs to the first submatrix from the top, =2 if W(i) belongs to the second submatrix, etc. (The output array IBLOCK from SSTEBZ is expected here.) โœจ
  • ISPLIT โ€” ISPLIT is an INTEGER array, dimension (N): the splitting points where T breaks up into submatrices. The first submatrix consists of rows/columns 1 to ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1 through ISPLIT( 2 ), etc. (The output array ISPLIT from SSTEBZ is expected here.) ๐Ÿฆ‹
  • Z โ€” Z is a REAL array, dimension (LDZ, M): the computed eigenvectors. The eigenvector associated with eigenvalue W(i) is stored in the i-th column of Z. Any vector which fails to converge is set to its current iterate after MAXITS iterations. ๐Ÿ˜ญ
  • LDZ โ€” LDZ is INTEGER, the leading dimension of the array Z. LDZ >= max(1,N), periodt.
  • WORK โ€” WORK is a REAL array, dimension (5*N). that's the whole vibe. ๐Ÿซถ
  • IWORK โ€” IWORK is an INTEGER array, dimension (N). iconic.
  • IFAIL โ€” IFAIL is an INTEGER array, dimension (M). On normal exit, all elements of IFAIL are zero. If one or more eigenvectors fail to converge after MAXITS iterations, then their indices are stored in array IFAIL. ๐Ÿ’€
  • INFO โ€” INFO is INTEGER:
    • = 0: successful exit.
    • < 0: if INFO = -i, the i-th argument had an illegal value.
    • > 0: if INFO = i, then i eigenvectors failed to converge in MAXITS iterations. Their indices are stored in array IFAIL.

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 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 โ€” N is INTEGER. The order of the matrix. N >= 0.
  • D โ€” D is a DOUBLE PRECISION array, dimension (N). The n diagonal elements of the tridiagonal matrix T.
  • E โ€” E is a DOUBLE PRECISION array, dimension (N-1). The (n-1) subdiagonal elements of the tridiagonal matrix T, stored in elements 1 to N-1.
  • M โ€” M is INTEGER. The number of eigenvectors to be found. 0 <= M <= N.
  • W โ€” W is a DOUBLE PRECISION array, dimension (N). The first M elements of W contain 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 array W from DSTEBZ with ORDER = 'B' is expected here.) ๐ŸŒธ
  • IBLOCK โ€” IBLOCK is an INTEGER array, dimension (N). The submatrix indices associated with the corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to the first submatrix from the top, =2 if W(i) belongs to the second submatrix, etc. (The output array IBLOCK from DSTEBZ is expected here.)
  • ISPLIT โ€” ISPLIT is an INTEGER array, dimension (N). The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1 through ISPLIT( 2 ), etc. (The output array ISPLIT from DSTEBZ is expected here.)
  • Z โ€” Z is a COMPLEX*16 array, dimension (LDZ, M). The computed eigenvectors. The eigenvector associated with the eigenvalue W(i) is stored in the i-th column of Z. Any vector which fails to converge is set to its current iterate after MAXITS iterations. The imaginary parts of the eigenvectors are set to zero. ๐Ÿ™ˆ
  • LDZ โ€” LDZ is INTEGER. The leading dimension of the array Z. LDZ >= max(1,N).
  • WORK โ€” WORK is a DOUBLE PRECISION array, dimension (5*N).
  • IWORK โ€” IWORK is an INTEGER array, dimension (N).
  • IFAIL โ€” IFAIL is an INTEGER array, dimension (M). On normal exit, all elements of IFAIL are zero. If one or more eigenvectors fail to converge after MAXITS iterations, then their indices are stored in array IFAIL. ๐Ÿ’€
  • INFO โ€” INFO is INTEGER:
    • = 0: successful exit.
    • < 0: if INFO = -i, the i-th argument had an illegal value.
    • > 0: if INFO = i, then i eigenvectors failed to converge in MAXITS iterations. Their indices are stored in array IFAIL.

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