STEIN - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
template<typename T>
void stein(integer *n, T *d, T *e, integer *m, T *w, integer *iblock, integer *isplit, T *z, integer *ldz, T *work, integer *iwork, integer *ifail, integer *info)#

STEIN computes the eigenvectors of a real symmetric tridiagonal matrix T.

Purpose:

  STEIN 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).
Parameters:
  • N[in]

    N is INTEGER

    The order of the matrix. N >= 0.

  • D[in]

    D is REAL array, dimension (N)

    The n diagonal elements of the tridiagonal matrix T.

  • E[in]

    E is REAL array, dimension (N-1)

    The (n-1) subdiagonal elements of the tridiagonal matrix T, in elements 1 to N-1.

  • M[in]

    M is INTEGER

    The number of eigenvectors to be found. 0 <= M <= N.

  • W[in]

    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[in]

    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[in]

    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[out]

    Z is 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.

  • LDZ[in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= fla_max(1,N).

  • WORK[out] WORK is REAL array, dimension (5*N)

  • IWORK[out] IWORK is INTEGER array, dimension (N)

  • IFAIL[out]

    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[out]

    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.

template<typename T, typename Ta>
void stein(integer *n, Ta *d, Ta *e, integer *m, Ta *w, integer *iblock, integer *isplit, T *z, integer *ldz, Ta *work, integer *iwork, integer *ifail, integer *info)#