SSTEIN2(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’– SSTEIN2(l) β€” bestie, it's eigenvector o'clock πŸ’–

okay so welcome to SSTEIN2, a LAPACK routine (we're on version 1.5, vintage but iconic) and she's here to do exactly one thing and do it gorgeously: compute the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. that's the whole personality. no notes. πŸ’…


✨ NAME ✨

SSTEIN2 β€” she computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. πŸ¦‹


🌸 SYNOPSIS 🌸

SUBROUTINE SSTEIN2( N, D, E, M, W, IBLOCK, ISPLIT, ORFAC, Z, LDZ, WORK,
                    IWORK, IFAIL, INFO )

    INTEGER         INFO, LDZ, M, N

    REAL            ORFAC

    INTEGER         IBLOCK( * ), IFAIL( * ), ISPLIT( * ), IWORK( * )

    REAL            D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )

like… look at her. fourteen arguments. she's serving main character energy and she knows it. πŸ‘‘


πŸŽ€ PURPOSE πŸŽ€

SSTEIN2 computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. periodt. that's the gig.

the maximum number of iterations allowed for each eigenvector is specified by an internal parameter MAXITS (currently set to 5). so like, five tries per eigenvector, bestie. that's the budget. 🫢


πŸ’œ ARGUMENTS πŸ’œ

  • N (input) INTEGER β€” the order of the matrix. N >= 0. can't be negative, that's not a vibe. 🚫
  • D (input) REAL array, dimension (N) β€” the n diagonal elements of the tridiagonal matrix T. the main slay line. πŸ’«
  • E (input) REAL array, dimension (N) β€” the (n-1) subdiagonal elements of the tridiagonal matrix T, in elements 1 to N-1. E(N) need not be set. so like, bestie, the last one can just… not. she's off duty. πŸ™ˆ
  • M (input) INTEGER β€” the number of eigenvectors to be found. 0 <= M <= N. keep it in range or we're gonna have a moment. 😭
  • W (input) 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.) so like, do the sorting first, we're not doing it for you. 😌
  • IBLOCK (input) 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.) it's giving "which block do you belong to, babe". 🏷️
  • ISPLIT (input) 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.) the way she just divides β€” iconic. βœ‚οΈ
  • ORFAC (input) REAL β€” ORFAC specifies which eigenvectors should be orthogonalized. eigenvectors that correspond to eigenvalues which are within ORFAC*||T|| of each other are to be orthogonalized. basically: too close together? we're making them perpendicular. no cap. πŸ“
  • Z (output) REAL 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. so like, if she gives up, she leaves what she had. it's giving "good enough, babe". πŸ’€
  • LDZ (input) INTEGER β€” the leading dimension of the array Z. LDZ >= max(1,N). respect the dimension, bestie. ✨
  • WORK (workspace) REAL array, dimension (5*N). her little scratch pad. πŸ“
  • IWORK (workspace) INTEGER array, dimension (N). more scratch pad, but integers this time. πŸ’œ
  • IFAIL (output) 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. the naughty list. you do NOT want your index here. πŸ“
  • INFO (output) INTEGER β€” the receipts:
    • = 0: successful exit. slay. βœ…
    • < 0: if INFO = -i, the i-th argument had an illegal value. bestie what did you DO. 😭
    • > 0: if INFO = i, then i eigenvectors failed to converge in MAXITS iterations. their indices are stored in array IFAIL. she tried. she really did. πŸ₯²

🌈 PARAMETERS 🌈

  • MAXITS INTEGER, default = 5 β€” the maximum number of iterations performed. five. that's the limit. manifest convergence. πŸ•―οΈ
  • EXTRA INTEGER, default = 2 β€” the number of iterations performed after norm growth criterion is satisfied, should be at least 1. so like, a little victory lap after the norm growth criterion is satisfied. but minimum 1, okay? don't be skipping the lap. πŸƒβ€β™€οΈ

⚠️ heads up bestie: W, IBLOCK, and ISPLIT all wanna come from SSTEBZ (with ORDER = 'B' for W). don't show up with random arrays and expect magic. πŸ’–

πŸ’– that's the whole page, bestie πŸ’– this was LAPACK version 1.5, dated 12 May 1997 β€” yes she's a 90s baby and she's still eating. πŸŽ€ go orthogonalize something. πŸ¦‹βœ¨

πŸ“¦ where this page comes from