STEQR - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
template<typename T>
void steqr(char *compz, integer *n, T *d, T *e, T *z, integer *ldz, T *work, integer *info)#

Tridiagonal QR algorithm.

Purpose:

    Computation of all eigenvalues and, optionally, eigenvectors of a symmetric tridiagonal
    matrix using the implicit QL or QR method. The eigenvectors of a full or band symmetric
    matrix can also be found if SSYTRD or SSPTRD or SSBTRD has been used to reduce this
matrix to tridiagonal form.
Parameters:
  • jobz[in]

    jobz is char*

    = ‘N’: Compute eigenvalues only.

    = ‘V’: Compute eigenvalues and eigenvectors of the original symmetric matrix. On entry, Z must contain the orthogonal matrix used to reduce the original matrix to tridiagonal form.

    = ‘I’: Compute eigenvalues and eigenvectors of the tridiagonal matrix. Z is initialized to the identity matrix.

  • n[in]

    n is integer*

    The order of the matrix. n >= 0.

  • d[inout]

    d is float/double array, dimension (n)

    On entry, the diagonal elements of the tridiagonal matrix.

    On exit, if info = 0, the eigenvalues in ascending order.
  • e[inout]

    e is float/double array, dimension (n-1)

    On entry, the (n-1) subdiagonal elements of the tridiagonal matrix.

    On exit, E has been destroyed.
  • z[inout]

    z is float/double array, dimension (ldz, n)

    On entry, if jobz = ‘V’, then Z contains the orthogonal matrix used in the reduction to tridiagonal form.

    On exit, if info = 0, then if jobz = ‘V’, Z contains the orthonormal eigenvectors of the original symmetric matrix, and if jobz = ‘I’, Z contains the orthonormal eigenvectors of the symmetric tridiagonal matrix.

    If jobz = ‘N’, then Z is not referenced.

  • ldz[in]

    ldz is integer*

    The leading dimension of the array Z. ldz >= 1, and if eigenvectors are desired, then ldz >= fla_max(1,n).

  • WORK[out]

    WORK is REAL array, dimension (fla_max(1,2*N-2))

    If COMPZ = ‘N’, then WORK is not referenced.

  • INFO[out]

    INFO is INTEGER

    = 0: successful exit

    < 0: if INFO = -i, the i-th argument had an illegal value

    > 0: the algorithm has failed to find all the eigenvalues in a total of 30*N iterations; if INFO = i, then i elements of E have not converged to zero; on exit, D and E contain the elements of a symmetric tridiagonal matrix which is unitarily similar to the original matrix.

template<typename T, typename Ta>
void steqr(char *compz, integer *n, Ta *d, Ta *e, T *z, integer *ldz, Ta *work, integer *info)#