Symmetric Eigen Values APIs

Contents

Symmetric Eigen Values APIs#

SYEV#

group syev

Functions

template<typename T>
void syev(char *jobz, char *uplo, integer *n, T *a, integer *lda, T *w, T *work, integer *lwork, integer *info)#

Eigenvalue decomposition (QR algorithm)

Purpose:

    Eigenvalue decomposition (QR algorithm).
    Computation of all eigenvalues and, optionally, eigenvectors of a real symmetric matrix a.

Parameters:
  • jobz – [in]

    jobz is char*

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a is stored;

    = ‘L’: Lower triangle of a is stored.

  • n – [in]

    n is integer*

    The order of the matrix a. n >= 0.

  • a – [inout]

    a is float/double array, dimension (lda, n)

    On entry, the symmetric matrix a. If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a. If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a.

    On exit, if jobz = ‘V’, then if info = 0, A contains the orthonormal eigenvectors of the matrix a.

    If jobz = ‘N’, then on exit the lower triangle (if uplo=’L’) or the upper triangle (if uplo=’U’) of A, including the diagonal, is destroyed.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • w – [out]

    w is float/double array, dimension (n)

    If info = 0, the eigenvalues in ascending order.

  • WORK – [out]

    WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The length of the array WORK. LWORK >= fla_max(1,3*N-1).

    For optimal efficiency, LWORK >= (NB+2)*N, where NB is the blocksize for DSYTRD returned by ILAENV.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: if INFO = i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.

SYEVD#

group syevd

Functions

template<typename T>
void syevd(char *jobz, char *uplo, integer *n, T *a, integer *lda, T *w, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

Eigenvalue decomposition (divide-and-conquer)

Purpose:

       Computation of the eigenvalues and, optionally, the left and/or right eigenvectors for SY
       matrices. SSYEVD computes all eigenvalues and, optionally, eigenvectors of a real
       symmetric matrix a. If eigenvectors are desired, it uses a divide and conquer algorithm.

       The divide and conquer algorithm makes very mild assumptions about floating point
       arithmetic. It will work on machines with a guard digit in add/subtract, or on those
       binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray
       C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without
       guard digits, but we know of none.

       Because of large use of BLAS of level 3, SSYEVD needs N**2 more workspace than SSYEVX.

Parameters:
  • jobz – [in]

    jobz is char*

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a is stored;

    = ‘L’: Lower triangle of a is stored.

  • n – [in]

    n is integer*

    The order of the matrix a. n >= 0.

  • a – [inout]

    a is float/double array, dimension (lda, n)

    On entry, the symmetric matrix a. If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a. If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a.

    On exit, if jobz = ‘V’, then if info = 0, A contains the orthonormal eigenvectors of the matrix a.

    If jobz = ‘N’, then on exit the lower triangle (if uplo=’L’) or the upper triangle (if uplo=’U’) of A, including the diagonal, is destroyed.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • w – [out]

    w is float/double array, dimension (n)

    If info = 0, the eigenvalues in ascending order.

  • WORK – [out]

    WORK is DOUBLE PRECISION array, dimension (LWORK)

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If N <= 1, LWORK must be at least 1.

    If JOBZ = ‘N’ and N > 1, LWORK must be at least 2*N+1.

    If JOBZ = ‘V’ and N > 1, LWORK must be at least 1 + 6*N + 2*N**2.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK.

    If N <= 1, LIWORK must be at least 1.

    If JOBZ = ‘N’ and N > 1, LIWORK must be at least 1.

    If JOBZ = ‘V’ and N > 1, LIWORK must be at least 3 + 5*N.

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: if INFO = i and JOBZ = ‘N’, then the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero; if INFO = i and JOBZ = ‘V’, then the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1).

SYEVR#

group syevr

Functions

template<typename T>
void syevr(char *jobz, char *range, char *uplo, integer *n, T *a, integer *lda, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, integer *isuppz, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

Hermitian eigenvalue decomposition (MRRR)

Purpose:

       Hermitian eigenvalue decomposition (MRRR).
       Computation of eigenvalues and, optionally, the left and/or right eigenvectors for SY
       matrices

       SSYEVR computes selected eigenvalues and, optionally, eigenvectors of a real symmetric
       matrix a. Eigenvalues and eigenvectors can be selected by specifying either a range of
       values or a range of indices for the desired eigenvalues.

       SSYEVR first reduces the matrix a to tridiagonal form T with a call to SSYTRD.  Then,
       whenever possible, SSYEVR calls SSTEMR to compute the eigenspectrum using Relatively
       Robust Representations. SSTEMR computes eigenvalues by the dqds algorithm, while orthogonal
       eigenvectors are computed from various "good" L D L^T representations (also known as
       Relatively Robust Representations). Gram-Schmidt orthogonalization is avoided as far as
       possible. More specifically, the various steps of the algorithm are as follows.

       For each unreduced block (submatrix) of T,
       (a) Compute T - sigma I  = L D L^T, so that L and D
       define all the wanted eigenvalues to high relative accuracy.
       This means that small relative changes in the entries of D and L
       cause only small relative changes in the eigenvalues and
       eigenvectors. The standard (unfactored) representation of the
       tridiagonal matrix T does not have this property in general.
       (b) Compute the eigenvalues to suitable accuracy.
       If the eigenvectors are desired, the algorithm attains full
       accuracy of the computed eigenvalues only right before
       the corresponding vectors have to be computed, see steps c) and d).
       (c) For each cluster of close eigenvalues, select a new
       shift close to the cluster, find a new factorization, and refine
       the shifted eigenvalues to suitable accuracy.
       (d) For each eigenvalue with a large enough relative separation compute
       the corresponding eigenvector by forming a rank revealing twisted
       factorization. Go back to (c) for any clusters that remain.

       The desired accuracy of the output can be specified by the input parameter abstol.

       For more details, see SSTEMR's documentation and:
       - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations to compute
       orthogonal eigenvectors of symmetric tridiagonal matrices," Linear Algebra and its
       Applications, 387(1), pp. 1-28, August 2004.
       - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and   Relative Gaps,"
       SIAM Journal on Matrix Analysis and Applications, Vol. 25,   2004.
       Also LAPACK Working Note 154.
       - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric tridiagonal
       eigenvalue/eigenvector problem",   Computer Science Division Technical Report No.
       UCB/CSD-97-971, UC Berkeley, May 1997.


       Note 1 : SSYEVR calls SSTEMR when the full spectrum is requested on machines which conform
       to the ieee-754 floating point standard. SSYEVR calls SSTEBZ and SSTEIN on non-ieee
       machines and when partial spectrum requests are made.

       Normal execution of SSTEMR may create NaNs and infinities and hence may abort due to a
       floating point exception in environments which do not handle NaNs and infinities in the
       ieee standard default manner.

Parameters:
  • jobz – [in]

    jobz is char*

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • range – [in]

    range is char*

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (vl,vu] will be found.

    = ‘I’: the il-th through iu-th eigenvalues will be found.

    For range = ‘V’ or ‘I’ and iu - il < N - 1, SSTEBZ and SSTEIN are called

  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a is stored;

    = ‘L’: Lower triangle of a is stored.

  • n – [in]

    n is integer*

    The order of the matrix a. n >= 0.

  • a – [inout]

    a is float/double array, dimension (lda, n)

    On entry, the symmetric matrix a. If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a. If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a.

    On exit, the lower triangle (if uplo=’L’) or the upper triangle (if uplo=’U’) of A, including the diagonal, is destroyed.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • vl – [in]

    vl is float/double*

    If range=’V’, the lower bound of the interval to be searched for eigenvalues. vl < vu.

    Not referenced if range = ‘A’ or ‘I’.

  • vu – [in]

    vu is float/double*

    If range=’V’, the upper bound of the interval to be searched for eigenvalues. vl < vu.

    Not referenced if range = ‘A’ or ‘I’.

  • il – [in]

    il is integer*

    If range=’I’, the index of the smallest eigenvalue to be returned.

    1 <= il <= iu <= N, if N > 0; il = 1 and iu = 0 if N = 0.

    Not referenced if range = ‘A’ or ‘V’.

  • iu – [in]

    iu is integer*

    If range=’I’, the index of the largest eigenvalue to be returned.

    1 <= il <= iu <= N, if N > 0; il = 1 and iu = 0 if N = 0.

    Not referenced if range = ‘A’ or ‘V’.

  • abstol – [in]

    abstol is float/double*

    The absolute error tolerance for the eigenvalues.

    An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    abstol + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If abstol is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

    See “Computing Small Singular Values of Bidiagonal Matrices

    with Guaranteed High Relative Accuracy,” by Demmel and Kahan, LAPACK Working Note #3.

    If high relative accuracy is important, set abstol to SLAMCH( ‘Safe minimum’). Doing so will guarantee that eigenvalues are computed to high relative accuracy when possible in future releases. The current code does not make any guarantees about high relative accuracy, but future releases will. See J. Barlow and J. Demmel, “Computing Accurate Eigensystems of Scaled Diagonally

    Dominant Matrices”, LAPACK Working Note #7, for a discussion of which matrices define their eigenvalues to high relative accuracy.

  • m – [out]

    m is integer*

    The total number of eigenvalues found. 0 <= m <= n.

    If range = ‘A’, m = n, and if range = ‘I’, m = iu-il+1.

  • w – [out]

    w is float/double/COMPLEX/COMPLEX*16 array, dimension (n)

    The first m elements contain the selected eigenvalues in ascending order.

  • z – [out]

    z is float/double array, dimension (ldz, fla_max(1,m))

    If jobz = ‘V’, then if info = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix a corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i).

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

    Note: the user must ensure that at least fla_max(1,m) columns are supplied in the array Z; if range = ‘V’, the exact value of m is not known in advance and an upper bound must be used. Supplying n columns is always safe.

  • ldz – [in]

    ldz is integer*

    The leading dimension of the array Z. ldz >= 1, and if jobz = ‘V’, ldz >= fla_max(1,n).

  • isuppz – [out]

    isuppz is integer array, dimension ( 2*max(1,m))

    The support of the eigenvectors in Z, i.e., the indices indicating the nonzero elements in Z. The i-th eigenvector is nonzero only in elements isuppz( 2*i-1) through isuppz( 2*i). This is an output of SSTEMR (tridiagonal matrix). The support of the eigenvectors of A is typically 1:N because of the orthogonal transformations applied by SORMTR.

    Implemented only for range = ‘A’ or ‘I’ and iu - il = N - 1

  • WORK – [out]

    WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK >= fla_max(1,26*N). For optimal efficiency, LWORK >= (NB+6)*N, where NB is the max of the blocksize for DSYTRD and DORMTR returned by ILAENV.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if INFO = 0, IWORK(1) returns the optimal LWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK. LIWORK >= fla_max(1,10*N).

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the IWORK array, returns this value as the first entry of the IWORK array, and no error message related to LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: Internal error

SYEVX#

group syevx

Functions

template<typename T>
void syevx(char *jobz, char *range, char *uplo, integer *n, T *a, integer *lda, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, T *work, integer *lwork, integer *iwork, integer *ifail, integer *info)#

SYEVX computes the eigenvalues and, optionally, the left

and/or right eigenvectors for SY matrices.

Purpose:

    SYEVX computes selected eigenvalues and, optionally, eigenvectors
    of a real symmetric matrix A.  Eigenvalues and eigenvectors can be
    selected by specifying either a range of values or a range of indices
    for the desired eigenvalues.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found.

    = ‘I’: the IL-th through IU-th eigenvalues will be found.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • A – [inout]

    A is REAL array, dimension (LDA, N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A.

    On exit, the lower triangle (if UPLO=’L’) or the upper triangle (if UPLO=’U’) of A, including the diagonal, is destroyed.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    ABSTOL + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

    Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH(‘S’), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH(‘S’).

    See “Computing Small Singular Values of Bidiagonal Matrices

    with Guaranteed High Relative Accuracy,” by Demmel and Kahan, LAPACK Working Note #3.

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N. If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    On normal exit, the first M elements contain the selected eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

    If JOBZ = ‘V’, then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.

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

    Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z; if RANGE = ‘V’, the exact value of M is not known in advance and an upper bound must be used.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The length of the array WORK. LWORK >= 1, when N <= 1; otherwise 8*N.

    For optimal efficiency, LWORK >= (NB+3)*N, where NB is the max of the blocksize for SSYTRD and SORMTR returned by ILAENV.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

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

  • IFAIL – [out]

    IFAIL is INTEGER array, dimension (N)

    If JOBZ = ‘V’, then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge.

    If JOBZ = ‘N’, then IFAIL is not referenced.

  • 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. Their indices are stored in array IFAIL.

SYEVX_2STAGE#

group syevx_2stage

Functions

template<typename T>
void syevx_2stage(char *jobz, char *range, char *uplo, integer *n, T *a, integer *lda, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, T *work, integer *lwork, integer *iwork, integer *ifail, integer *info)#

SYEVX_2STAGE computes the eigenvalues and, optionally, the left

and/or right eigenvectors for SY matrices.

Purpose:

    SYEVX_2STAGE computes selected eigenvalues and, optionally, eigenvectors
    of a real symmetric matrix A using the 2stage technique for
    the reduction to tridiagonal.  Eigenvalues and eigenvectors can be
    selected by specifying either a range of values or a range of indices
    for the desired eigenvalues.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors. Not available in this release.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found.

    = ‘I’: the IL-th through IU-th eigenvalues will be found.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • A – [inout]

    A is REAL array, dimension (LDA, N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A.

    On exit, the lower triangle (if UPLO=’L’) or the upper triangle (if UPLO=’U’) of A, including the diagonal, is destroyed.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    ABSTOL + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

    Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH(‘S’), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH(‘S’).

    See “Computing Small Singular Values of Bidiagonal Matrices

    with Guaranteed High Relative Accuracy,” by Demmel and Kahan, LAPACK Working Note #3.

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N. If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    On normal exit, the first M elements contain the selected eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

    If JOBZ = ‘V’, then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.

    If JOBZ = ‘N’, then Z is not referenced. Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z; if RANGE = ‘V’, the exact value of M is not known in advance and an upper bound must be used.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The length of the array WORK. LWORK >= 1, when N <= 1;

    otherwise

    If JOBZ = ‘N’ and N > 1, LWORK must be queried. LWORK = MAX(1, 8*N, dimension) where dimension = fla_max(stage1,stage2) + (KD+1)*N + 3*N = N*KD + N*max(KD+1,FACTOPTNB)

    • fla_max(2*KD*KD, KD*NTHREADS)

    • (KD+1)*N + 3*N where KD is the blocking size of the reduction, FACTOPTNB is the blocking used by the QR or LQ algorithm, usually FACTOPTNB=128 is a good choice NTHREADS is the number of threads used when openMP compilation is enabled, otherwise =1.

      If JOBZ = ‘V’ and N > 1, LWORK must be queried. Not yet available

      If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

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

  • IFAIL – [out]

    IFAIL is INTEGER array, dimension (N)

    If JOBZ = ‘V’, then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge.

    If JOBZ = ‘N’, then IFAIL is not referenced.

  • 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. Their indices are stored in array IFAIL.

SYEV_2STAGE#

group syev_2stage

Functions

template<typename T>
void syev_2stage(char *jobz, char *uplo, integer *n, T *a, integer *lda, T *w, T *work, integer *lwork, integer *info)#

SYEV_2STAGE computes the eigenvalues and, optionally, the left

and/or right eigenvectors for SY matrices.

Purpose:

    SYEV_2STAGE computes all eigenvalues and, optionally, eigenvectors of a
    real symmetric matrix A using the 2stage technique for
    the reduction to tridiagonal.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors. Not available in this release.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • A – [inout]

    A is REAL array, dimension (LDA, N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A.

    On exit, if JOBZ = ‘V’, then if INFO = 0, A contains the orthonormal eigenvectors of the matrix A. If JOBZ = ‘N’, then on exit the lower triangle (if UPLO=’L’) or the upper triangle (if UPLO=’U’) of A, including the diagonal, is destroyed.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • WORK – [out]

    WORK is REAL array, dimension LWORK

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The length of the array WORK. LWORK >= 1, when N <= 1;

    otherwise

    If JOBZ = ‘N’ and N > 1, LWORK must be queried. LWORK = MAX(1, dimension) where

    dimension = fla_max(stage1,stage2) + (KD+1)*N + 2*N

    = N*KD + N*max(KD+1,FACTOPTNB)

    • fla_max(2*KD*KD, KD*NTHREADS)

    • (KD+1)*N + 2*N

      where KD is the blocking size of the reduction, FACTOPTNB is the blocking used by the QR or LQ algorithm, usually FACTOPTNB=128 is a good choice NTHREADS is the number of threads used when openMP compilation is enabled, otherwise =1.

      If JOBZ = ‘V’ and N > 1, LWORK must be queried. Not yet available

      If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: if INFO = i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.

SYEVR_2STAGE#

group syevr_2stage

Functions

template<typename T>
void syevr_2stage(char *jobz, char *range, char *uplo, integer *n, T *a, integer *lda, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, integer *isuppz, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

SYEVR_2STAGE computes the eigenvalues and, optionally, the left

and/or right eigenvectors for SY matrices.

Purpose:

    SYEVR_2STAGE computes selected eigenvalues and, optionally, eigenvectors
    of a real symmetric matrix A using the 2stage technique for
    the reduction to tridiagonal.  Eigenvalues and eigenvectors can be
    selected by specifying either a range of values or a range of
    indices for the desired eigenvalues.

    SYEVR_2STAGE first reduces the matrix A to tridiagonal form T with a call
    to SYTRD.  Then, whenever possible, SYEVR_2STAGE calls STEMR to compute
    the eigenspectrum using Relatively Robust Representations.  STEMR
    computes eigenvalues by the dqds algorithm, while orthogonal
    eigenvectors are computed from various "good" L D L^T representations
    (also known as Relatively Robust Representations). Gram-Schmidt
    orthogonalization is avoided as far as possible. More specifically,
    the various steps of the algorithm are as follows.

    For each unreduced block (submatrix) of T,
       (a) Compute T - sigma I  = L D L^T, so that L and D
           define all the wanted eigenvalues to high relative accuracy.
           This means that small relative changes in the entries of D and L
           cause only small relative changes in the eigenvalues and
           eigenvectors. The standard (unfactored) representation of the
           tridiagonal matrix T does not have this property in general.
       (b) Compute the eigenvalues to suitable accuracy.
           If the eigenvectors are desired, the algorithm attains full
           accuracy of the computed eigenvalues only right before
           the corresponding vectors have to be computed, see steps c) and d).
       (c) For each cluster of close eigenvalues, select a new
           shift close to the cluster, find a new factorization, and refine
           the shifted eigenvalues to suitable accuracy.
       (d) For each eigenvalue with a large enough relative separation compute
           the corresponding eigenvector by forming a rank revealing twisted
           factorization. Go back to (c) for any clusters that remain.

    The desired accuracy of the output can be specified by the input
    parameter ABSTOL.

    For more details, see SSTEMR's documentation and:
    - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
      to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
      Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
    - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
      Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
      2004.  Also LAPACK Working Note 154.
    - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
      tridiagonal eigenvalue/eigenvector problem",
      Computer Science Division Technical Report No. UCB/CSD-97-971,
      UC Berkeley, May 1997.


    Note 1 : SSYEVR_2STAGE calls SSTEMR when the full spectrum is requested
    on machines which conform to the ieee-754 floating point standard.
    SSYEVR_2STAGE calls SSTEBZ and SSTEIN on non-ieee machines and
    when partial spectrum requests are made.

    Normal execution of SSTEMR may create NaNs and infinities and
    hence may abort due to a floating point exception in environments
    which do not handle NaNs and infinities in the ieee standard default
    manner.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors. Not available in this release.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found.

    = ‘I’: the IL-th through IU-th eigenvalues will be found. For RANGE = ‘V’ or ‘I’ and IU - IL < N - 1, SSTEBZ and SSTEIN are called

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • A – [inout]

    A is REAL array, dimension (LDA, N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A.

    On exit, the lower triangle (if UPLO=’L’) or the upper triangle (if UPLO=’U’) of A, including the diagonal, is destroyed.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    ABSTOL + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

    See “Computing Small Singular Values of Bidiagonal Matrices

    with Guaranteed High Relative Accuracy,” by Demmel and Kahan, LAPACK Working Note #3.

    If high relative accuracy is important, set ABSTOL to SLAMCH( ‘Safe minimum’). Doing so will guarantee that eigenvalues are computed to high relative accuracy when possible in future releases. The current code does not make any guarantees about high relative accuracy, but future releases will. See J. Barlow and J. Demmel, “Computing Accurate Eigensystems of Scaled Diagonally

    Dominant Matrices”, LAPACK Working Note #7, for a discussion of which matrices define their eigenvalues to high relative accuracy.

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N. If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    The first M elements contain the selected eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

    If JOBZ = ‘V’, then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i).

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

    Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z; if RANGE = ‘V’, the exact value of M is not known in advance and an upper bound must be used. Supplying N columns is always safe.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • ISUPPZ – [out]

    ISUPPZ is INTEGER array, dimension ( 2*max(1,M))

    The support of the eigenvectors in Z, i.e., the indices indicating the nonzero elements in Z. The i-th eigenvector is nonzero only in elements ISUPPZ( 2*i-1) through ISUPPZ( 2*i). This is an output of SSTEMR (tridiagonal matrix). The support of the eigenvectors of A is typically 1:N because of the orthogonal transformations applied by SORMTR. Implemented only for RANGE = ‘A’ or ‘I’ and IU - IL = N - 1

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If JOBZ = ‘N’ and N > 1, LWORK must be queried. LWORK = MAX(1, 26*N, dimension) where dimension = fla_max(stage1,stage2) + (KD+1)*N + 5*N = N*KD + N*max(KD+1,FACTOPTNB)
    • fla_max(2*KD*KD, KD*NTHREADS)

    • (KD+1)*N + 5*N where KD is the blocking size of the reduction, FACTOPTNB is the blocking used by the QR or LQ algorithm, usually FACTOPTNB=128 is a good choice NTHREADS is the number of threads used when openMP compilation is enabled, otherwise =1.

      If JOBZ = ‘V’ and N > 1, LWORK must be queried. Not yet available

      If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if INFO = 0, IWORK(1) returns the optimal LWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK. LIWORK >= fla_max(1,10*N).

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the IWORK array, returns this value as the first entry of the IWORK array, and no error message related to LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: Internal error

SPEV#

group spev

Functions

template<typename T>
void spev(char *jobz, char *uplo, integer *n, T *ap, T *w, T *z, integer *ldq, T *work, integer *info)#

SSPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices.

Purpose:

    SSPEV computes all the eigenvalues and, optionally, eigenvectors of a
    real symmetric matrix A in packed storage.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • AP – [inout]

    AP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:

    if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;

    if UPLO = ‘L’, AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.

    On exit, AP is overwritten by values generated during the reduction to tridiagonal form. If UPLO = ‘U’, the diagonal and first superdiagonal of the tridiagonal matrix T overwrite the corresponding elements of A, and if UPLO = ‘L’, the diagonal and first subdiagonal of T overwrite the corresponding elements of A.

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, N)

    If JOBZ = ‘V’, then if INFO = 0, Z contains the orthonormal eigenvectors of the matrix A, with the i-th column of Z holding the eigenvector associated with W(i).

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

    > 0: if INFO = i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.

template<typename T, typename Ta>
void hpev(char *jobz, char *uplo, integer *n, T *ap, Ta *w, T *z, integer *ldq, T *work, Ta *rwork, integer *info)#

SPEVD#

group spevd

Functions

template<typename T>
void spevd(char *jobz, char *uplo, integer *n, T *ap, T *w, T *z, integer *ldz, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

SPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices.

Purpose:

    SPEVD computes all the eigenvalues and, optionally, eigenvectors
    of a real symmetric matrix A in packed storage. If eigenvectors are
    desired, it uses a divide and conquer algorithm.

    The divide and conquer algorithm makes very mild assumptions about
    floating point arithmetic. It will work on machines with a guard
    digit in add/subtract, or on those binary machines without guard
    digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
    Cray-2. It could conceivably fail on hexadecimal or decimal machines
    without guard digits, but we know of none.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • AP – [inout]

    AP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:

    if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;

    if UPLO = ‘L’, AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.

    On exit, AP is overwritten by values generated during the reduction to tridiagonal form. If UPLO = ‘U’, the diagonal and first superdiagonal of the tridiagonal matrix T overwrite the corresponding elements of A, and if UPLO = ‘L’, the diagonal and first subdiagonal of T overwrite the corresponding elements of A.

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, N)

    If JOBZ = ‘V’, then if INFO = 0, Z contains the orthonormal eigenvectors of the matrix A, with the i-th column of Z holding the eigenvector associated with W(i).

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the required LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If N <= 1, LWORK must be at least 1.

    If JOBZ = ‘N’ and N > 1, LWORK must be at least 2*N.

    If JOBZ = ‘V’ and N > 1, LWORK must be at least 1 + 6*N + N**2.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the required sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if INFO = 0, IWORK(1) returns the required LIWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK.

    If JOBZ = ‘N’ or N <= 1, LIWORK must be at least 1.

    If JOBZ = ‘V’ and N > 1, LIWORK must be at least 3 + 5*N.

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the required sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: if INFO = i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.

template<typename T, typename Ta>
void hpevd(char *jobz, char *uplo, integer *n, T *ap, Ta *w, T *z, integer *ldz, T *work, integer *lwork, Ta *rwork, integer *lrwork, integer *iwork, integer *liwork, integer *info)#

SPEVX#

group spevx

Functions

template<typename T>
void spevx(char *jobz, char *range, char *uplo, integer *n, T *ap, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, T *work, integer *iwork, integer *ifail, integer *info)#

SPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices.

Purpose:

    SPEVX computes selected eigenvalues and, optionally, eigenvectors
    of a real symmetric matrix A in packed storage.  Eigenvalues/vectors
    can be selected by specifying either a range of values or a range of
    indices for the desired eigenvalues.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found;

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found;

    = ‘I’: the IL-th through IU-th eigenvalues will be found.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • AP – [inout]

    AP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:

    if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;

    if UPLO = ‘L’, AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.

    On exit, AP is overwritten by values generated during the reduction to tridiagonal form. If UPLO = ‘U’, the diagonal and first superdiagonal of the tridiagonal matrix T overwrite the corresponding elements of A, and if UPLO = ‘L’, the diagonal and first subdiagonal of T overwrite the corresponding elements of A.

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    ABSTOL + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AP to tridiagonal form.

    Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH(‘S’), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH(‘S’).

    See “Computing Small Singular Values of Bidiagonal Matrices

    with Guaranteed High Relative Accuracy,” by Demmel and Kahan, LAPACK Working Note #3.

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N. If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the selected eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

    If JOBZ = ‘V’, then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.

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

    Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z; if RANGE = ‘V’, the exact value of M is not known in advance and an upper bound must be used.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

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

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

  • IFAIL – [out]

    IFAIL is INTEGER array, dimension (N)

    If JOBZ = ‘V’, then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge.

    If JOBZ = ‘N’, then IFAIL is not referenced.

  • 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. Their indices are stored in array IFAIL.

template<typename T, typename Ta>
void spevx(char *jobz, char *range, char *uplo, integer *n, T *ap, Ta *vl, Ta *vu, integer *il, integer *iu, Ta *abstol, integer *m, Ta *w, T *z, integer *ldz, T *work, Ta *rwork, integer *iwork, integer *ifail, integer *info)#

STEV#

group stev

Functions

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

STEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices.

Purpose:

    STEV computes all eigenvalues and, optionally, eigenvectors of a
    real symmetric tridiagonal matrix A.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • N – [in]

    N is INTEGER

    The order of the matrix. N >= 0.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the n diagonal elements of the tridiagonal matrix A. On exit, if INFO = 0, the eigenvalues in ascending order.

  • E – [inout]

    E is REAL array, dimension (N-1)

    On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A, stored in elements 1 to N-1 of E. On exit, the contents of E are destroyed.

  • Z – [out]

    Z is REAL array, dimension (LDZ, N)

    If JOBZ = ‘V’, then if INFO = 0, Z contains the orthonormal eigenvectors of the matrix A, with the i-th column of Z holding the eigenvector associated with D(i).

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • WORK – [out] WORK is REAL array, dimension (fla_max(1,2*N-2)) If JOBZ = ‘N’, 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: if INFO = i, the algorithm failed to converge; i off-diagonal elements of E did not converge to zero.

STEVD#

group stevd

Functions

template<typename T>
void stevd(char *jobz, integer *n, T *d, T *e, T *z, integer *ldz, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

STEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices.

Purpose:

    STEVD computes all eigenvalues and, optionally, eigenvectors of a
    real symmetric tridiagonal matrix. If eigenvectors are desired, it
    uses a divide and conquer algorithm.

    The divide and conquer algorithm makes very mild assumptions about
    floating point arithmetic. It will work on machines with a guard
    digit in add/subtract, or on those binary machines without guard
    digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
    Cray-2. It could conceivably fail on hexadecimal or decimal machines
    without guard digits, but we know of none.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • N – [in]

    N is INTEGER

    The order of the matrix. N >= 0.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the n diagonal elements of the tridiagonal matrix A. On exit, if INFO = 0, the eigenvalues in ascending order.

  • E – [inout]

    E is REAL array, dimension (N-1)

    On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A, stored in elements 1 to N-1 of E. On exit, the contents of E are destroyed.

  • Z – [out]

    Z is REAL array, dimension (LDZ, N)

    If JOBZ = ‘V’, then if INFO = 0, Z contains the orthonormal eigenvectors of the matrix A, with the i-th column of Z holding the eigenvector associated with D(i).

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • WORK – [out]

    WORK is REAL array, dimension (LWORK)

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If JOBZ = ‘N’ or N <= 1 then LWORK must be at least 1.

    If JOBZ = ‘V’ and N > 1 then LWORK must be at least ( 1 + 4*N + N**2 ).

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK.

    If JOBZ = ‘N’ or N <= 1 then LIWORK must be at least 1.

    If JOBZ = ‘V’ and N > 1 then LIWORK must be at least 3+5*N.

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: if INFO = i, the algorithm failed to converge; i off-diagonal elements of E did not converge to zero.

STEVR#

group stevr

Functions

template<typename T>
void stevr(char *jobz, char *range, integer *n, T *d, T *e, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, integer *isuppz, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

STEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices.

Purpose:

    STEVR computes selected eigenvalues and, optionally, eigenvectors
    of a real symmetric tridiagonal matrix T.  Eigenvalues and
    eigenvectors can be selected by specifying either a range of values
    or a range of indices for the desired eigenvalues.

    Whenever possible, SSTEVR calls SSTEMR to compute the
    eigenspectrum using Relatively Robust Representations.  SSTEMR
    computes eigenvalues by the dqds algorithm, while orthogonal
    eigenvectors are computed from various "good" L D L^T representations
    (also known as Relatively Robust Representations). Gram-Schmidt
    orthogonalization is avoided as far as possible. More specifically,
    the various steps of the algorithm are as follows. For the i-th
    unreduced block of T,
       (a) Compute T - sigma_i = L_i D_i L_i^T, such that L_i D_i L_i^T
            is a relatively robust representation,
       (b) Compute the eigenvalues, lambda_j, of L_i D_i L_i^T to high
           relative accuracy by the dqds algorithm,
       (c) If there is a cluster of close eigenvalues, "choose" sigma_i
           close to the cluster, and go to step (a),
       (d) Given the approximate eigenvalue lambda_j of L_i D_i L_i^T,
           compute the corresponding eigenvector by forming a
           rank-revealing twisted factorization.
    The desired accuracy of the output can be specified by the input
    parameter ABSTOL.

    For more details, see "A new O(n^2) algorithm for the symmetric
    tridiagonal eigenvalue/eigenvector problem", by Inderjit Dhillon,
    Computer Science Division Technical Report No. UCB//CSD-97-971,
    UC Berkeley, May 1997.

    Note 1 : SSTEVR calls SSTEMR when the full spectrum is requested
    on machines which conform to the ieee-754 floating point standard.
    SSTEVR calls SSTEBZ and SSTEIN on non-ieee machines and
    when partial spectrum requests are made.

    Normal execution of SSTEMR may create NaNs and infinities and
    hence may abort due to a floating point exception in environments
    which do not handle NaNs and infinities in the ieee standard default
    manner.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found.

    = ‘I’: the IL-th through IU-th eigenvalues will be found.

    For RANGE = ‘V’ or ‘I’ and IU - IL < N - 1, SSTEBZ and SSTEIN are called

  • N – [in]

    N is INTEGER

    The order of the matrix. N >= 0.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the n diagonal elements of the tridiagonal matrix A.

    On exit, D may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.

  • E – [inout]

    E is REAL array, dimension (fla_max(1,N-1))

    On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A in elements 1 to N-1 of E.

    On exit, E may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    ABSTOL + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

    See “Computing Small Singular Values of Bidiagonal Matrices

    with Guaranteed High Relative Accuracy,” by Demmel and Kahan, LAPACK Working Note #3.

    If high relative accuracy is important, set ABSTOL to SLAMCH( ‘Safe minimum’). Doing so will guarantee that eigenvalues are computed to high relative accuracy when possible in future releases. The current code does not make any guarantees about high relative accuracy, but future releases will. See J. Barlow and J. Demmel, “Computing Accurate Eigensystems of Scaled Diagonally

    Dominant Matrices”, LAPACK Working Note #7, for a discussion of which matrices define their eigenvalues to high relative accuracy.

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N. If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    The first M elements contain the selected eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

    If JOBZ = ‘V’, then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z; if RANGE = ‘V’, the exact value of M is not known in advance and an upper bound must be used.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • ISUPPZ – [out]

    ISUPPZ is INTEGER array, dimension ( 2*max(1,M))

    The support of the eigenvectors in Z, i.e., the indices indicating the nonzero elements in Z. The i-th eigenvector is nonzero only in elements ISUPPZ( 2*i-1) through ISUPPZ( 2*i). Implemented only for RANGE = ‘A’ or ‘I’ and IU - IL = N - 1

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal (and minimal) LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK >= 20*N.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if INFO = 0, IWORK(1) returns the optimal (and minimal) LIWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK. LIWORK >= 10*N.

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: Internal error

STEVX#

group stevx

Functions

template<typename T>
void stevx(char *jobz, char *range, integer *n, T *d, T *e, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, float *work, integer *iwork, integer *ifail, integer *info)#

STEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices.

Purpose:

     STEVX computes selected eigenvalues and, optionally, eigenvectors
     of a real symmetric tridiagonal matrix A.  Eigenvalues and
     eigenvectors can be selected by specifying either a range of values
     or a range of indices for the desired eigenvalues.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found.

    = ‘I’: the IL-th through IU-th eigenvalues will be found.

  • N – [in]

    N is INTEGER

    The order of the matrix. N >= 0.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the n diagonal elements of the tridiagonal matrix A.

    On exit, D may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.

  • E – [inout]

    E is REAL array, dimension (fla_max(1,N-1))

    On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A in elements 1 to N-1 of E.

    On exit, E may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    ABSTOL + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix.

    Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH(‘S’), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH(‘S’).

    See “Computing Small Singular Values of Bidiagonal Matrices

    with Guaranteed High Relative Accuracy,” by Demmel and Kahan, LAPACK Working Note #3.

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N. If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    The first M elements contain the selected eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

    If JOBZ = ‘V’, then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). If an eigenvector fails to converge (INFO > 0), then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.

    If JOBZ = ‘N’, then Z is not referenced. Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z; if RANGE = ‘V’, the exact value of M is not known in advance and an upper bound must be used.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

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

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

  • IFAIL – [out]

    IFAIL is INTEGER array, dimension (N)

    If JOBZ = ‘V’, then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge.

    If JOBZ = ‘N’, then IFAIL is not referenced.

  • 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. Their indices are stored in array IFAIL.

PTEQR#

group pteqr

Functions

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

PTEQR computes all eigenvalues and, optionally, eigenvectors of a symmetric matrix.

Purpose:

    PTEQR computes all eigenvalues and, optionally, eigenvectors of a
    symmetric positive definite tridiagonal matrix by first factoring the
    matrix using SPTTRF, and then calling SBDSQR to compute the singular
    values of the bidiagonal factor.

    This routine computes the eigenvalues of the positive definite
    tridiagonal matrix to high relative accuracy.  This means that if the
    eigenvalues range over many orders of magnitude in size, then the
    small eigenvalues and corresponding eigenvectors will be computed
    more accurately than, for example, with the standard QR method.

    The eigenvectors of a full or band symmetric positive definite matrix
    can also be found if SSYTRD, SSPTRD, or SSBTRD has been used to
    reduce this matrix to tridiagonal form. (The reduction to tridiagonal
    form, however, may preclude the possibility of obtaining high
    relative accuracy in the small eigenvalues of the original matrix, if
    these eigenvalues range over many orders of magnitude.)

Parameters:
  • COMPZ – [in]

    COMPZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only.

    = ‘V’: Compute eigenvectors of original symmetric matrix also. Array Z contains the orthogonal matrix used to reduce the original matrix to tridiagonal form.

    = ‘I’: Compute eigenvectors of tridiagonal matrix also.

  • N – [in]

    N is INTEGER

    The order of the matrix. N >= 0.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the n diagonal elements of the tridiagonal matrix.

    On normal exit, D contains the eigenvalues, in descending order.

  • E – [inout]

    E is REAL 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 REAL array, dimension (LDZ, N)

    On entry, if COMPZ = ‘V’, the orthogonal matrix used in the reduction to tridiagonal form.

    On exit, if COMPZ = ‘V’, the orthonormal eigenvectors of the original symmetric matrix;

    if COMPZ = ‘I’, the orthonormal eigenvectors of the tridiagonal matrix.

    If INFO > 0 on exit, Z contains the eigenvectors associated with only the stored eigenvalues.

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if COMPZ = ‘V’ or ‘I’, LDZ >= fla_max(1,N).

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

    > 0: if INFO = i, and i is:

    <= N the Cholesky factorization of the matrix could not be performed because the i-th principal minor was not positive definite.

    > N the SVD algorithm failed to converge; if INFO = N+i, i off-diagonal elements of the bidiagonal factor did not converge to zero.

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

STEBZ#

group stebz

Functions

template<typename T>
void stebz(char *range, char *order, integer *n, T *vl, T *vu, integer *il, integer *iu, T *abstol, T *d, T *e, integer *m, integer *nsplit, T *w, integer *iblock, integer *isplit, T *work, integer *iwork, integer *info)#

STEBZ computes the eigenvalues of a symmetric tridiagonal matrix T.

Purpose:

    STEBZ computes the eigenvalues of a symmetric tridiagonal
    matrix T.  The user may ask for all eigenvalues, all eigenvalues
    in the half-open interval (VL, VU], or the IL-th through IU-th
    eigenvalues.

    To avoid overflow, the matrix must be scaled so that its
    largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value,
and for greatest accuracy, it should not be much smaller than that.

    See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
    Matrix", Report CS41, Computer Science Dept., Stanford
    University, July 21, 1966.

Parameters:
  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: (“All”) all eigenvalues will be found.

    = ‘V’: (“Value”) all eigenvalues in the half-open interval (VL, VU] will be found.

    = ‘I’: (“Index”) the IL-th through IU-th eigenvalues (of the entire matrix) will be found.

  • ORDER – [in]

    ORDER is CHARACTER*1

    = ‘B’: (“By Block”) the eigenvalues will be grouped by split-off block (see IBLOCK, ISPLIT) and ordered from smallest to largest within the block.

    = ‘E’: (“Entire matrix”) the eigenvalues for the entire matrix will be ordered from smallest to largest.

  • N – [in]

    N is INTEGER

    The order of the tridiagonal matrix T. N >= 0.

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. Eigenvalues less than or equal to VL, or greater than VU, will not be returned. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. Eigenvalues less than or equal to VL, or greater than VU, will not be returned. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    The absolute tolerance for the eigenvalues. An eigenvalue (or cluster) is considered to be located if it has been determined to lie in an interval whose width is ABSTOL or less. If ABSTOL is less than or equal to zero, then ULP*|T| will be used, where |T| means the 1-norm of T.

    Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH(‘S’), not zero.

  • 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) off-diagonal elements of the tridiagonal matrix T.

  • M – [out]

    M is INTEGER

    The actual number of eigenvalues found. 0 <= M <= N. (See also the description of INFO=2,3.)

  • NSPLIT – [out]

    NSPLIT is INTEGER

    The number of diagonal blocks in the matrix T. 1 <= NSPLIT <= N.

  • W – [out]

    W is REAL array, dimension (N)

    On exit, the first M elements of W will contain the eigenvalues. (SSTEBZ may use the remaining N-M elements as workspace.)

  • IBLOCK – [out]

    IBLOCK is INTEGER array, dimension (N)

    At each row/column j where E(j) is zero or small, the matrix T is considered to split into a block diagonal matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which block (from 1 to the number of blocks) the eigenvalue W(i) belongs. (SSTEBZ may use the remaining N-M elements as workspace.)

  • ISPLIT – [out]

    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., and the NSPLIT-th consists of rows/columns ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N. (Only the first NSPLIT elements will actually be used, but since the user cannot know a priori what value NSPLIT will have, N words must be reserved for ISPLIT.)

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

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: some or all of the eigenvalues failed to converge or were not computed:

    =1 or 3: Bisection failed to converge for some eigenvalues; these eigenvalues are flagged by a negative block number. The effect is that the eigenvalues may not be as accurate as the absolute and relative tolerances. This is generally caused by unexpectedly inaccurate arithmetic.

    =2 or 3: RANGE=’I’ only: Not all of the eigenvalues IL:IU were found.

    Effect: M < IU+1-IL

    Cause: non-monotonic arithmetic, causing the Sturm sequence to be non-monotonic.

    Cure: recalculate, using RANGE=’A’, and pick out eigenvalues IL:IU. In some cases, increasing the PARAMETER “FUDGE” may make things work.

    = 4: RANGE=’I’, and the Gershgorin interval initially used was too small. No eigenvalues were computed.

    Probable cause: your machine has sloppy floating-point arithmetic.

    Cure: Increase the PARAMETER “FUDGE”, recompile, and try again.

STEFR#

group stefr

Functions

template<typename T>
void sterf(integer *n, T *d, T *e, integer *info)#

STERF computes all eigenvalues of a symmetric tridiagonal matrix.

Purpose:

  STERF computes all eigenvalues of a symmetric tridiagonal matrix
  using the Pal-Walker-Kahan variant of the QL or QR algorithm.

Parameters:
  • N – [in]

    N is INTEGER

    The order of the matrix. N >= 0.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the n diagonal elements of the tridiagonal matrix. On exit, if INFO = 0, the eigenvalues in ascending order.

  • E – [inout]

    E is REAL array, dimension (N-1)

    On entry, the (n-1) subdiagonal elements of the tridiagonal matrix. On exit, E has been destroyed.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: the algorithm failed to find all of the eigenvalues in a total of 30*N iterations; if INFO = i, then i elements of E have not converged to zero.

STEDC#

group stedc

Functions

template<typename T>
void stedc(char *compz, integer *n, T *d, T *e, T *z, integer *ldz, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

Tridiagonal divide-and-conquer algorithm.

Purpose:

       Computation of all eigenvalues and, optionally, eigenvectors of a symmetric tridiagonal
       matrix using the divide and conquer method. The eigenvectors of a full or band real
       symmetric matrix can also be found if SSYTRD or SSPTRD or SSBTRD has been used to reduce
       this matrix to tridiagonal form.

       This code makes very mild assumptions about floating point arithmetic. It will work on
       machines with a guard digit in add/subtract, or on those binary machines without guard
       digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could
       conceivably fail on hexadecimal or decimal machines without guard digits, but we know of
       none.  See SLAED3 for details.

Parameters:
  • compz – [in]

    compz is char*

    = ‘N’: Compute eigenvalues only.

    = ‘I’: Compute eigenvectors of tridiagonal matrix also.

    = ‘V’: Compute eigenvectors of original dense symmetric matrix also. On entry, Z contains the orthogonal matrix used to reduce the original matrix to tridiagonal form.

  • n – [in]

    n is integer*

    The dimension of the symmetric tridiagonal 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 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 compz = ‘V’, then Z contains the orthogonal matrix used in the reduction to tridiagonal form.

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

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

  • ldz – [in]

    ldz is integer*

    The leading dimension of the array Z. ldz >= 1.

    If eigenvectors are desired, then ldz >= fla_max(1,n).

  • WORK – [out]

    WORK is COMPLEX array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If COMPZ = ‘N’ or ‘I’, or N <= 1, LWORK must be at least 1.

    If COMPZ = ‘V’ and N > 1, LWORK must be at least N*N.

    Note that for COMPZ = ‘V’, then if N is less than or equal to the minimum divide size, usually 25, then LWORK need only be 1.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK, RWORK and IWORK arrays, returns these values as the first entries of the WORK, RWORK and IWORK arrays, and no error message related to LWORK or LRWORK or LIWORK is issued by XERBLA.

  • RWORK – [out]

    RWORK is REAL array, dimension (MAX(1,LRWORK))

    On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.

  • LRWORK – [in]

    LRWORK is INTEGER

    The dimension of the array RWORK.

    If COMPZ = ‘N’ or N <= 1, LRWORK must be at least 1.

    If COMPZ = ‘V’ and N > 1, LRWORK must be at least

    1 + 3*N + 2*N*lg N + 4*N**2 ,

    where lg( N ) = smallest integer k such

    that 2**k >= N.

    If COMPZ = ‘I’ and N > 1, LRWORK must be at least 1 + 4*N + 2*N**2 .

    Note that for COMPZ = ‘I’ or ‘V’, then if N is less than or equal to the minimum divide size, usually 25, then LRWORK need only be fla_max(1,2*(N-1)).

    If LRWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK, RWORK and IWORK arrays, returns these values as the first entries of the WORK, RWORK and IWORK arrays, and no error message related to LWORK or LRWORK or LIWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK.

    If COMPZ = ‘N’ or N <= 1, LIWORK must be at least 1.

    If COMPZ = ‘V’ or N > 1, LIWORK must be at least 6 + 6*N + 5*N*lg N.

    If COMPZ = ‘I’ or N > 1, LIWORK must be at least 3 + 5*N .

    Note that for COMPZ = ‘I’ or ‘V’, then if N is less than or equal to the minimum divide size, usually 25, then LIWORK need only be 1.

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK, RWORK and IWORK arrays, returns these values as the first entries of the WORK, RWORK and IWORK arrays, and no error message related to LWORK or LRWORK or LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

    > 0: The algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1).

template<typename T, typename Ta>
void stedc(char *compz, integer *n, Ta *d, Ta *e, T *z, integer *ldz, T *work, integer *lwork, Ta *rwork, integer *lrwork, integer *iwork, integer *liwork, integer *info)#

STEGR#

group stegr

Functions

template<typename T>
void stegr(char *jobz, char *range, integer *n, T *d, T *e, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, integer *isuppz, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

STEGR computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix T.

Purpose:

    STEGR computes selected eigenvalues and, optionally, eigenvectors
    of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
    a well defined set of pairwise different real eigenvalues, the corresponding
    real eigenvectors are pairwise orthogonal.

    The spectrum may be computed either completely or partially by specifying
    either an interval (VL,VU] or a range of indices IL:IU for the desired
    eigenvalues.

    SSTEGR is a compatibility wrapper around the improved SSTEMR routine.
    See SSTEMR for further details.

    One important change is that the ABSTOL parameter no longer provides any
    benefit and hence is no longer used.

    Note : SSTEGR and SSTEMR work only on machines which follow
    IEEE-754 floating-point standard in their handling of infinities and
    NaNs.  Normal execution may create these exceptiona values and hence
    may abort due to a floating point exception in environments which
    do not conform to the IEEE-754 standard.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found.

    = ‘I’: the IL-th through IU-th eigenvalues will be found.

  • N – [in]

    N is INTEGER

    The order of the matrix. N >= 0.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the N diagonal elements of the tridiagonal matrix T. On exit, D is overwritten.

  • E – [inout]

    E is REAL array, dimension (N)

    On entry, the (N-1) subdiagonal elements of the tridiagonal matrix T in elements 1 to N-1 of E. E(N) need not be set on input, but is used internally as workspace.

    On exit, E is overwritten.

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0. Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0. Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    Unused. Was the absolute error tolerance for the eigenvalues/eigenvectors in previous versions.

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N. If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    The first M elements contain the selected eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

    If JOBZ = ‘V’, and if INFO = 0, then the first M columns of Z contain the orthonormal eigenvectors of the matrix T corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i).

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

    Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z; if RANGE = ‘V’, the exact value of M is not known in advance and an upper bound must be used. Supplying N columns is always safe.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, then LDZ >= fla_max(1,N).

  • ISUPPZ – [out]

    ISUPPZ is INTEGER array, dimension ( 2*max(1,M))

    The support of the eigenvectors in Z, i.e., the indices indicating the nonzero elements in Z. The i-th computed eigenvector is nonzero only in elements ISUPPZ( 2*i-1) through ISUPPZ( 2*i). This is relevant in the case when the matrix is split. ISUPPZ is only accessed when JOBZ is ‘V’ and N > 0.

  • WORK – [out]

    WORK is REAL array, dimension (LWORK)

    On exit, if INFO = 0, WORK(1) returns the optimal (and minimal) LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK >= fla_max(1,18*N) if JOBZ = ‘V’, and LWORK >= fla_max(1,12*N) if JOBZ = ‘N’.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (LIWORK)

    On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK. LIWORK >= fla_max(1,10*N) if the eigenvectors are desired, and LIWORK >= fla_max(1,8*N) if only the eigenvalues are to be computed.

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the IWORK array, returns this value as the first entry of the IWORK array, and no error message related to LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    On exit, INFO

    = 0: successful exit

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

    > 0: if INFO = 1X, internal error in SLARRE, if INFO = 2X, internal error in SLARRV. Here, the digit X = ABS( IINFO ) < 10, where IINFO is the nonzero error code returned by SLARRE or SLARRV, respectively.

template<typename T, typename Ta>
void stegr(char *jobz, char *range, integer *n, Ta *d, Ta *e, Ta *vl, Ta *vu, integer *il, integer *iu, Ta *abstol, integer *m, Ta *w, T *z, integer *ldz, integer *isuppz, Ta *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

STEIN#

group stein

Functions

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

STEQR#

group steqr

Functions

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

SYGV#

group sygv

Functions

template<typename T>
void sygv(integer *itype, char *jobz, char *uplo, integer *n, T *a, integer *lda, T *b, integer *ldb, T *w, T *work, integer *lwork, integer *info)#

SYGV computes all the eigenvalues, the eigenvectors

of a real generalized symmetric-definite eigenproblem.

Purpose:

    SYGV computes all the eigenvalues, and optionally, the eigenvectors
    of a real generalized symmetric-definite eigenproblem, of the form
    A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.
    Here A and B are assumed to be symmetric and B is also
    positive definite.

Parameters:
  • ITYPE – [in]

    ITYPE is INTEGER

    Specifies the problem type to be solved:

    = 1: A*x = (lambda)*B*x

    = 2: A*B*x = (lambda)*x

    = 3: B*A*x = (lambda)*x

  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangles of A and B are stored;

    = ‘L’: Lower triangles of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrices A and B. N >= 0.

  • A – [inout]

    A is REAL array, dimension (LDA, N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A.

    On exit, if JOBZ = ‘V’, then if INFO = 0, A contains the matrix Z of eigenvectors. The eigenvectors are normalized as follows:

    if ITYPE = 1 or 2, Z**T*B*Z = I;

    if ITYPE = 3, Z**T*inv(B)*Z = I.

    If JOBZ = ‘N’, then on exit the upper triangle (if UPLO=’U’) or the lower triangle (if UPLO=’L’) of A, including the diagonal, is destroyed.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • B – [inout]

    B is REAL array, dimension (LDB, N)

    On entry, the symmetric positive definite matrix B.

    If UPLO = ‘U’, the leading N-by-N upper triangular part of B contains the upper triangular part of the matrix B.

    If UPLO = ‘L’, the leading N-by-N lower triangular part of B contains the lower triangular part of the matrix B.

    On exit, if INFO <= N, the part of B containing the matrix is overwritten by the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T.

  • LDB – [in]

    LDB is INTEGER

    The leading dimension of the array B. LDB >= fla_max(1,N).

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The length of the array WORK. LWORK >= fla_max(1,3*N-1). For optimal efficiency, LWORK >= (NB+2)*N, where NB is the blocksize for SSYTRD returned by ILAENV.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: SPOTRF or SSYEV returned an error code:

    <= N: if INFO = i, SSYEV failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero;

    > N: if INFO = N + i, for 1 <= i <= N, then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

SYGV_2STAGE#

group sygv_2stage

Functions

template<typename T>
void sygv_2stage(integer *itype, char *jobz, char *uplo, integer *n, T *a, integer *lda, T *b, integer *ldb, T *w, T *work, integer *lwork, integer *info)#

SYGV_2STAGE computes all the eigenvalues, the eigenvectors

of a real generalized symmetric-definite eigenproblem.

Purpose:

    SYGV_2STAGE computes all the eigenvalues, and optionally, the eigenvectors
    of a real generalized symmetric-definite eigenproblem, of the form
    A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.
    Here A and B are assumed to be symmetric and B is also
    positive definite.
    This routine use the 2stage technique for the reduction to tridiagonal
    which showed higher performance on recent architecture and for large
    sizes N>2000.

Parameters:
  • ITYPE – [in]

    ITYPE is INTEGER

    Specifies the problem type to be solved:

    = 1: A*x = (lambda)*B*x

    = 2: A*B*x = (lambda)*x

    = 3: B*A*x = (lambda)*x

  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors. Not available in this release.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangles of A and B are stored;

    = ‘L’: Lower triangles of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrices A and B. N >= 0.

  • A – [inout]

    A is REAL array, dimension (LDA, N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A.

    On exit, if JOBZ = ‘V’, then if INFO = 0, A contains the matrix Z of eigenvectors. The eigenvectors are normalized as follows:

    if ITYPE = 1 or 2, Z**T*B*Z = I;

    if ITYPE = 3, Z**T*inv(B)*Z = I.

    If JOBZ = ‘N’, then on exit the upper triangle (if UPLO=’U’) or the lower triangle (if UPLO=’L’) of A, including the diagonal, is destroyed.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • B – [inout]

    B is REAL array, dimension (LDB, N)

    On entry, the symmetric positive definite matrix B. If UPLO = ‘U’, the leading N-by-N upper triangular part of B contains the upper triangular part of the matrix B. If UPLO = ‘L’, the leading N-by-N lower triangular part of B contains the lower triangular part of the matrix B.

    On exit, if INFO <= N, the part of B containing the matrix is overwritten by the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T.

  • LDB – [in]

    LDB is INTEGER

    The leading dimension of the array B. LDB >= fla_max(1,N).

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The length of the array WORK. LWORK >= 1, when N <= 1;

    otherwise

    If JOBZ = ‘N’ and N > 1, LWORK must be queried. LWORK = MAX(1, dimension) where dimension = fla_max(stage1,stage2) + (KD+1)*N + 2*N = N*KD + N*max(KD+1,FACTOPTNB)

    • fla_max(2*KD*KD, KD*NTHREADS)

    • (KD+1)*N + 2*N where KD is the blocking size of the reduction, FACTOPTNB is the blocking used by the QR or LQ algorithm, usually FACTOPTNB=128 is a good choice NTHREADS is the number of threads used when openMP compilation is enabled, otherwise =1.

      If JOBZ = ‘V’ and N > 1, LWORK must be queried. Not yet available

      If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: SPOTRF or SSYEV returned an error code:

    <= N: if INFO = i, SSYEV failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero;

    > N: if INFO = N + i, for 1 <= i <= N, then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

SYGVD#

group sygvd

Functions

template<typename T>
void sygvd(integer *itype, char *jobz, char *uplo, integer *n, T *a, integer *lda, T *b, integer *ldb, T *w, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

SYGVD computes all the eigenvalues, the eigenvectors

of a real generalized symmetric-definite eigenproblem.

Purpose:

    SYGVD computes all the eigenvalues, and optionally, the eigenvectors
    of a real generalized symmetric-definite eigenproblem, of the form
    A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.  Here A and
    B are assumed to be symmetric and B is also positive definite.
    If eigenvectors are desired, it uses a divide and conquer algorithm.

    The divide and conquer algorithm makes very mild assumptions about
    floating point arithmetic. It will work on machines with a guard
    digit in add/subtract, or on those binary machines without guard
    digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
    Cray-2. It could conceivably fail on hexadecimal or decimal machines
    without guard digits, but we know of none.

Parameters:
  • ITYPE – [in]

    ITYPE is INTEGER

    Specifies the problem type to be solved:

    = 1: A*x = (lambda)*B*x

    = 2: A*B*x = (lambda)*x

    = 3: B*A*x = (lambda)*x

  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangles of A and B are stored;

    = ‘L’: Lower triangles of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrices A and B. N >= 0.

  • A – [inout]

    A is REAL array, dimension (LDA, N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A.

    On exit, if JOBZ = ‘V’, then if INFO = 0, A contains the matrix Z of eigenvectors. The eigenvectors are normalized as follows:

    if ITYPE = 1 or 2, Z**T*B*Z = I;

    if ITYPE = 3, Z**T*inv(B)*Z = I.

    If JOBZ = ‘N’, then on exit the upper triangle (if UPLO=’U’) or the lower triangle (if UPLO=’L’) of A, including the diagonal, is destroyed.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • B – [inout]

    B is REAL array, dimension (LDB, N)

    On entry, the symmetric matrix B. If UPLO = ‘U’, the leading N-by-N upper triangular part of B contains the upper triangular part of the matrix B. If UPLO = ‘L’, the leading N-by-N lower triangular part of B contains the lower triangular part of the matrix B.

    On exit, if INFO <= N, the part of B containing the matrix is overwritten by the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T.

  • LDB – [in]

    LDB is INTEGER

    The leading dimension of the array B. LDB >= fla_max(1,N).

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If N <= 1, LWORK >= 1.

    If JOBZ = ‘N’ and N > 1, LWORK >= 2*N+1.

    If JOBZ = ‘V’ and N > 1, LWORK >= 1 + 6*N + 2*N**2.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK.

    If N <= 1, LIWORK >= 1.

    If JOBZ = ‘N’ and N > 1, LIWORK >= 1.

    If JOBZ = ‘V’ and N > 1, LIWORK >= 3 + 5*N.

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: SPOTRF or SSYEVD returned an error code:

    <= N: if INFO = i and JOBZ = ‘N’, then the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero; if INFO = i and JOBZ = ‘V’, then the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1);

    > N: if INFO = N + i, for 1 <= i <= N, then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

SYGVX#

group sygvx

Functions

template<typename T>
void sygvx(integer *itype, char *jobz, char *range, char *uplo, integer *n, T *a, integer *lda, T *b, integer *ldb, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, T *work, integer *lwork, integer *iwork, integer *ifail, integer *info)#

SYGVX computes selected eigenvalues, the eigenvectors

of a real generalized symmetric-definite eigenproblem.

Purpose:

    SYGVX computes selected eigenvalues, and optionally, eigenvectors
    of a real generalized symmetric-definite eigenproblem, of the form
    A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.  Here A
    and B are assumed to be symmetric and B is also positive definite.
    Eigenvalues and eigenvectors can be selected by specifying either a
    range of values or a range of indices for the desired eigenvalues.

Parameters:
  • ITYPE – [in]

    ITYPE is INTEGER

    Specifies the problem type to be solved:

    = 1: A*x = (lambda)*B*x

    = 2: A*B*x = (lambda)*x

    = 3: B*A*x = (lambda)*x

  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found.

    = ‘I’: the IL-th through IU-th eigenvalues will be found.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A and B are stored;

    = ‘L’: Lower triangle of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrix pencil (A,B). N >= 0.

  • A – [inout]

    A is REAL array, dimension (LDA, N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A.

    On exit, the lower triangle (if UPLO=’L’) or the upper triangle (if UPLO=’U’) of A, including the diagonal, is destroyed.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • B – [inout]

    B is REAL array, dimension (LDB, N)

    On entry, the symmetric matrix B. If UPLO = ‘U’, the leading N-by-N upper triangular part of B contains the upper triangular part of the matrix B. If UPLO = ‘L’, the leading N-by-N lower triangular part of B contains the lower triangular part of the matrix B.

    On exit, if INFO <= N, the part of B containing the matrix is overwritten by the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T.

  • LDB – [in]

    LDB is INTEGER

    The leading dimension of the array B. LDB >= fla_max(1,N).

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    ABSTOL + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing C to tridiagonal form, where C is the symmetric matrix of the standard symmetric problem to which the generalized problem is transformed.

    Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH(‘S’), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH(‘S’).

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N. If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    On normal exit, the first M elements contain the selected eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

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

    If JOBZ = ‘V’, then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i).

    The eigenvectors are normalized as follows:

    if ITYPE = 1 or 2, Z**T*B*Z = I;

    if ITYPE = 3, Z**T*inv(B)*Z = I.

    If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.

    Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z; if RANGE = ‘V’, the exact value of M is not known in advance and an upper bound must be used.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • IFAIL – [out]

    IFAIL is INTEGER array, dimension (N)

    If JOBZ = ‘V’, then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge.

    If JOBZ = ‘N’, then IFAIL is not referenced.

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The length of the array WORK. LWORK >= fla_max(1,8*N).

    For optimal efficiency, LWORK >= (NB+3)*N, where NB is the blocksize for SSYTRD returned by ILAENV.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

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

  • IFAIL – [out]

    IFAIL is INTEGER array, dimension (N)

    If JOBZ = ‘V’, then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge.

    If JOBZ = ‘N’, then IFAIL is not referenced.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: SPOTRF or SSYEVX returned an error code:

    <= N: if INFO = i, SSYEVX failed to converge; i eigenvectors failed to converge. Their indices are stored in array IFAIL.

    > N: if INFO = N + i, for 1 <= i <= N, then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

SPGV#

group spgv

Functions

template<typename T>
void spgv(integer *itype, char *jobz, char *uplo, integer *n, T *ap, T *bp, T *w, T *z, integer *ldz, T *work, integer *info)#

SPGV computes all the eigenvalues.

Purpose:

    SPGV computes all the eigenvalues and, optionally, the eigenvectors
    of a real generalized symmetric-definite eigenproblem, of the form
    A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.
    Here A and B are assumed to be symmetric, stored in packed format,
    and B is also positive definite.

Parameters:
  • ITYPE – [in]

    ITYPE is INTEGER

    Specifies the problem type to be solved:

    = 1: A*x = (lambda)*B*x

    = 2: A*B*x = (lambda)*x

    = 3: B*A*x = (lambda)*x

  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangles of A and B are stored;

    = ‘L’: Lower triangles of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrices A and B. N >= 0.

  • AP – [inout]

    AP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:

    if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;

    if UPLO = ‘L’, AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.

    On exit, the contents of AP are destroyed.

  • BP – [inout]

    BP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix B, packed columnwise in a linear array. The j-th column of B is stored in the array BP as follows:

    if UPLO = ‘U’, BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;

    if UPLO = ‘L’, BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.

    On exit, the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T, in the same storage format as B.

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, N)

    If JOBZ = ‘V’, then if INFO = 0, Z contains the matrix Z of eigenvectors. The eigenvectors are normalized as follows: if ITYPE = 1 or 2, Z**T*B*Z = I;

    if ITYPE = 3, Z**T*inv(B)*Z = I.

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: SPPTRF or SSPEV returned an error code:

    <= N: if INFO = i, SSPEV failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.

    > N: if INFO = n + i, for 1 <= i <= n, then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

template<typename T, typename Ta>
void hpgv(integer *itype, char *jobz, char *uplo, integer *n, T *ap, T *bp, T *w, T *z, integer *ldz, T *work, Ta *rwork, integer *info)#

SPGVD#

group spgvd

Functions

template<typename T>
void spgvd(integer *itype, char *jobz, char *uplo, integer *n, T *ap, T *bp, T *w, T *z, integer *ldz, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

SPGVD computes all the eigenvalues.

Purpose:

    SPGVD computes all the eigenvalues, and optionally, the eigenvectors
    of a real generalized symmetric-definite eigenproblem, of the form
    A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.  Here A and
    B are assumed to be symmetric, stored in packed format, and B is also
    positive definite.
    If eigenvectors are desired, it uses a divide and conquer algorithm.

    The divide and conquer algorithm makes very mild assumptions about
    floating point arithmetic. It will work on machines with a guard
    digit in add/subtract, or on those binary machines without guard
    digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
    Cray-2. It could conceivably fail on hexadecimal or decimal machines
    without guard digits, but we know of none.

Parameters:
  • ITYPE – [in]

    ITYPE is INTEGER

    Specifies the problem type to be solved:

    = 1: A*x = (lambda)*B*x

    = 2: A*B*x = (lambda)*x

    = 3: B*A*x = (lambda)*x

  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangles of A and B are stored;

    = ‘L’: Lower triangles of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrices A and B. N >= 0.

  • AP – [inout]

    AP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:

    if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;

    if UPLO = ‘L’, AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.

    On exit, the contents of AP are destroyed.

  • BP – [inout]

    BP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix B, packed columnwise in a linear array. The j-th column of B is stored in the array BP as follows:

    if UPLO = ‘U’, BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;

    if UPLO = ‘L’, BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.

    On exit, the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T, in the same storage format as B.

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, N)

    If JOBZ = ‘V’, then if INFO = 0, Z contains the matrix Z of eigenvectors. The eigenvectors are normalized as follows:

    if ITYPE = 1 or 2, Z**T*B*Z = I;

    if ITYPE = 3, Z**T*inv(B)*Z = I.

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the required LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If N <= 1, LWORK >= 1.

    If JOBZ = ‘N’ and N > 1, LWORK >= 2*N.

    If JOBZ = ‘V’ and N > 1, LWORK >= 1 + 6*N + 2*N**2.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the required sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if INFO = 0, IWORK(1) returns the required LIWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK.

    If JOBZ = ‘N’ or N <= 1, LIWORK >= 1.

    If JOBZ = ‘V’ and N > 1, LIWORK >= 3 + 5*N.

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the required sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: SPPTRF or SSPEVD returned an error code:

    <= N: if INFO = i, SSPEVD failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero;

    > N: if INFO = N + i, for 1 <= i <= N, then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

template<typename T, typename Ta>
void hpgvd(integer *itype, char *jobz, char *uplo, integer *n, T *ap, T *bp, Ta *w, T *z, integer *ldz, T *work, integer *lwork, Ta *rwork, integer *lrwork, integer *iwork, integer *liwork, integer *info)#

SPGVX#

group spgvx

Functions

template<typename T>
void spgvx(integer *itype, char *jobz, char *range, char *uplo, integer *n, T *ap, T *bp, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, T *work, integer *iwork, integer *ifail, integer *info)#

SPGVX computes all the eigenvalues.

Purpose:

    SPGVX computes selected eigenvalues, and optionally, eigenvectors
    of a real generalized symmetric-definite eigenproblem, of the form
    A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.  Here A
    and B are assumed to be symmetric, stored in packed storage, and B
    is also positive definite.  Eigenvalues and eigenvectors can be
    selected by specifying either a range of values or a range of indices
    for the desired eigenvalues.

Parameters:
  • ITYPE – [in]

    ITYPE is INTEGER

    Specifies the problem type to be solved:

    = 1: A*x = (lambda)*B*x

    = 2: A*B*x = (lambda)*x

    = 3: B*A*x = (lambda)*x

  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found.

    = ‘I’: the IL-th through IU-th eigenvalues will be found.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A and B are stored;

    = ‘L’: Lower triangle of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrix pencil (A,B). N >= 0.

  • AP – [inout]

    AP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:

    if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;

    if UPLO = ‘L’, AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.

    On exit, the contents of AP are destroyed.

  • BP – [inout]

    BP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix B, packed columnwise in a linear array. The j-th column of B is stored in the array BP as follows:

    if UPLO = ‘U’, BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;

    if UPLO = ‘L’, BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.

    On exit, the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T, in the same storage format as B.

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    ABSTOL + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

    Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH(‘S’), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH(‘S’).

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N. If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    On normal exit, the first M elements contain the selected eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

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

    If JOBZ = ‘V’, then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). The eigenvectors are normalized as follows:

    if ITYPE = 1 or 2, Z**T*B*Z = I;

    if ITYPE = 3, Z**T*inv(B)*Z = I.

    If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL. Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z; if RANGE = ‘V’, the exact value of M is not known in advance and an upper bound must be used.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

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

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

  • IFAIL – [out]

    IFAIL is INTEGER array, dimension (N)

    If JOBZ = ‘V’, then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge.

    If JOBZ = ‘N’, then IFAIL is not referenced.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: SPPTRF or SSPEVX returned an error code:

    <= N: if INFO = i, SSPEVX failed to converge; i eigenvectors failed to converge. Their indices are stored in array IFAIL.

    > N: if INFO = N + i, for 1 <= i <= N, then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

template<typename T, typename Ta>
void hpgvx(integer *itype, char *jobz, char *range, char *uplo, integer *n, T *ap, T *bp, Ta *vl, Ta *vu, integer *il, integer *iu, Ta *abstol, integer *m, Ta *w, T *z, integer *ldz, T *work, Ta *rwork, integer *iwork, integer *ifail, integer *info)#

SBGV#

group sbgv

Functions

template<typename T>
void sbgv(char *jobz, char *uplo, integer *n, integer *ka, integer *kb, T *ab, integer *ldab, T *bb, integer *ldbb, T *w, T *z, integer *ldz, float *work, integer *info)#

SBGV computes all the eigenvalues, and optionally, the eigenvectors.

Purpose:

    SBGV computes all the eigenvalues, and optionally, the eigenvectors
    of a real generalized symmetric-definite banded eigenproblem, of
    the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric
    and banded, and B is also positive definite.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangles of A and B are stored;

    = ‘L’: Lower triangles of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrices A and B. N >= 0.

  • KA – [in]

    KA is INTEGER

    The number of superdiagonals of the matrix A if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KA >= 0.

  • KB – [in]

    KB is INTEGER

    The number of superdiagonals of the matrix B if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KB >= 0.

  • AB – [inout]

    AB is REAL array, dimension (LDAB, N)

    On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first ka+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:

    if UPLO = ‘U’, AB(ka+1+i-j,j) = A(i,j) for fla_max(1,j-ka)<=i<=j;

    if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).

    On exit, the contents of AB are destroyed.

  • LDAB – [in]

    LDAB is INTEGER

    The leading dimension of the array AB. LDAB >= KA+1.

  • BB – [inout]

    BB is REAL array, dimension (LDBB, N)

    On entry, the upper or lower triangle of the symmetric band matrix B, stored in the first kb+1 rows of the array. The j-th column of B is stored in the j-th column of the array BB as follows:

    if UPLO = ‘U’, BB(kb+1+i-j,j) = B(i,j) for fla_max(1,j-kb)<=i<=j;

    if UPLO = ‘L’, BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).

    On exit, the factor S from the split Cholesky factorization B = S**T*S, as returned by SPBSTF.

  • LDBB – [in]

    LDBB is INTEGER

    The leading dimension of the array BB. LDBB >= KB+1.

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, N)

    If JOBZ = ‘V’, then if INFO = 0, Z contains the matrix Z of eigenvectors, with the i-th column of Z holding the eigenvector associated with W(i). The eigenvectors are normalized so that Z**T*B*Z = I.

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= N.

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: if INFO = i, and i is:

    <= N: the algorithm failed to converge: i off-diagonal elements of an intermediate tridiagonal form did not converge to zero;

    > N: if INFO = N + i, for 1 <= i <= N, then SPBSTF returned INFO = i: B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

template<typename T, typename Ta>
void hbgv(char *jobz, char *uplo, integer *n, integer *ka, integer *kb, T *ab, integer *ldab, T *bb, integer *ldbb, Ta *w, T *z, integer *ldz, T *work, Ta *rwork, integer *info)#

SBGVD#

group sbgvd

Functions

template<typename T>
void sbgvd(char *jobz, char *uplo, integer *n, integer *ka, integer *kb, T *ab, integer *ldab, T *bb, integer *ldbb, T *w, T *z, integer *ldz, T *work, integer *lwork, integer *iwork, integer *liwork, integer *info)#

SBGVD computes all the eigenvalues, and optionally, the eigenvectors.

Purpose:

    SBGVD computes all the eigenvalues, and optionally, the eigenvectors
    of a real generalized symmetric-definite banded eigenproblem, of the
    form A*x=(lambda)*B*x.  Here A and B are assumed to be symmetric and
    banded, and B is also positive definite.  If eigenvectors are
    desired, it uses a divide and conquer algorithm.

    The divide and conquer algorithm makes very mild assumptions about
    floating point arithmetic. It will work on machines with a guard
    digit in add/subtract, or on those binary machines without guard
    digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
    Cray-2. It could conceivably fail on hexadecimal or decimal machines
    without guard digits, but we know of none.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangles of A and B are stored;

    = ‘L’: Lower triangles of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrices A and B. N >= 0.

  • KA – [in]

    KA is INTEGER

    The number of superdiagonals of the matrix A if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KA >= 0.

  • KB – [in]

    KB is INTEGER

    The number of superdiagonals of the matrix B if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KB >= 0.

  • AB – [inout]

    AB is REAL array, dimension (LDAB, N)

    On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first ka+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:

    if UPLO = ‘U’, AB(ka+1+i-j,j) = A(i,j) for fla_max(1,j-ka)<=i<=j;

    if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).

    On exit, the contents of AB are destroyed.

  • LDAB – [in]

    LDAB is INTEGER

    The leading dimension of the array AB. LDAB >= KA+1.

  • BB – [inout]

    BB is REAL array, dimension (LDBB, N)

    On entry, the upper or lower triangle of the symmetric band matrix B, stored in the first kb+1 rows of the array. The j-th column of B is stored in the j-th column of the array BB as follows:

    if UPLO = ‘U’, BB(ka+1+i-j,j) = B(i,j) for fla_max(1,j-kb)<=i<=j;

    if UPLO = ‘L’, BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).

    On exit, the factor S from the split Cholesky factorization B = S**T*S, as returned by SPBSTF.

  • LDBB – [in]

    LDBB is INTEGER

    The leading dimension of the array BB. LDBB >= KB+1.

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, N)

    If JOBZ = ‘V’, then if INFO = 0, Z contains the matrix Z of eigenvectors, with the i-th column of Z holding the eigenvector associated with W(i). The eigenvectors are normalized so Z**T*B*Z = I.

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If N <= 1, LWORK >= 1.

    If JOBZ = ‘N’ and N > 1, LWORK >= 3*N.

    If JOBZ = ‘V’ and N > 1, LWORK >= 1 + 5*N + 2*N**2.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MAX(1,LIWORK))

    On exit, if LIWORK > 0, IWORK(1) returns the optimal LIWORK.

  • LIWORK – [in]

    LIWORK is INTEGER

    The dimension of the array IWORK.

    If JOBZ = ‘N’ or N <= 1, LIWORK >= 1.

    If JOBZ = ‘V’ and N > 1, LIWORK >= 3 + 5*N.

    If LIWORK = -1, then a workspace query is assumed; the routine only calculates the optimal sizes of the WORK and IWORK arrays, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: if INFO = i, and i is:

    <= N: the algorithm failed to converge: i off-diagonal elements of an intermediate tridiagonal form did not converge to zero;

    > N: if INFO = N + i, for 1 <= i <= N, then SPBSTF returned INFO = i: B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

template<typename T, typename Ta>
void hbgvd(char *jobz, char *uplo, integer *n, integer *ka, integer *kb, T *ab, integer *ldab, T *bb, integer *ldbb, Ta *w, T *z, integer *ldz, T *work, integer *lwork, Ta *rwork, integer *lrwork, integer *iwork, integer *liwork, integer *info)#

SGBVX#

group sgbvx

Functions

template<typename T>
void sbgvx(char *jobz, char *range, char *uplo, integer *n, integer *ka, integer *kb, T *ab, integer *ldab, T *bb, integer *ldbb, T *q, integer *ldq, T *vl, T *vu, integer *il, integer *iu, T *abstol, integer *m, T *w, T *z, integer *ldz, T *work, integer *iwork, integer *ifail, integer *info)#

SBGVX computes all the eigenvalues, and optionally, the eigenvectors.

Purpose:

    SBGVX computes selected eigenvalues, and optionally, eigenvectors
    of a real generalized symmetric-definite banded eigenproblem, of
    the form A*x=(lambda)*B*x.  Here A and B are assumed to be symmetric
    and banded, and B is also positive definite.  Eigenvalues and
    eigenvectors can be selected by specifying either all eigenvalues,
    a range of values or a range of indices for the desired eigenvalues.

Parameters:
  • JOBZ – [in]

    JOBZ is CHARACTER*1

    = ‘N’: Compute eigenvalues only;

    = ‘V’: Compute eigenvalues and eigenvectors.

  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: all eigenvalues will be found.

    = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found.

    = ‘I’: the IL-th through IU-th eigenvalues will be found.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangles of A and B are stored;

    = ‘L’: Lower triangles of A and B are stored.

  • N – [in]

    N is INTEGER

    The order of the matrices A and B. N >= 0.

  • KA – [in]

    KA is INTEGER

    The number of superdiagonals of the matrix A if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KA >= 0.

  • KB – [in]

    KB is INTEGER

    The number of superdiagonals of the matrix B if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KB >= 0.

  • AB – [inout]

    AB is REAL array, dimension (LDAB, N)

    On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first ka+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:

    if UPLO = ‘U’, AB(ka+1+i-j,j) = A(i,j) for fla_max(1,j-ka)<=i<=j;

    if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).

    On exit, the contents of AB are destroyed.

  • LDAB – [in]

    LDAB is INTEGER

    The leading dimension of the array AB. LDAB >= KA+1.

  • BB – [inout]

    BB is REAL array, dimension (LDBB, N)

    On entry, the upper or lower triangle of the symmetric band matrix B, stored in the first kb+1 rows of the array. The j-th column of B is stored in the j-th column of the array BB as follows:

    if UPLO = ‘U’, BB(ka+1+i-j,j) = B(i,j) for fla_max(1,j-kb)<=i<=j;

    if UPLO = ‘L’, BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).

    On exit, the factor S from the split Cholesky factorization B = S**T*S, as returned by SPBSTF.

  • LDBB – [in]

    LDBB is INTEGER

    The leading dimension of the array BB. LDBB >= KB+1.

  • Q – [out]

    Q is REAL array, dimension (LDQ, N)

    If JOBZ = ‘V’, the n-by-n matrix used in the reduction of A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x, and consequently C to tridiagonal form.

    If JOBZ = ‘N’, the array Q is not referenced.

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q. If JOBZ = ‘N’, LDQ >= 1. If JOBZ = ‘V’, LDQ >= fla_max(1,N).

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • ABSTOL – [in]

    ABSTOL is REAL

    The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

    ABSTOL + EPS * fla_max( |a|,|b|) ,

    where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

    Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH(‘S’), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH(‘S’).

  • M – [out]

    M is INTEGER

    The total number of eigenvalues found. 0 <= M <= N.

    If RANGE = ‘A’, M = N, and if RANGE = ‘I’, M = IU-IL+1.

  • W – [out]

    W is REAL array, dimension (N)

    If INFO = 0, the eigenvalues in ascending order.

  • Z – [out]

    Z is REAL array, dimension (LDZ, N)

    If JOBZ = ‘V’, then if INFO = 0, Z contains the matrix Z of eigenvectors, with the i-th column of Z holding the eigenvector associated with W(i). The eigenvectors are normalized so Z**T*B*Z = I.

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

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

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

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

  • IFAIL – [out]

    IFAIL is INTEGER array, dimension (M)

    If JOBZ = ‘V’, then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvalues that failed to converge.

    If JOBZ = ‘N’, then IFAIL is not referenced.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    <= N: if INFO = i, then i eigenvectors failed to converge. Their indices are stored in IFAIL.

    > N: SPBSTF returned an error code; i.e., if INFO = N + i, for 1 <= i <= N, then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

template<typename T, typename Ta>
void hbgvx(char *jobz, char *range, char *uplo, integer *n, integer *ka, integer *kb, T *ab, integer *ldab, T *bb, integer *ldbb, T *q, integer *ldq, Ta *vl, Ta *vu, integer *il, integer *iu, Ta *abstol, integer *m, Ta *w, T *z, integer *ldz, T *work, Ta *rwork, integer *iwork, integer *ifail, integer *info)#

DISNA#

group disna

Functions

template<typename T>
void disna(char *job, integer *m, integer *n, T *d, T *sep, integer *info)#

DISNA computes the reciprocal condition numbers for the eigenvectors

of a real symmetric or complex Hermitian matrix.

Purpose:

  DISNA computes the reciprocal condition numbers for the eigenvectors
  of a real symmetric or complex Hermitian matrix or for the left or
  right singular vectors of a general m-by-n matrix. The reciprocal
  condition number is the 'gap' between the corresponding eigenvalue or
  singular value and the nearest other one.

  The bound on the error, measured by angle in radians, in the I-th
  computed vector is given by

         SLAMCH( 'E') * ( ANORM / SEP( I))

  where ANORM = 2-norm(A) = fla_max( abs( D(j))).  SEP(I) is not allowed
  to be smaller than SLAMCH( 'E')*ANORM in order to limit the size of
  the error bound.

  SDISNA may also be used to compute error bounds for eigenvectors of
  the generalized symmetric definite eigenproblem.

Parameters:
  • JOB – [in]

    JOB is CHARACTER*1

    Specifies for which problem the reciprocal condition numbers should be computed:

    = ‘E’: the eigenvectors of a symmetric/Hermitian matrix;

    = ‘L’: the left singular vectors of a general matrix;

    = ‘R’: the right singular vectors of a general matrix.

  • M – [in]

    M is INTEGER

    The number of rows of the matrix. M >= 0.

  • N – [in]

    N is INTEGER

    If JOB = ‘L’ or ‘R’, the number of columns of the matrix, in which case N >= 0. Ignored if JOB = ‘E’.

  • D – [in]

    D is REAL array, dimension (M) if JOB = ‘E’ dimension (min(M,N)) if JOB = ‘L’ or ‘R’

    The eigenvalues (if JOB = ‘E’) or singular values (if JOB = ‘L’ or ‘R’) of the matrix, in either increasing or decreasing order. If singular values, they must be non-negative.

  • SEP – [out]

    SEP is REAL array, dimension (M) if JOB = ‘E’ dimension (min(M,N)) if JOB = ‘L’ or ‘R’

    The reciprocal condition numbers of the vectors.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

SYTRD#

group sytrd

Functions

template<typename T>
void sytrd(char *uplo, integer *n, T *a, integer *lda, T *d, T *e, T *tau, T *work, integer *lwork, integer *info)#

Reduction of a real symmetric matrix a to real symmetric tridiagonal form.

Purpose:

    Reduction of a real symmetric matrix a to real symmetric tridiagonal form T by an
    orthogonal similarity transformation:
        Q**T * A * Q = T.

Further Details

                  If uplo = 'U', the matrix Q is represented as a product of elementary
reflectors

                  Q = H(n-1) . . . H(2) H(1).

                  Each H(i) has the form

                  H(i) = I - tau * V * V**T

                  where tau is a real scalar, and V is a real vector with V(i+1:n) = 0 and
V(i) = 1; V(1:i-1) is stored on exit in A(1:i-1,i+1), and tau in tau(i).

                  If uplo = 'L', the matrix Q is represented as a product of elementary
reflectors

                  Q = H(1) H(2) . . . H(n-1).

                  Each H(i) has the form

                  H(i) = I - tau * V * V**T

                  where tau is a real scalar, and V is a real vector with V(1:i) = 0 and
V(i+1) = 1; V(i+2:n) is stored on exit in A(i+2:n,i), and tau in tau(i).

                  The contents of A on exit are illustrated by the following examples with n
= 5:

                  if uplo = 'U':  if uplo = 'L':

                  (  d   e   v2  v3  v4)  (  d  )
                  (   d   e   v3  v4)  (  e   d )
                  ( d   e   v4)  (  v1  e   d)
                  (  d   e )  (  v1  v2  e   d  )
                  (   d )  (  v1  v2  v3  e   d )

                  where d and e denote diagonal and off-diagonal elements of T, and vi
denotes an element of the vector defining H(i).

Parameters:
  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a is stored;

    = ‘L’: Lower triangle of a is stored.

  • n – [in]

    n is integer*

    The order of the matrix a. n >= 0.

  • a – [inout]

    a is float/double array, dimension (lda,n)

    On entry, the symmetric matrix a.

    If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a, and the strictly lower triangular part of a is not referenced.

    If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a, and the strictly upper triangular part of a is not referenced.

    On exit, if uplo = ‘U’, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors;

    if uplo = ‘L’, the diagonal and first subdiagonal of A are over- written by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • d – [out]

    d is float/double array, dimension (n)

    The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i).

  • e – [out]

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

    The off-diagonal elements of the tridiagonal matrix T:

    E(i) = A(i,i+1) if uplo = ‘U’, E(i) = A(i+1,i) if uplo = ‘L’.

  • tau – [out]

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

    The scalar factors of the elementary reflectors (see Further Details).

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK >= 1.

    For optimum performance LWORK >= N*NB, where NB is the optimal blocksize.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

HETRD#

group hetrd

Functions

template<typename T, typename Ta>
void hetrd(char *uplo, integer *n, T *a, integer *lda, Ta *d, Ta *e, T *tau, T *work, integer *lwork, integer *info)#

Reduction of a complex Hermitian matrix a to real symmetric tridiagonal form.

Purpose:

Reduction of a complex Hermitian matrix a to real symmetric tridiagonal form T by a
unitary similarity transformation:
    Q**H * A * Q = T.

Further Details

                  If uplo = 'U', the matrix Q is represented as a product of elementary
reflectors

                  Q = H(n-1) . . . H(2) H(1).

                  Each H(i) has the form

                  H(i) = I - tau * V * V**H

                  where tau is a complex scalar, and V is a complex vector with V(i+1:n) = 0
and V(i) = 1; V(1:i-1) is stored on exit in A(1:i-1,i+1), and tau in tau(i).

                  If uplo = 'L', the matrix Q is represented as a product of elementary
reflectors

                  Q = H(1) H(2) . . . H(n-1).

                  Each H(i) has the form

                  H(i) = I - tau * V * V**H

                  where tau is a complex scalar, and V is a complex vector with V(1:i) = 0
and V(i+1) = 1; V(i+2:n) is stored on exit in A(i+2:n,i), and tau in tau(i).

                  The contents of A on exit are illustrated by the following examples with n
= 5:

                  if uplo = 'U':  if uplo = 'L':

                  (  d   e   v2  v3  v4)  (  d  )
                  (   d   e   v3  v4)  (  e   d )
                  ( d   e   v4)  (  v1  e   d)
                  (  d   e )  (  v1  v2  e   d  )
                  (   d )  (  v1  v2  v3  e   d )

                  where d and e denote diagonal and off-diagonal elements of T, and vi
denotes an element of the vector defining H(i).

Parameters:
  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a is stored;

    = ‘L’: Lower triangle of a is stored.

  • n – [in]

    n is integer*

    The order of the matrix a. n >= 0.

  • a – [inout]

    a is COMPLEX/COMPLEX*16 array, dimension (lda,n)

    On entry, the symmetric matrix a.

    If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a, and the strictly lower triangular part of a is not referenced.

    If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a, and the strictly upper triangular part of a is not referenced.

    On exit, if uplo = ‘U’, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors;

    if uplo = ‘L’, the diagonal and first subdiagonal of A are over- written by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • d – [out]

    d is float/double array, dimension (n)

    The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i).

  • e – [out]

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

    The off-diagonal elements of the tridiagonal matrix T:

    E(i) = A(i,i+1) if uplo = ‘U’, E(i) = A(i+1,i) if uplo = ‘L’.

  • tau – [out]

    tau is COMPLEX/COMPLEX*16 array, dimension (n-1)

    The scalar factors of the elementary reflectors (see Further Details).

  • WORK – [out]

    WORK is COMPLEX array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK >= 1. For optimum performance LWORK >= N*NB, where NB is the optimal blocksize.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

HETD2#

group hetd2

Functions

template<typename T, typename Ta>
void hetd2(char *uplo, integer *n, T *a, integer *lda, Ta *d, Ta *e, T *tau, integer *info)#

Reduction of a Hermitian matrix a to real symmetric tridiagonal form (unblocked algorithm)

Purpose:

    Reduction of a Hermitian matrix a to real symmetric tridiagonal form T by an unitary
    similarity transformation(unblocked algorithm):
        Q**T * A * Q = T.

Further Details

                  If uplo = 'U', the matrix Q is represented as a product of elementary
reflectors

                      Q = H(n-1) . . . H(2) H(1).

                  Each H(i) has the form

                      H(i) = I - tau * V * V**H

                  where tau is a complex scalar, and V is a complex vector with V(i+1:n) = 0
and V(i) = 1; V(1:i-1) is stored on exit in A(1:i-1,i+1), and tau in tau(i).

                  If uplo = 'L', the matrix Q is represented as a product of elementary
reflectors

                      Q = H(1) H(2) . . . H(n-1).

                  Each H(i) has the form

                      H(i) = I - tau * V * V**H

                  where tau is a complex scalar, and V is a complex complex vector with
V(1:i) = 0 and V(i+1) = 1; V(i+2:n) is stored on exit in A(i+2:n,i), and tau in tau(i).

                  The contents of A on exit are illustrated by the following examples with n
= 5:

                  if uplo = 'U':                       if uplo = 'L':

                      (  d   e   v2  v3  v4)              (  d                 )
                      (      d   e   v3  v4)              (  e   d             )
                      (          d   e   v4)              (  v1  e   d         )
                      (              d   e )              (  v1  v2  e   d     )
                      (                  d )              (  v1  v2  v3  e   d )

                  where d and e denote diagonal and off-diagonal elements of T, and vi
denotes an element of the vector defining H(i).

Parameters:
  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a is stored;

    = ‘L’: Lower triangle of a is stored.

  • n – [in]

    n is integer*

    The order of the matrix a. n >= 0.

  • a – [inout]

    a is COMPLEX/COMPLEX*16 array, dimension (lda,n)

    On entry, the symmetric matrix a.

    If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a, and the strictly lower triangular part of a is not referenced.

    If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a, and the strictly upper triangular part of a is not referenced.

    On exit, if uplo = ‘U’, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors;

    if uplo = ‘L’, the diagonal and first subdiagonal of A are over- written by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • d – [out]

    d is float/double array, dimension (n)

    The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i).

  • e – [out]

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

    The off-diagonal elements of the tridiagonal matrix T:

    E(i) = A(i,i+1) if uplo = ‘U’, E(i) = A(i+1,i) if uplo = ‘L’.

  • tau – [out]

    tau is COMPLEX/COMPLEX*16 array, dimension (n-1)

    The scalar factors of the elementary reflectors (see Further Details).

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

SYTD2#

group sytd2

Functions

template<typename T>
void sytd2(char *uplo, integer *n, T *a, integer *lda, T *d, T *e, T *tau, integer *info)#

Reduction of a real symmetric matrix a to real symmetric tridiagonal form (unblocked algorithm)

Purpose:

    Reduction of a real symmetric matrix a to real symmetric tridiagonal form T by an
orthogonal similarity transformation(unblocked algorithm): Q**T * A * Q = T.

Further Details

                  If uplo = 'U', the matrix Q is represented as a product of elementary
reflectors

                  Q = H(n-1) . . . H(2) H(1).

                  Each H(i) has the form

                  H(i) = I - tau * V * V**T

                  where tau is a real scalar, and V is a real vector with V(i+1:n) = 0 and
V(i) = 1; V(1:i-1) is stored on exit in A(1:i-1,i+1), and tau in tau(i).

                  If uplo = 'L', the matrix Q is represented as a product of elementary
reflectors

                  Q = H(1) H(2) . . . H(n-1).

                  Each H(i) has the form

                  H(i) = I - tau * V * V**T

                  where tau is a real scalar, and V is a real vector with V(1:i) = 0 and
V(i+1) = 1; V(i+2:n) is stored on exit in A(i+2:n,i), and tau in tau(i).

                  The contents of A on exit are illustrated by the following examples with n
= 5:

                  if uplo = 'U':  if uplo = 'L':

                  (  d   e   v2  v3  v4)  (  d  )
                  (   d   e   v3  v4)  (  e   d )
                  ( d   e   v4)  (  v1  e   d)
                  (  d   e )  (  v1  v2  e   d  )
                  (   d )  (  v1  v2  v3  e   d )

                  where d and e denote diagonal and off-diagonal elements of T, and vi
denotes an element of the vector defining H(i).

Parameters:
  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a is stored;

    = ‘L’: Lower triangle of a is stored.

  • n – [in]

    n is integer*

    The order of the matrix a. n >= 0.

  • a – [inout]

    a is float/double array, dimension (lda,n)

    On entry, the symmetric matrix a.

    If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a, and the strictly lower triangular part of a is not referenced.

    If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a, and the strictly upper triangular part of a is not referenced.

    On exit, if uplo = ‘U’, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors;

    if uplo = ‘L’, the diagonal and first subdiagonal of A are over- written by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • d – [out]

    d is float/double array, dimension (n)

    The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i).

  • e – [out]

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

    The off-diagonal elements of the tridiagonal matrix T:

    E(i) = A(i,i+1) if uplo = ‘U’, E(i) = A(i+1,i) if uplo = ‘L’.

  • tau – [out]

    tau is COMPLEX/COMPLEX*16 array, dimension (n-1)

    The scalar factors of the elementary reflectors (see Further Details).

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

LATRD#

group latrd

Functions

template<typename T>
void latrd(char *uplo, integer *n, integer *nb, T *a, integer *lda, T *e, T *tau, T *w, integer *ldw)#

LATRD reduces the first nb rows and columns of a symmetric/Hermitian

matrix A to real tridiagonal form by an orthogonal similarity transformation.

Purpose:

 LATRD reduces NB rows and columns of a real symmetric matrix A to
 symmetric tridiagonal form by an orthogonal similarity
 transformation Q**T * A * Q, and   returns the matrices V and W which are
 needed to apply the transformation to the unreduced part of A.

 If UPLO = 'U', SLATRD reduces the last NB rows and columns of a
 matrix, of which the upper triangle is supplied;
 if UPLO = 'L', SLATRD reduces the first NB rows and columns of a
 matrix, of which the lower triangle is supplied.

 This is an auxiliary routine called by SSYTRD.

Parameters:
  • UPLO – [in]

    UPLO is CHARACTER*1

    Specifies whether the upper or lower triangular part of the symmetric matrix A is stored:

    = ‘U’: Upper triangular

    = ‘L’: Lower triangular

  • N – [in]

    N is INTEGER

    The order of the matrix A.

  • NB – [in]

    NB is INTEGER

    The number of rows and columns to be reduced.

  • A – [inout]

    A is REAL array, dimension (LDA,N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = ‘L’, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.

    On exit:

    if UPLO = ‘U’, the last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements above the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors;

    if UPLO = ‘L’, the first NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements below the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors.

    See Further Details.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= (1,N).

  • E – [out]

    E is REAL array, dimension (N-1)

    If UPLO = ‘U’, E(n-nb:n-1) contains the superdiagonal elements of the last NB columns of the reduced matrix;

    if UPLO = ‘L’, E(1:nb) contains the subdiagonal elements of the first NB columns of the reduced matrix.

  • TAU – [out]

    TAU is REAL array, dimension (N-1)

    The scalar factors of the elementary reflectors, stored in TAU(n-nb:n-1) if UPLO = ‘U’, and in TAU(1:nb) if UPLO = ‘L’. See Further Details.

  • W – [out]

    W is REAL array, dimension (LDW,NB)

    The n-by-nb matrix W required to update the unreduced part of A.

  • LDW – [in]

    LDW is INTEGER

    The leading dimension of the array W. LDW >= fla_max(1,N).

template<typename T, typename Ta>
void latrd(char *uplo, integer *n, integer *nb, T *a, integer *lda, Ta *e, T *tau, T *w, integer *ldw)#

UNGTR#

group ungtr

Functions

template<typename T>
void ungtr(char *uplo, integer *m, T *a, integer *lda, T *tau, T *work, integer *lwork, integer *info)#

Form Q from tridiagonal reduction.

Purpose:

   Form Q from tridiagonal reduction. Generate a complex unitary matrix Q which is defined as
   the product of n-1 elementary reflectors of order M, as returned by CHETRD:

       if uplo = 'U', Q = H(n-1) . . . H(2) H(1),

       if uplo = 'L', Q = H(1) H(2) . . . H(n-1).

Parameters:
  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a contains elementary reflectors from CHETRD;

    = ‘L’: Lower triangle of a contains elementary reflectors from CHETRD.

  • m – [in]

    m is integer*

    The order of the matrix Q. m >= 0.

  • a – [inout]

    a is COMPLEX/COMPLEX*16 array, dimension (lda,m)

    On entry, the vectors which define the elementary reflectors, as returned by CHETRD.

    On exit, the m-by-m orthogonal matrix Q.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,m).

  • tau – [in]

    tau is COMPLEX/COMPLEX*16 array, dimension (m-1)

    tau(i) must contain the scalar factor of the elementary reflector H(i), as returned by CHETRD.

  • WORK – [out]

    WORK is COMPLEX array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK >= N-1.

    For optimum performance LWORK >= (N-1)*NB, where NB is the optimal blocksize.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

ORGTR#

group orgtr

Functions

template<typename T>
void orgtr(char *uplo, integer *m, T *a, integer *lda, T *tau, T *work, integer *lwork, integer *info)#

Form Q from tridiagonal reduction.

Purpose:

   Form Q from tridiagonal reduction. Generate a real orthogonal matrix Q which is defined as
   the product of n-1 elementary reflectors of order M, as returned by SSYTRD:

       if uplo = 'U', Q = H(n-1) . . . H(2) H(1),

       if uplo = 'L', Q = H(1) H(2) . . . H(n-1).

Parameters:
  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a contains elementary reflectors from SSYTRD;

    = ‘L’: Lower triangle of a contains elementary reflectors from SSYTRD.

  • m – [in]

    m is integer*

    The order of the matrix Q. m >= 0.

  • a – [inout]

    a is float/double array, dimension (lda,m)

    On entry, the vectors which define the elementary reflectors, as returned by SSYTRD.

    On exit, the m-by-m orthogonal matrix Q.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,m).

  • tau – [in]

    tau is float/double array, dimension (m-1)

    tau(i) must contain the scalar factor of the elementary reflector H(i), as returned by SSYTRD.

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK >= fla_max(1,N-1).

    For optimum performance LWORK >= (N-1)*NB, where NB is the optimal blocksize.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

UNMTR#

group unmtr

Functions

template<typename T>
void unmtr(char *side, char *uplo, char *trans, integer *m, integer *n, T *a, integer *lda, T *tau, T *c, integer *ldc, T *work, integer *lwork, integer *info)#

Apply Q or Q’ from tridiagonal reduction.

Purpose:

       Apply Q or Q' from tridiagonal reduction. Overwrite the general complex m-by-n matrix c
with

           side = 'L'  side = 'R'
           trans = 'N':   Q * C C * Q
           trans = 'C':   Q**H * C C * Q**H

       where Q is a complex unitary matrix of order nq, with nq = m if side = 'L' and nq = n if
       side = 'R'. Q is defined as the product of nq-1 elementary reflectors, as returned by
CHETRD:

           if uplo = 'U', Q = H(nq-1) . . . H(2) H(1);

           if uplo = 'L', Q = H(1) H(2) . . . H(nq-1).

Parameters:
  • side – [in]

    side is char*

    = ‘L’: apply Q or Q**H from the Left;

    = ‘R’: apply Q or Q**H from the Right.

  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a contains elementary reflectors from CHETRD;

    = ‘L’: Lower triangle of a contains elementary reflectors from CHETRD.

  • trans – [in]

    trans is char*

    = ‘N’: No transpose, apply Q;

    = ‘C’: Transpose, apply Q**C.

  • m – [in]

    m is integer*

    The number of rows of the matrix c. m >= 0.

  • n – [in]

    n is integer*

    The number of columns of the matrix c. n >= 0.

  • a – [in]

    a is COMPLEX/COMPLEX*16 array, dimension

    (lda,m) if side = ‘L’

    (lda,n) if side = ‘R’

    The vectors which define the elementary reflectors, as returned by CHETRD.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a.

    lda >= fla_max(1,m) if side = ‘L’; lda >= fla_max(1,n) if side = ‘R’.

  • tau – [in]

    tau is COMPLEX/COMPLEX*16 array, dimension

    (m-1) if side = ‘L’

    (n-1) if side = ‘R’

    tau(i) must contain the scalar factor of the elementary reflector H(i), as returned by CHETRD.

  • c – [inout]

    c is COMPLEX/COMPLEX*16 array, dimension (ldc,n)

    On entry, the m-by-n matrix c.

    On exit, c is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.

  • ldc – [in]

    ldc is integer*

    The leading dimension of the array c. ldc >= fla_max(1,m).

  • WORK – [out]

    WORK is COMPLEX array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If SIDE = ‘L’, LWORK >= fla_max(1,N);

    if SIDE = ‘R’, LWORK >= fla_max(1,M).

    For optimum performance LWORK >= N*NB if SIDE = ‘L’, and LWORK >=M*NB if SIDE = ‘R’, where NB is the optimal blocksize.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

ORMTR#

group ormtr

Functions

template<typename T>
void ormtr(char *side, char *uplo, char *trans, integer *m, integer *n, T *a, integer *lda, T *tau, T *c, integer *ldc, T *work, integer *lwork, integer *info)#

Apply Q or Q’ from tridiagonal reduction.

Purpose:

       Apply Q or Q' from tridiagonal reduction. Overwrite the general real m-by-n matrix c
with

       side = 'L'  side = 'R'
       trans = 'N':   Q * C C * Q
       trans = 'T':   Q**T * C C * Q**T

       where Q is a real orthogonal matrix of order nq, with nq = m if side = 'L' and nq = n if
       side = 'R'. Q is defined as the product of nq-1 elementary reflectors, as returned by
SSYTRD:

       if uplo = 'U', Q = H(nq-1) . . . H(2) H(1);

       if uplo = 'L', Q = H(1) H(2) . . . H(nq-1).

Parameters:
  • side – [in]

    side is char*

    = ‘L’: apply Q or Q**T from the Left;

    = ‘R’: apply Q or Q**T from the Right.

  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a contains elementary reflectors from SSYTRD;

    = ‘L’: Lower triangle of a contains elementary reflectors from SSYTRD.

  • trans – [in]

    trans is char*

    = ‘N’: No transpose, apply Q;

    = ‘T’: Transpose, apply Q**T.

  • m – [in]

    m is integer*

    The number of rows of the matrix c. m >= 0.

  • n – [in]

    n is integer*

    The number of columns of the matrix c. n >= 0.

  • a – [in]

    a is float/double array, dimension

    (lda,m) if side = ‘L’

    (lda,n) if side = ‘R’

    The vectors which define the elementary reflectors, as returned by SSYTRD.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a.

    lda >= fla_max(1,m) if side = ‘L’; lda >= fla_max(1,n) if side = ‘R’.

  • tau – [in]

    tau is float/double array, dimension

    (m-1) if side = ‘L’

    (n-1) if side = ‘R’

    tau(i) must contain the scalar factor of the elementary reflector H(i), as returned by SSYTRD.

  • c – [inout]

    c is float/double array, dimension (ldc,n)

    On entry, the m-by-n matrix c.

    On exit, c is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.

  • ldc – [in]

    ldc is integer*

    The leading dimension of the array c. ldc >= fla_max(1,m).

  • WORK – [out]

    WORK is REAL array, dimension (MAX(1,LWORK))

    On exit, if INFO = 0, WORK(1) returns the optimal LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK.

    If SIDE = ‘L’, LWORK >= fla_max(1,N);

    if SIDE = ‘R’, LWORK >= fla_max(1,M).

    For optimum performance LWORK >= N*NB if SIDE = ‘L’, and LWORK >= M*NB if SIDE = ‘R’, where NB is the optimal blocksize.

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

SYTRD_2STAGE#

group sytrd_2stage

Functions

template<typename T>
void sytrd_2stage(char *vect, char *uplo, integer *n, T *a, integer *lda, T *d, T *e, T *tau, T *hous2, integer *lhous2, T *work, integer *lwork, integer *info)#

SYTRD_2STAGE reduces a real symmetric matrix A to real symmetric tridiagonal form T.

Purpose:

   SYTRD_2STAGE reduces a real symmetric matrix A to real symmetric
   tridiagonal form T by a orthogonal similarity transformation:
   Q1**T Q2**T* A * Q2 * Q1 = T.

Parameters:
  • VECT – [in]

    VECT is CHARACTER*1

    = ‘N’: No need for the Housholder representation, in particular for the second stage (Band to tridiagonal) and thus LHOUS2 is of size fla_max(1, 4*N);

    = ‘V’: the Householder representation is needed to either generate Q1 Q2 or to apply Q1 Q2, then LHOUS2 is to be queried and computed. (NOT AVAILABLE IN THIS RELEASE).

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • A – [inout]

    A is REAL array, dimension (LDA,N)

    On entry, the symmetric matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.

    On exit, if UPLO = ‘U’, the band superdiagonal of A are overwritten by the corresponding elements of the internal band-diagonal matrix AB, and the elements above the KD superdiagonal, with the array TAU, represent the orthogonal matrix Q1 as a product of elementary reflectors; if UPLO = ‘L’, the diagonal and band subdiagonal of A are over- written by the corresponding elements of the internal band-diagonal matrix AB, and the elements below the KD subdiagonal, with the array TAU, represent the orthogonal matrix Q1 as a product of elementary reflectors. See Further Details.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • D – [out]

    D is REAL array, dimension (N)

    The diagonal elements of the tridiagonal matrix T.

  • E – [out]

    E is REAL array, dimension (N-1)

    The off-diagonal elements of the tridiagonal matrix T.

  • TAU – [out]

    TAU is REAL array, dimension (N-KD)

    The scalar factors of the elementary reflectors of the first stage (see Further Details).

  • HOUS2 – [out]

    HOUS2 is REAL array, dimension (LHOUS2)

    Stores the Householder representation of the stage2 band to tridiagonal.

  • LHOUS2 – [in]

    LHOUS2 is INTEGER

    The dimension of the array HOUS2. If LWORK = -1, or LHOUS2 = -1, then a query is assumed; the routine only calculates the optimal size of the HOUS2 array, returns this value as the first entry of the HOUS2 array, and no error message related to LHOUS2 is issued by XERBLA.

    If VECT=’N’, LHOUS2 = fla_max(1, 4*n);

    if VECT=’V’, option not yet available.

  • WORK – [out] WORK is REAL array, dimension (LWORK)

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK = MAX(1, dimension)

    If LWORK = -1, or LHOUS2=-1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. LWORK = MAX(1, dimension) where

    dimension = fla_max(stage1,stage2) + (KD+1)*N

    = N*KD + N*max(KD+1,FACTOPTNB)
    • fla_max(2*KD*KD, KD*NTHREADS)

    • (KD+1)*N

      where KD is the blocking size of the reduction, FACTOPTNB is the blocking used by the QR or LQ algorithm, usually FACTOPTNB=128 is a good choice NTHREADS is the number of threads used when openMP compilation is enabled, otherwise =1.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

HETRD_2STAGE#

group hetrd_2stage

Functions

template<typename T, typename Ta>
void hetrd_2stage(char *vect, char *uplo, integer *n, T *a, integer *lda, Ta *d, Ta *e, T *tau, T *hous2, integer *lhous2, T *work, integer *lwork, integer *info)#

HETRD_2STAGE reduces a complex Hermitian matrix A to real symmetric

tridiagonal form T.

Purpose:

 HETRD_2STAGE reduces a complex Hermitian matrix A to real symmetric
 tridiagonal form T by a unitary similarity transformation:
 Q1**H Q2**H* A * Q2 * Q1 = T.

Parameters:
  • VECT – [in]

    VECT is CHARACTER*1

    = ‘N’: No need for the Housholder representation, in particular for the second stage (Band to tridiagonal) and thus LHOUS2 is of size fla_max(1, 4*N);

    = ‘V’: the Householder representation is needed to either generate Q1 Q2 or to apply Q1 Q2, then LHOUS2 is to be queried and computed. (NOT AVAILABLE IN THIS RELEASE).

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • A – [inout]

    A is COMPLEX array, dimension (LDA,N)

    On entry, the Hermitian matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.

    On exit, if UPLO = ‘U’, the band superdiagonal of A are overwritten by the corresponding elements of the internal band-diagonal matrix AB, and the elements above the KD superdiagonal, with the array TAU, represent the unitary matrix Q1 as a product of elementary reflectors; if UPLO = ‘L’, the diagonal and band subdiagonal of A are over- written by the corresponding elements of the internal band-diagonal matrix AB, and the elements below the KD subdiagonal, with the array TAU, represent the unitary matrix Q1 as a product of elementary reflectors. See Further Details.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • D – [out]

    D is REAL array, dimension (N)

    The diagonal elements of the tridiagonal matrix T.

  • E – [out]

    E is REAL array, dimension (N-1)

    The off-diagonal elements of the tridiagonal matrix T.

  • TAU – [out]

    TAU is COMPLEX array, dimension (N-KD)

    The scalar factors of the elementary reflectors of the first stage (see Further Details).

  • HOUS2 – [out]

    HOUS2 is COMPLEX array, dimension (LHOUS2)

    Stores the Householder representation of the stage2 band to tridiagonal.

  • LHOUS2 – [in]

    LHOUS2 is INTEGER

    The dimension of the array HOUS2.

    If LWORK = -1, or LHOUS2=-1, then a query is assumed; the routine only calculates the optimal size of the HOUS2 array, returns this value as the first entry of the HOUS2 array, and no error message related to LHOUS2 is issued by XERBLA.

    If VECT=’N’, LHOUS2 = fla_max(1, 4*n);

    if VECT=’V’, option not yet available.

  • WORK – [out] WORK is COMPLEX array, dimension (LWORK)

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK = MAX(1, dimension)

    If LWORK = -1, or LHOUS2 = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. LWORK = MAX(1, dimension) where

    dimension = fla_max(stage1,stage2) + (KD+1)*N

    = N*KD + N*max(KD+1,FACTOPTNB)
    • fla_max(2*KD*KD, KD*NTHREADS)

    • (KD+1)*N

      where KD is the blocking size of the reduction, FACTOPTNB is the blocking used by the QR or LQ algorithm, usually FACTOPTNB=128 is a good choice NTHREADS is the number of threads used when openMP compilation is enabled, otherwise =1.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

HETRD_HE2HB#

group hetrd_he2hb

Functions

template<typename T>
void hetrd_he2hb(char *uplo, integer *n, integer *kd, T *a, integer *lda, T *ab, integer *ldab, T *tau, T *work, integer *lwork, integer *info)#

HETRD_HE2HB reduces a complex Hermitian matrix A to complex Hermitian band-diagonal form AB.

Purpose:

   HETRD_HE2HB reduces a complex Hermitian matrix A to complex Hermitian
   band-diagonal form AB by a unitary similarity transformation:
   Q**H * A * Q = AB.

Parameters:
  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • KD – [in]

    KD is INTEGER

    The number of superdiagonals of the reduced matrix if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KD >= 0. The reduced matrix is stored in the array AB.

  • A – [inout]

    A is COMPLEX array, dimension (LDA,N)

    On entry, the Hermitian matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = ‘L’, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.

    On exit, if UPLO = ‘U’, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array TAU, represent the unitary matrix Q as a product of elementary reflectors; if UPLO = ‘L’, the diagonal and first subdiagonal of A are over- written by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array TAU, represent the unitary matrix Q as a product of elementary reflectors. See Further Details.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • AB – [out]

    AB is COMPLEX array, dimension (LDAB,N)

    On exit, the upper or lower triangle of the Hermitian band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:

    if UPLO = ‘U’, AB(kd+1+i-j,j) = A(i,j) for fla_max(1,j-kd)<=i<=j;

    if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).

  • LDAB – [in]

    LDAB is INTEGER

    The leading dimension of the array AB. LDAB >= KD+1.

  • TAU – [out]

    TAU is COMPLEX array, dimension (N-KD)

    The scalar factors of the elementary reflectors (see Further Details).

  • WORK – [out]

    WORK is COMPLEX array, dimension (LWORK)

    On exit, if INFO = 0, or if LWORK=-1, WORK(1) returns the size of LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK which should be calculated by a workspace query. LWORK = MAX(1, LWORK_QUERY)

    If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

    LWORK_QUERY = N*KD + N*max(KD,FACTOPTNB) + 2*KD*KD

    where FACTOPTNB is the blocking used by the QR or LQ algorithm, usually FACTOPTNB=128 is a good choice otherwise putting LWORK=-1 will provide the size of WORK.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

SYTRD_HB2ST#

group sytrd_hb2st

Functions

template<typename T>
void sytrd_sb2st(char *stage1, char *vect, char *uplo, integer *n, integer *kd, T *ab, integer *ldab, T *d, T *e, T *hous, integer *lhous, T *work, integer *lwork, integer *info)#

SYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric tridiagonal form T.

Purpose:

   SYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric
   tridiagonal form T by a orthogonal similarity transformation:
   Q**T * A * Q = T.

Parameters:
  • STAGE1 – [in]

    STAGE1 is CHARACTER*1

    = ‘N’: “No”: to mention that the stage 1 of the reduction from dense to band using the ssytrd_sy2sb routine was not called before this routine to reproduce AB. In other term this routine is called as standalone.

    = ‘Y’: “Yes”: to mention that the stage 1 of the reduction from dense to band using the ssytrd_sy2sb routine has been called to produce AB (e.g., AB is the output of ssytrd_sy2sb.

  • VECT – [in]

    VECT is CHARACTER*1

    = ‘N’: No need for the Housholder representation, and thus LHOUS is of size fla_max(1, 4*N);

    = ‘V’: the Householder representation is needed to either generate or to apply Q later on, then LHOUS is to be queried and computed. (NOT AVAILABLE IN THIS RELEASE).

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • KD – [in]

    KD is INTEGER

    The number of superdiagonals of the matrix A if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KD >= 0.

  • AB – [inout]

    AB is REAL array, dimension (LDAB,N)

    On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:

    if UPLO = ‘U’, AB(kd+1+i-j,j) = A(i,j) for fla_max(1,j-kd)<=i<=j;

    if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).

    On exit, the diagonal elements of AB are overwritten by the diagonal elements of the tridiagonal matrix T; if KD > 0, the elements on the first superdiagonal (if UPLO = ‘U’) or the first subdiagonal (if UPLO = ‘L’) are overwritten by the off-diagonal elements of T; the rest of AB is overwritten by values generated during the reduction.

  • LDAB – [in]

    LDAB is INTEGER

    The leading dimension of the array AB. LDAB >= KD+1.

  • D – [out]

    D is REAL array, dimension (N)

    The diagonal elements of the tridiagonal matrix T.

  • E – [out]

    E is REAL array, dimension (N-1)

    The off-diagonal elements of the tridiagonal matrix T:

    E(i) = T(i,i+1) if UPLO = ‘U’; E(i) = T(i+1,i) if UPLO = ‘L’.

  • HOUS – [out] HOUS is REAL array, dimension LHOUS, that store the Householder representation.

  • LHOUS – [in]

    LHOUS is INTEGER

    The dimension of the array HOUS. LHOUS = MAX(1, dimension)

    If LWORK = -1, or LHOUS=-1, then a query is assumed; the routine only calculates the optimal size of the HOUS array, returns this value as the first entry of the HOUS array, and no error message related to LHOUS is issued by XERBLA.

    LHOUS = MAX(1, dimension) where

    dimension = 4*N if VECT=’N’

    not available now if VECT=’H’

  • WORK – [out] WORK is REAL array, dimension LWORK.

  • LWORK – [in]

    LWORK is INTEGER

    The dimension of the array WORK. LWORK = MAX(1, dimension)

    If LWORK = -1, or LHOUS=-1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

    LWORK = MAX(1, dimension) where dimension = (2KD+1)*N + KD*NTHREADS

    where KD is the blocking size of the reduction, FACTOPTNB is the blocking used by the QR or LQ algorithm, usually FACTOPTNB=128 is a good choice NTHREADS is the number of threads used when openMP compilation is enabled, otherwise =1.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

HB2ST_KERNELS#

group hb2st_kernels

Functions

template<typename T>
void hb2st_kernels(char *uplo, logical *wantz, integer *ttype, integer *st, integer *ed, integer *sweep, integer *n, integer *nb, integer *ib, T *a, integer *lda, T *v, T *tau, integer *ldvt, T *work)#

HB2ST_KERNELS is an internal routine used by the HETRD_HB2ST subroutine.

Purpose:

 HB2ST_KERNELS is an internal routine used by the CHETRD_HB2ST
 subroutine.

Parameters:
  • UPLO – [in] UPLO is CHARACTER*1

  • WANTZ – [in] WANTZ is LOGICAL which indicate if Eigenvalue are requested or both Eigenvalue/Eigenvectors.

  • TTYPE – [in] TTYPE is INTEGER

  • ST – [in]

    ST is INTEGER

    internal parameter for indices.

  • ED – [in]

    ED is INTEGER

    internal parameter for indices.

  • SWEEP – [in]

    SWEEP is INTEGER

    internal parameter for indices.

  • N – [in] N is INTEGER. The order of the matrix A.

  • NB – [in] NB is INTEGER. The size of the band.

  • IB – [in] IB is INTEGER.

  • A – [inout] A is COMPLEX array. A pointer to the matrix A.

  • LDA – [in] LDA is INTEGER. The leading dimension of the matrix A.

  • V – [out] V is COMPLEX array, dimension 2*n if eigenvalues only are requested or to be queried for vectors.

  • TAU – [out] TAU is COMPLEX array, dimension (2*n). The scalar factors of the Householder reflectors are stored in this array.

  • LDVT – [in] LDVT is INTEGER.

  • WORK – [out] WORK is COMPLEX array. Workspace of size nb.

SB2ST_KERNELS#

group sb2st_kernels

Functions

template<typename T>
void sb2st_kernels(char *uplo, logical *wantz, integer *ttype, integer *st, integer *ed, integer *sweep, integer *n, integer *nb, integer *ib, T *a, integer *lda, T *v, T *tau, integer *ldvt, T *work)#

SB2ST_KERNELS is an internal routine used by the SYTRD_SB2ST subroutine.

Purpose:

 SB2ST_KERNELS is an internal routine used by the SYTRD_SB2ST
 subroutine.

Parameters:
  • UPLO – [in] UPLO is CHARACTER*1

  • WANTZ – [in] WANTZ is LOGICAL which indicate if Eigenvalue are requested or both Eigenvalue/Eigenvectors.

  • TTYPE – [in] TTYPE is INTEGER

  • ST – [in]

    ST is INTEGER

    internal parameter for indices.

  • ED – [in]

    ED is INTEGER

    internal parameter for indices.

  • SWEEP – [in]

    SWEEP is INTEGER

    internal parameter for indices.

  • N – [in] N is INTEGER. The order of the matrix A.

  • NB – [in] NB is INTEGER. The size of the band.

  • IB – [in] IB is INTEGER.

  • A – [inout] A is REAL array. A pointer to the matrix A.

  • LDA – [in] LDA is INTEGER. The leading dimension of the matrix A.

  • V – [out] V is REAL array, dimension 2*n if eigenvalues only are requested or to be queried for vectors.

  • TAU – [out]

    TAU is REAL array, dimension (2*n).

    The scalar factors of the Householder reflectors are stored in this array.

  • LDVT – [in] LDVT is INTEGER.

  • WORK – [out] WORK is REAL array. Workspace of size nb.

LAE2#

group lae2

Functions

template<typename T>
void lae2(T *a, T *b, T *c, T *rt1, T *rt2)#

LAE2 computes the eigenvalues of a 2-by-2 symmetric matrix.

Purpose:

 LAE2  computes the eigenvalues of a 2-by-2 symmetric matrix
    [  A   B  ]
    [  B   C  ].
 On   return, RT1 is the eigenvalue of larger absolute value, and RT2
 is the eigenvalue of smaller absolute value.

Parameters:
  • A – [in]

    A is REAL

    The (1,1) element of the 2-by-2 matrix.

  • B – [in]

    B is REAL

    The (1,2) and (2,1) elements of the 2-by-2 matrix.

  • C – [in]

    C is REAL

    The (2,2) element of the 2-by-2 matrix.

  • RT1 – [out]

    RT1 is REAL

    The eigenvalue of larger absolute value.

  • RT2 – [out]

    RT2 is REAL

    The eigenvalue of smaller absolute value.

LAESY#

group laesy

Functions

template<typename T>
void laesy(T *a, T *b, T *c, T *rt1, T *rt2, T *evscal, T *cs1, T *sn1)#

LAESY computes the eigenvalues and eigenvectors of a 2-by-2 complex symmetric matrix.

Purpose:

   LAESY computes the eigendecomposition of a 2-by-2 symmetric matrix
      ((A, B);(B, C))
   provided the norm of the matrix of eigenvectors is larger than
   some threshold value.

   RT1 is the eigenvalue of larger absolute value, and RT2 of
   smaller absolute value.  If the eigenvectors are computed, then
   on   return (CS1, SN1) is the unit eigenvector for RT1, hence

   [  CS1     SN1   ] . [ A  B ] . [ CS1    -SN1   ] = [ RT1  0  ]
   [ -SN1     CS1   ]   [ B  C ]   [ SN1     CS1   ]   [  0  RT2 ]

Parameters:
  • A – [in]

    A is COMPLEX

    The (1, 1) element of input matrix.

  • B – [in]

    B is COMPLEX

    The (1, 2) element of input matrix. The (2, 1) element is also given by B, since the 2-by-2 matrix is symmetric.

  • C – [in]

    C is COMPLEX

    The (2, 2) element of input matrix.

  • RT1 – [out]

    RT1 is COMPLEX

    The eigenvalue of larger modulus.

  • RT2 – [out]

    RT2 is COMPLEX

    The eigenvalue of smaller modulus.

  • EVSCAL – [out]

    EVSCAL is COMPLEX

    The complex value by which the eigenvector matrix was scaled to make it orthonormal. If EVSCAL is zero, the eigenvectors were not computed. This means one of two things: the 2-by-2 matrix could not be diagonalized, or the norm of the matrix of eigenvectors before scaling was larger than the threshold value THRESH (set below).

  • CS1 – [out] CS1 is COMPLEX

  • SN1 – [out]

    SN1 is COMPLEX

    If EVSCAL .NE. 0, (CS1, SN1) is the unit right eigenvector for RT1.

LAEV2#

group laev2

Functions

template<typename T>
void laev2(T *a, T *b, T *c, T *rt1, T *rt2, T *cs1, T *sn1)#

LAEV2 computes the eigenvalues and eigenvectors of a 2-by-2 symmetric/Hermitian matrix.

Purpose:

   LAEV2 computes the eigendecomposition of a 2-by-2 symmetric matrix
      [  A   B  ]
      [  B   C  ].
   On   return, RT1 is the eigenvalue of larger absolute value, RT2 is the
   eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
   eigenvector for RT1, giving the decomposition

      [ CS1  SN1 ] [  A   B  ] [ CS1 -SN1 ]  =  [ RT1  0  ]
      [-SN1  CS1 ] [  B   C  ] [ SN1  CS1 ]     [  0  RT2 ].

Parameters:
  • A – [in]

    A is REAL

    The (1,1) element of the 2-by-2 matrix.

  • B – [in]

    B is REAL

    The (1,2) element and the conjugate of the (2,1) element of the 2-by-2 matrix.

  • C – [in]

    C is REAL

    The (2,2) element of the 2-by-2 matrix.

  • RT1 – [out]

    RT1 is REAL

    The eigenvalue of larger absolute value.

  • RT2 – [out]

    RT2 is REAL

    The eigenvalue of smaller absolute value.

  • CS1 – [out] CS1 is REAL

  • SN1 – [out]

    SN1 is REAL

    The vector (CS1, SN1) is a unit right eigenvector for RT1.

template<typename T, typename Ta>
void laev2(T *a, T *b, T *c, Ta *rt1, Ta *rt2, Ta *cs1, T *sn1)#

LAGTF#

group lagtf

Functions

template<typename T>
void lagtf(integer *n, T *a, T *lambda, T *b, T *c, T *tol, T *d, integer *in, integer *info)#

LAGTF computes an LU factorization of a matrix T-λI, where T is a general

tridiagonal matrix, and λ a scalar, using partial pivoting with row interchanges.

Purpose:

   LAGTF factorizes the matrix (T - lambda*I), where T is an n by n
   tridiagonal matrix and lambda is a scalar, as

      T - lambda*I = PLU,

   where P is a permutation matrix, L is a unit lower tridiagonal matrix
   with at most one non-zero sub-diagonal elements per column and U is
   an upper triangular matrix with at most two non-zero super-diagonal
   elements per column.

   The factorization is obtained by Gaussian elimination with partial
   pivoting and implicit row scaling.

   The parameter LAMBDA is included in the routine so that SLAGTF may
   be used, in conjunction with SLAGTS, to obtain eigenvectors of T by
   inverse iteration.

Parameters:
  • N – [in]

    N is INTEGER

    The order of the matrix T.

  • A – [inout]

    A is REAL array, dimension (N)

    On entry, A must contain the diagonal elements of T.

    On exit, A is overwritten by the n diagonal elements of the upper triangular matrix U of the factorization of T.

  • LAMBDA – [in]

    LAMBDA is REAL

    On entry, the scalar lambda.

  • B – [inout]

    B is REAL array, dimension (N-1)

    On entry, B must contain the (n-1) super-diagonal elements of T.

    On exit, B is overwritten by the (n-1) super-diagonal elements of the matrix U of the factorization of T.

  • C – [inout]

    C is REAL array, dimension (N-1)

    On entry, C must contain the (n-1) sub-diagonal elements of T.

    On exit, C is overwritten by the (n-1) sub-diagonal elements of the matrix L of the factorization of T.

  • TOL – [in]

    TOL is REAL

    On entry, a relative tolerance used to indicate whether or not the matrix (T - lambda*I) is nearly singular. TOL should normally be chose as approximately the largest relative error in the elements of T. For example, if the elements of T are correct to about 4 significant figures, then TOL should be set to about 5*10**(-4). If TOL is supplied as less than eps, where eps is the relative machine precision, then the value eps is used in place of TOL.

  • D – [out]

    D is REAL array, dimension (N-2)

    On exit, D is overwritten by the (n-2) second super-diagonal elements of the matrix U of the factorization of T.

  • IN – [out]

    IN is INTEGER array, dimension (N)

    On exit, IN contains details of the permutation matrix P. If an interchange occurred at the kth step of the elimination, then IN(k) = 1, otherwise IN(k) = 0. The element IN(n) returns the smallest positive integer j such that

    abs(u(j,j)) <= norm((T - lambda*I)(j))*TOL,

    where norm(A(j)) denotes the sum of the absolute values of the jth row of the matrix A. If no such j exists then IN(n) is returned as zero. If IN(n) is returned as positive, then a diagonal element of U is small, indicating that (T - lambda*I) is singular or nearly singular,

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

    < 0: if INFO = -k, the kth argument had an illegal value

LAGTS#

group lagts

Functions

template<typename T>
void lagts(integer *job, integer *n, T *a, T *b, T *c, T *d, integer *in, T *y, T *tol, integer *info)#

LAGTS solves the system of equations (T-λI)x = y or (T-λI)Tx = y,where T is a general

tridiagonal matrix and λ a scalar, using the LU factorization computed by slagtf.

Purpose:

   LAGTS may be used to solve one of the systems of equations

      (T - lambda*I)*x = y   or   (T - lambda*I)**T*x = y,

   where T is an n by n tridiagonal matrix, for x, following the
   factorization of (T - lambda*I) as

      (T - lambda*I) = P*L*U ,

   by routine LAGTF. The choice of equation to be solved is
   controlled by the argument JOB, and in each case there is an option
   to perturb zero or very small diagonal elements of U, this option
   being intended for use in applications such as inverse iteration.

Parameters:
  • JOB – [in]

    JOB is INTEGER

    Specifies the job to be performed by SLAGTS as follows:

    = 1: The equations (T - lambda*I)x = y are to be solved, but diagonal elements of U are not to be perturbed.

    = -1: The equations (T - lambda*I)x = y are to be solved and, if overflow would otherwise occur, the diagonal elements of U are to be perturbed. See argument TOL below.

    = 2: The equations (T - lambda*I)**Tx = y are to be solved, but diagonal elements of U are not to be perturbed.

    = -2: The equations (T - lambda*I)**Tx = y are to be solved and, if overflow would otherwise occur, the diagonal elements of U are to be perturbed. See argument TOL below.

  • N – [in]

    N is INTEGER

    The order of the matrix T.

  • A – [in]

    A is REAL array, dimension (N)

    On entry, A must contain the diagonal elements of U as returned from SLAGTF.

  • B – [in]

    B is REAL array, dimension (N-1)

    On entry, B must contain the first super-diagonal elements of U as returned from SLAGTF.

  • C – [in]

    C is REAL array, dimension (N-1)

    On entry, C must contain the sub-diagonal elements of L as returned from SLAGTF.

  • D – [in]

    D is REAL array, dimension (N-2)

    On entry, D must contain the second super-diagonal elements of U as returned from SLAGTF.

  • IN – [in]

    IN is INTEGER array, dimension (N)

    On entry, IN must contain details of the matrix P as returned from SLAGTF.

  • Y – [inout]

    Y is REAL array, dimension (N)

    On entry, the right hand side vector y. On exit, Y is overwritten by the solution vector x.

  • TOL – [inout]

    TOL is REAL

    On entry, with JOB < 0, TOL should be the minimum perturbation to be made to very small diagonal elements of U. TOL should normally be chosen as about eps*norm(U), where eps is the relative machine precision, but if TOL is supplied as non-positive, then it is reset to eps*max(abs(u(i,j))). If JOB > 0 then TOL is not referenced.

    On exit, TOL is changed as described above, only if TOL is non-positive on entry. Otherwise TOL is unchanged.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: overflow would occur when computing the INFO(th) element of the solution vector x. This can only occur when JOB is supplied as positive and either means that a diagonal element of U is very small, or that the elements of the right-hand side vector y are very large.

SPTRD#

group sptrd

Functions

template<typename T>
void sptrd(char *uplo, integer *n, T *ap, T *d, T *e, T *tau, integer *info)#

SPTRD reduces a real symmetric matrix A stored in packed form to symmetric tridiagonal form T.

Purpose:

    SPTRD reduces a real symmetric matrix A stored in packed form to
    symmetric tridiagonal form T by an orthogonal similarity
    transformation: Q**T * A * Q = T.

Parameters:
  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • AP – [inout]

    AP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:

    if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;

    if UPLO = ‘L’, AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.

    On exit, if UPLO = ‘U’, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors; if UPLO = ‘L’, the diagonal and first subdiagonal of A are over- written by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.

  • D – [out]

    D is REAL array, dimension (N)

    The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i).

  • E – [out]

    E is REAL array, dimension (N-1)

    The off-diagonal elements of the tridiagonal matrix T:

    E(i) = A(i,i+1) if UPLO = ‘U’, E(i) = A(i+1,i) if UPLO = ‘L’.

  • TAU – [out]

    TAU is REAL array, dimension (N-1)

    The scalar factors of the elementary reflectors (see Further Details).

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

template<typename T, typename Ta>
void hptrd(char *uplo, integer *n, T *ap, Ta *d, Ta *e, T *tau, integer *info)#

OPGTR#

group opgtr

Functions

template<typename T>
void opgtr(char *uplo, integer *n, T *ap, T *tau, T *q, integer *ldq, T *work, integer *info)#

OPGTR generates a real orthogonal matrix Q.

Purpose:

  OPGTR generates a real orthogonal matrix Q which is defined as the
  product of n-1 elementary reflectors H(i) of order n, as returned by
  SSPTRD using packed storage:

  if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),

  if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).

Parameters:
  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangular packed storage used in previous call to SSPTRD;

    = ‘L’: Lower triangular packed storage used in previous call to SSPTRD.

  • N – [in]

    N is INTEGER

    The order of the matrix Q. N >= 0.

  • AP – [in]

    AP is REAL array, dimension (N*(N+1)/2)

    The vectors which define the elementary reflectors, as returned by SSPTRD.

  • TAU – [in]

    TAU is REAL array, dimension (N-1)

    TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by SSPTRD.

  • Q – [out]

    Q is REAL array, dimension (LDQ,N)

    The N-by-N orthogonal matrix Q.

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q. LDQ >= fla_max(1,N).

  • WORK – [out] WORK is REAL array, dimension (N-1)

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

template<typename T>
void upgtr(char *uplo, integer *n, T *ap, T *tau, T *q, integer *ldq, T *work, integer *info)#

OPMTR#

group opmtr

Functions

template<typename T>
void opmtr(char *side, char *uplo, char *trans, integer *m, integer *n, T *ap, T *tau, T *c, integer *ldc, T *work, integer *info)#

OPMTR overwrites the general real M-by-N matrix.

Purpose:

  OPMTR overwrites the general real M-by-N matrix C with
                  SIDE = 'L'     SIDE = 'R'
  TRANS = 'N':      Q * C          C * Q
  TRANS = 'T':      Q**T * C       C * Q**T

  where Q is a real orthogonal matrix of order nq, with nq = m if
  SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
  nq-1 elementary reflectors, as returned by SSPTRD using packed
  storage:
  if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
  if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).

Parameters:
  • SIDE – [in]

    SIDE is CHARACTER*1

    = ‘L’: apply Q or Q**T from the Left;

    = ‘R’: apply Q or Q**T from the Right.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangular packed storage used in previous call to SSPTRD;

    = ‘L’: Lower triangular packed storage used in previous call to SSPTRD.

  • TRANS – [in]

    TRANS is CHARACTER*1

    = ‘N’: No transpose, apply Q;

    = ‘T’: Transpose, apply Q**T.

  • M – [in]

    M is INTEGER

    The number of rows of the matrix C. M >= 0.

  • N – [in]

    N is INTEGER

    The number of columns of the matrix C. N >= 0.

  • AP – [in]

    AP is REAL array, dimension

    (M*(M+1)/2) if SIDE = ‘L’

    (N*(N+1)/2) if SIDE = ‘R’

    The vectors which define the elementary reflectors, as returned by SSPTRD. AP is modified by the routine but restored on exit.

  • TAU – [in]

    TAU is REAL array, dimension (M-1) if SIDE = ‘L’ or (N-1) if SIDE = ‘R’

    TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by SSPTRD.

  • C – [inout]

    C is REAL array, dimension (LDC,N)

    On entry, the M-by-N matrix C.

    On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.

  • LDC – [in]

    LDC is INTEGER

    The leading dimension of the array C. LDC >= fla_max(1,M).

  • WORK – [out]

    WORK is REAL array, dimension

    (N) if SIDE = ‘L’

    (M) if SIDE = ‘R’

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

template<typename T>
void upmtr(char *side, char *uplo, char *trans, integer *m, integer *n, T *ap, T *tau, T *c, integer *ldc, T *work, integer *info)#

SBTRD#

group sbtrd

Functions

template<typename T>
void sbtrd(char *vect, char *uplo, integer *n, integer *kd, T *ab, integer *ldab, T *d, T *e, T *q, integer *ldq, T *work, integer *info)#

SBTRD reduces a real symmetric band matrix A to symmetric tridiagonal form T.

Purpose:

    SBTRD reduces a real symmetric band matrix A to symmetric
    tridiagonal form T by an orthogonal similarity transformation:
    Q**T * A * Q = T.

Parameters:
  • VECT – [in]

    VECT is CHARACTER*1

    = ‘N’: do not form Q;

    = ‘V’: form Q;

    = ‘U’: update a matrix X, by forming X*Q.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • KD – [in]

    KD is INTEGER

    The number of superdiagonals of the matrix A if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KD >= 0.

  • AB – [inout]

    AB is REAL array, dimension (LDAB,N)

    On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:

    if UPLO = ‘U’, AB(kd+1+i-j,j) = A(i,j) for fla_max(1,j-kd)<=i<=j;

    if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).

    On exit, the diagonal elements of AB are overwritten by the diagonal elements of the tridiagonal matrix T; if KD > 0, the elements on the first superdiagonal (if UPLO = ‘U’) or the first subdiagonal (if UPLO = ‘L’) are overwritten by the off-diagonal elements of T; the rest of AB is overwritten by values generated during the reduction.

  • LDAB – [in]

    LDAB is INTEGER

    The leading dimension of the array AB. LDAB >= KD+1.

  • D – [out]

    D is REAL array, dimension (N)

    The diagonal elements of the tridiagonal matrix T.

  • E – [out]

    E is REAL array, dimension (N-1)

    The off-diagonal elements of the tridiagonal matrix T:

    E(i) = T(i,i+1) if UPLO = ‘U’; E(i) = T(i+1,i) if UPLO = ‘L’.

  • Q – [inout]

    Q is REAL array, dimension (LDQ,N)

    On entry, if VECT = ‘U’, then Q must contain an N-by-N matrix X; if VECT = ‘N’ or ‘V’, then Q need not be set.

    On exit:

    if VECT = ‘V’, Q contains the N-by-N orthogonal matrix Q;

    if VECT = ‘U’, Q contains the product X*Q;

    if VECT = ‘N’, the array Q is not referenced.

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q.

    LDQ >= 1, and LDQ >= N if VECT = ‘V’ or ‘U’.

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

template<typename T, typename Ta>
void hbtrd(char *vect, char *uplo, integer *n, integer *kd, T *ab, integer *ldab, Ta *d, Ta *e, T *q, integer *ldq, T *work, integer *info)#

SYGST#

group sygst

Functions

template<typename T>
void sygst(integer *itype, char *uplo, integer *n, T *a, integer *lda, T *b, integer *ldb, integer *info)#

Reduction of a real symmetric-definite generalized eigenproblem to standard form.

Purpose:

    Reduction of a real symmetric-definite generalized eigenproblem to standard form.

    If itype = 1, the problem is A*X = lambda*B*X,
    and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)

    If itype = 2 or 3, the problem is A*B*X = lambda*X or
    B*A*X = lambda*X, and A is overwritten by U*A*U**T or L**T*A*L.

    B must have been previously factorized as U**T*U or L*L**T by SPOTRF.

Parameters:
  • itype – [in]

    itype is integer*

    = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);

    = 2 or 3: compute U*A*U**T or L**T*A*L.

  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a is stored and b is factored as U**T*U;

    = ‘L’: Lower triangle of a is stored and b is factored as L*L**T.

  • n – [in]

    n is integer*

    The order of the matrices a and b. n >= 0.

  • a – [inout]

    a is float/double array, dimension (lda,n)

    On entry, the symmetric matrix a. If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a, and the strictly lower triangular part of a is not referenced. If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a, and the strictly upper triangular part of a is not referenced.

    On exit, if info = 0, the transformed matrix, stored in the same format as a.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • b – [in]

    b is float/double array, dimension (ldb,n)

    The triangular factor from the Cholesky factorization of b, as returned by SPOTRF.

  • ldb – [in]

    ldb is integer*

    The leading dimension of the array b. ldb >= fla_max(1,n).

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

HEGST#

group hegst

Functions

template<typename T>
void hegst(integer *itype, char *uplo, integer *n, T *a, integer *lda, T *b, integer *ldb, integer *info)#

Reduction of a complex Hermitian-definite generalized eigenproblem to standard form.

Purpose:

    Reduction of a real symmetric-definite generalized eigenproblem to standard form.

    If itype = 1, the problem is A*X = lambda*B*X,
    and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)

    If itype = 2 or 3, the problem is A*B*X = lambda*X or
    B*A*X = lambda*X, and A is overwritten by U*A*U**H or L**H*A*L.

    B must have been previously factorized as U**H*U or L*L**H by SPOTRF.

Parameters:
  • itype – [in]

    itype is integer*

    = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);

    = 2 or 3: compute U*A*U**H or L**H*A*L.

  • uplo – [in]

    uplo is char*

    = ‘U’: Upper triangle of a is stored and b is factored as U**H*U;

    = ‘L’: Lower triangle of a is stored and b is factored as L*L**H.

  • n – [in]

    n is integer*

    The order of the matrices a and b. n >= 0.

  • a – [inout]

    a is COMPLEX/COMPLEX*16 array, dimension (lda,n)

    On entry, the symmetric matrix a. If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a, and the strictly lower triangular part of a is not referenced. If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a, and the strictly upper triangular part of a is not referenced.

    On exit, if info = 0, the transformed matrix, stored in the same format as a.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • b – [in]

    b is COMPLEX/COMPLEX*16 array, dimension (ldb,n)

    The triangular factor from the Cholesky factorization of b, as returned by SPOTRF.

  • ldb – [in]

    ldb is integer*

    The leading dimension of the array b. ldb >= fla_max(1,n).

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

HEGS2#

group hegs2

Functions

template<typename T>
void hegs2(integer *itype, char *uplo, integer *n, T *a, integer *lda, T *b, integer *ldb, integer *info)#

Reduction of a Hermitian-definite generalized eigenproblem to standard form (unblocked algorithm)

Purpose:

    Reduction of a Hermitian definite generalized eigenproblem to standard form, using the
    factorization results obtained from cpotrf (unblocked algorithm).
    If itype = 1, the problem is A*X = lambda*B*X,
    and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)

    If itype = 2 or 3, the problem is A*B*X = lambda*X or
    B*A*X = lambda*X, and A is overwritten by U*A*U**H or L**H *A*L.

    B must have been previously factorized as U**H *U or L*L**H by CPOTRF.

Parameters:
  • itype – [in]

    itype is integer*

    = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);

    = 2 or 3: compute U*A*U**H or L**H *A*L.

  • uplo – [in]

    uplo is char*

    Specifies whether the upper or lower triangular part of the Hermitian matrix a is stored, and how b has been factorized.

    = ‘U’: Upper triangular

    = ‘L’: Lower triangular

  • n – [in]

    n is integer*

    The order of the matrices a and b. n >= 0.

  • a – [inout]

    a is COMPLEX/COMPLEX*16 array, dimension (lda,n)

    On entry, the symmetric matrix a. If uplo = ‘U’, the leading n by n upper triangular part of a contains the upper triangular part of the matrix a, and the strictly lower triangular part of a is not referenced. If uplo = ‘L’, the leading n by n lower triangular part of a contains the lower triangular part of the matrix a, and the strictly upper triangular part of a is not referenced.

    On exit, if info = 0, the transformed matrix, stored in the same format as a.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • b – [in]

    b is COMPLEX/COMPLEX*16 array, dimension (ldb,n)

    The triangular factor from the Cholesky factorization of b, as returned by CPOTRF.

  • ldb – [in]

    ldb is integer*

    The leading dimension of the array b. ldb >= fla_max(1,n).

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

SYGS2#

group sygs2

Functions

template<typename T>
void sygs2(integer *itype, char *uplo, integer *n, T *a, integer *lda, T *b, integer *ldb, integer *info)#

Reduction of a symmetric-definite generalized eigenproblem to standard form (unblocked algorithm)

Purpose:

    Reduction of a real symmetric definite generalized eigenproblem to standard form, using
the factorization results obtained from spotrf (unblocked algorithm). If itype = 1, the
problem is A*X = lambda*B*X, and A is overwritten by inv(U**T)*A*inv(U) or
inv(L)*A*inv(L**T)

    If itype = 2 or 3, the problem is A*B*X = lambda*X or
    B*A*X = lambda*X, and A is overwritten by U*A*U**T or L**T *A*L.

    B must have been previously factorized as U**T *U or L*L**T by SPOTRF.

Parameters:
  • itype – [in]

    itype is integer*

    = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);

    = 2 or 3: compute U*A*U**T or L**T *A*L.

  • uplo – [in]

    uplo is char*

    Specifies whether the upper or lower triangular part of the symmetric matrix a is stored, and how b has been factorized.

    = ‘U’: Upper triangular

    = ‘L’: Lower triangular

  • n – [in]

    n is integer*

    The order of the matrices a and b. n >= 0.

  • a – [inout]

    a is float/doublearray, dimension (lda,n)

    On entry, the symmetric matrix a. If uplo = ‘U’, the leading n by n upper triangular part of a contains the upper triangular part of the matrix a, and the strictly lower triangular part of a is not referenced. If uplo = ‘L’, the leading n by n lower triangular part of a contains the lower triangular part of the matrix a, and the strictly upper triangular part of a is not referenced.

    On exit, if info = 0, the transformed matrix, stored in the same format as a.

  • lda – [in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,n).

  • b – [in]

    b is float/double array, dimension (ldb,n)

    The triangular factor from the Cholesky factorization of b, as returned by SPOTRF.

  • ldb – [in]

    ldb is integer*

    The leading dimension of the array b. ldb >= fla_max(1,n).

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

SPGST#

group spgst

Functions

template<typename T>
void spgst(integer *itype, char *uplo, integer *n, T *ap, T *bp, integer *info)#

SPGST reduces a real symmetric-definite generalized eigenproblem to standard form.

Purpose:

    SPGST reduces a real symmetric-definite generalized eigenproblem
    to standard form, using packed storage.

    If ITYPE = 1, the problem is A*x = lambda*B*x,
    and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)

    If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
    B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.

    B must have been previously factorized as U**T*U or L*L**T by SPPTRF.

Parameters:
  • ITYPE – [in]

    ITYPE is INTEGER

    = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);

    = 2 or 3: compute U*A*U**T or L**T*A*L.

  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored and B is factored as U**T*U;

    = ‘L’: Lower triangle of A is stored and B is factored as L*L**T.

  • N – [in]

    N is INTEGER

    The order of the matrices A and B. N >= 0.

  • AP – [inout]

    AP is REAL array, dimension (N*(N+1)/2)

    On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:

    if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;

    if UPLO = ‘L’, AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.

    On exit, if INFO = 0, the transformed matrix, stored in the same format as A.

  • BP – [in]

    BP is REAL array, dimension (N*(N+1)/2)

    The triangular factor from the Cholesky factorization of B, stored in the same format as A, as returned by SPPTRF.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

template<typename T>
void hpgst(integer *itype, char *uplo, integer *n, T *ap, T *bp, integer *info)#

PBSTF#

group pbstf

Functions

template<typename T>
void pbstf(char *uplo, integer *n, integer *kb, T *bb, integer *ldbb, integer *info)#

PBSTF computes a split Cholesky factorization of a real symmetric

positive definite band matrix.

Purpose:

    PBSTF computes a split Cholesky factorization of a real
    symmetric positive definite band matrix A.

    This routine is designed to be used in conjunction with SSBGST.

    The factorization has the form  A = S**T*S  where S is a band matrix
    of the same bandwidth as A and the following structure:

      S = ( U   )
          ( M  L)

    where U is upper triangular of order m = (n+kd)/2, and L is lower
    triangular of order n-m.

Parameters:
  • UPLO – [in]

    UPLO is CHARACTER*1

    = ‘U’: Upper triangle of A is stored;

    = ‘L’: Lower triangle of A is stored.

  • N – [in]

    N is INTEGER

    The order of the matrix A. N >= 0.

  • KD – [in]

    KD is INTEGER

    The number of superdiagonals of the matrix A if UPLO = ‘U’, or the number of subdiagonals if UPLO = ‘L’. KD >= 0.

  • AB – [inout]

    AB is REAL array, dimension (LDAB,N)

    On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first kd+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:

    if UPLO = ‘U’, AB(kd+1+i-j,j) = A(i,j) for fla_max(1,j-kd)<=i<=j;

    if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).

    On exit, if INFO = 0, the factor S from the split Cholesky factorization A = S**T*S. See Further Details.

  • LDAB – [in]

    LDAB is INTEGER

    The leading dimension of the array AB. LDAB >= KD+1.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: if INFO = i, the factorization could not be completed, because the updated element a(i,i) was negative; the matrix A is not positive definite.

LAG2#

group lag2

Functions

template<typename T>
void lag2(T *a, integer *lda, T *b, integer *ldb, T *safmin, T *scale1, T *scale2, T *wr1, T *wr2, T *wi)#

LAG2 computes the eigenvalues of a 2-by-2 generalized eigenvalue problem,

with scaling as necessary to avoid over-/underflow.

Purpose:

 LAG2 computes the eigenvalues of a 2 x 2 generalized eigenvalue
 problem  A - w B, with scaling as necessary to avoid over-/underflow.

 The scaling factor "s" results in a modified eigenvalue equation

     s A - w B

 where  s  is a non-negative scaling factor chosen so that  w, w B,
 and  s A  do not overflow and, if possible, do not underflow, either.

Parameters:
  • A – [in]

    A is REAL array, dimension (LDA, 2)

    On entry, the 2 x 2 matrix A. It is assumed that its 1-norm is less than 1/SAFMIN. Entries less than sqrt(SAFMIN)*norm(A) are subject to being treated as zero.

  • LDA – [in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= 2.

  • B – [in]

    B is REAL array, dimension (LDB, 2)

    On entry, the 2 x 2 upper triangular matrix B. It is assumed that the one-norm of B is less than 1/SAFMIN. The diagonals should be at least sqrt(SAFMIN) times the largest element of B (in absolute value); if a diagonal is smaller than that, then +/- sqrt(SAFMIN) will be used instead of that diagonal.

  • LDB – [in]

    LDB is INTEGER

    The leading dimension of the array B. LDB >= 2.

  • SAFMIN – [in]

    SAFMIN is REAL

    The smallest positive number s.t. 1/SAFMIN does not overflow. (This should always be SLAMCH(‘S’)

    &#8212; it is an argument in order to avoid having to call SLAMCH frequently.)

  • SCALE1 – [out]

    SCALE1 is REAL

    A scaling factor used to avoid over-/underflow in the eigenvalue equation which defines the first eigenvalue. If the eigenvalues are complex, then the eigenvalues are (WR1 +/- WI i) / SCALE1 (which may lie outside the exponent range of the machine), SCALE1=SCALE2, and SCALE1 will always be positive. If the eigenvalues are real, then the first (real) eigenvalue is WR1 / SCALE1 , but this may overflow or underflow, and in fact, SCALE1 may be zero or less than the underflow threshold if the exact eigenvalue is sufficiently large.

  • SCALE2 – [out]

    SCALE2 is REAL

    A scaling factor used to avoid over-/underflow in the eigenvalue equation which defines the second eigenvalue. If the eigenvalues are complex, then SCALE2=SCALE1. If the eigenvalues are real, then the second (real) eigenvalue is WR2 / SCALE2 , but this may overflow or underflow, and in fact, SCALE2 may be zero or less than the underflow threshold if the exact eigenvalue is sufficiently large.

  • WR1 – [out]

    WR1 is REAL

    If the eigenvalue is real, then WR1 is SCALE1 times the eigenvalue closest to the (2,2) element of A B**(-1). If the eigenvalue is complex, then WR1=WR2 is SCALE1 times the real part of the eigenvalues.

  • WR2 – [out]

    WR2 is REAL

    If the eigenvalue is real, then WR2 is SCALE2 times the other eigenvalue. If the eigenvalue is complex, then WR1=WR2 is SCALE1 times the real part of the eigenvalues.

  • WI – [out]

    WI is REAL

    If the eigenvalue is real, then WI is zero. If the eigenvalue is complex, then WI is SCALE1 times the imaginary part of the eigenvalues. WI will always be non-negative.

LAEBZ#

group laebz

Functions

template<typename T>
void laebz(integer *ijob, integer *nitmax, integer *n, integer *mmax, integer *minp, integer *nbmin, T *abstol, T *reltol, T *pivmin, T *d, T *e, T *e2, integer *nval, T *ab, T *c, integer *mout, integer *nab, T *work, integer *iwork, integer *info)#

LAEBZ computes the number of eigenvalues of a real symmetric tridiagonal

matrix which are less than or equal to a given value, and performs other tasks

required by the routine stebz.

Purpose:

 LAEBZ contains the iteration loops which compute and use the
 function N(w), which is the count of eigenvalues of a symmetric
 tridiagonal matrix T less than or equal to its argument  w.  It
 performs a choice of two types of loops:

 IJOB=1, followed by
 IJOB=2: It takes as input a list of intervals and   returns a list of
         sufficiently small intervals whose union contains the same
         eigenvalues as the union of the original intervals.
         The input intervals are (AB(j,1),AB(j,2)], j=1,...,MINP.
         The output interval (AB(j,1),AB(j,2)] will contain
         eigenvalues NAB(j,1)+1,...,NAB(j,2), where 1 <= j <= MOUT.

 IJOB=3: It performs a binary search in each input interval
         (AB(j,1),AB(j,2)] for a point  w(j)  such that
         N(w(j))=NVAL(j), and uses  C(j)  as the starting point of
         the search.  If such a w(j) is found, then on output
         AB(j,1)=AB(j,2)=w.  If no such w(j) is found, then on output
         (AB(j,1),AB(j,2)] will be a small interval containing the
         point where N(w) jumps through NVAL(j), unless that point
         lies outside the initial interval.

 Note that the intervals are in all cases half-open intervals,
 i.e., of the form  (a,b] , which includes  b  but not  a .

 To avoid underflow, the matrix should be scaled so that its largest
 element is no greater than  overflow**(1/2) * underflow**(1/4)
 in absolute value.  To assure the most accurate computation
 of small eigenvalues, the matrix should be scaled to be
 not much smaller than that, either.

 See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
 Matrix", Report CS41, Computer Science Dept., Stanford
 University, July 21, 1966

 Note: the arguments are, in general, *not* checked for unreasonable
 values.

Parameters:
  • IJOB – [in]

    IJOB is INTEGER

    Specifies what is to be done:

    = 1: Compute NAB for the initial intervals.

    = 2: Perform bisection iteration to find eigenvalues of T.

    = 3: Perform bisection iteration to invert N(w), i.e., to find a point which has a specified number of eigenvalues of T to its left.

    Other values will cause SLAEBZ to return with INFO=-1.

  • NITMAX – [in]

    NITMAX is INTEGER

    The maximum number of “levels” of bisection to be performed, i.e., an interval of width W will not be made smaller than 2^(-NITMAX) * W. If not all intervals have converged after NITMAX iterations, then INFO is set to the number of non-converged intervals.

  • N – [in]

    N is INTEGER

    The dimension n of the tridiagonal matrix T. It must be at least 1.

  • MMAX – [in]

    MMAX is INTEGER

    The maximum number of intervals. If more than MMAX intervals are generated, then SLAEBZ will quit with INFO=MMAX+1.

  • MINP – [in]

    MINP is INTEGER

    The initial number of intervals. It may not be greater than MMAX.

  • NBMIN – [in]

    NBMIN is INTEGER

    The smallest number of intervals that should be processed using a vector loop. If zero, then only the scalar loop will be used.

  • ABSTOL – [in]

    ABSTOL is REAL

    The minimum (absolute) width of an interval. When an interval is narrower than ABSTOL, or than RELTOL times the larger (in magnitude) endpoint, then it is considered to be sufficiently small, i.e., converged. This must be at least zero.

  • RELTOL – [in]

    RELTOL is REAL

    The minimum relative width of an interval. When an interval is narrower than ABSTOL, or than RELTOL times the larger (in magnitude) endpoint, then it is considered to be sufficiently small, i.e., converged. Note: this should always be at least radix*machine epsilon.

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum absolute value of a “pivot” in the Sturm sequence loop. This must be at least max |e(j)**2|*safe_min and at least safe_min, where safe_min is at least the smallest number that can divide one without overflow.

  • D – [in]

    D is REAL array, dimension (N)

    The diagonal elements of the tridiagonal matrix T.

  • E – [in]

    E is REAL array, dimension (N)

    The offdiagonal elements of the tridiagonal matrix T in positions 1 through N-1. E(N) is arbitrary.

  • E2 – [in]

    E2 is REAL array, dimension (N)

    The squares of the offdiagonal elements of the tridiagonal matrix T. E2(N) is ignored.

  • NVAL – [inout]

    NVAL is INTEGER array, dimension (MINP)

    If IJOB=1 or 2, not referenced.

    If IJOB=3, the desired values of N(w). The elements of NVAL will be reordered to correspond with the intervals in AB. Thus, NVAL(j) on output will not, in general be the same as NVAL(j) on input, but it will correspond with the interval (AB(j,1),AB(j,2)] on output.

  • AB – [inout]

    AB is REAL array, dimension (MMAX,2)

    The endpoints of the intervals. AB(j,1) is a(j), the left endpoint of the j-th interval, and AB(j,2) is b(j), the right endpoint of the j-th interval. The input intervals will, in general, be modified, split, and reordered by the calculation.

  • C – [inout]

    C is REAL array, dimension (MMAX)

    If IJOB=1, ignored.

    If IJOB=2, workspace.

    If IJOB=3, then on input C(j) should be initialized to the first search point in the binary search.

  • MOUT – [out]

    MOUT is INTEGER

    If IJOB=1, the number of eigenvalues in the intervals.

    If IJOB=2 or 3, the number of intervals output.

    If IJOB=3, MOUT will equal MINP.

  • NAB – [inout]

    NAB is INTEGER array, dimension (MMAX,2)

    If IJOB=1, then on output NAB(i,j) will be set to N(AB(i,j)).

    If IJOB=2, then on input, NAB(i,j) should be set. It must satisfy the condition:

    N(AB(i,1)) <= NAB(i,1) <= NAB(i,2) <= N(AB(i,2)),

    which means that in interval i only eigenvalues NAB(i,1)+1,…,NAB(i,2) will be considered. Usually, NAB(i,j)=N(AB(i,j)), from a previous call to SLAEBZ with IJOB=1.

    On output, NAB(i,j) will contain fla_max(na(k),min(nb(k),N(AB(i,j)))), where k is the index of the input interval that the output interval (AB(j,1),AB(j,2)] came from, and na(k) and nb(k) are the the input values of NAB(k,1) and NAB(k,2).

    If IJOB=3, then on output, NAB(i,j) contains N(AB(i,j)), unless N(w) > NVAL(i) for all search points w , in which case NAB(i,1) will not be modified, i.e., the output value will be the same as the input value (modulo reorderings &#8212; see NVAL and AB), or unless N(w) < NVAL(i) for all search points w , in which case NAB(i,2) will not be modified. Normally, NAB should be set to some distinctive value(s) before SLAEBZ is called.

  • WORK – [out]

    WORK is REAL array, dimension (MMAX)

    Workspace.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (MMAX)

    Workspace.

  • INFO – [out]

    INFO is INTEGER

    = 0: All intervals converged.

    = 1&#8212;MMAX: The last INFO intervals did not converge.

    = MMAX+1: More than MMAX intervals were generated.

LANEG#

group laneg

Functions

template<typename T>
integer laneg(integer *n, T *d, T *lld, T *sigma, T *pivmin, integer *r__)#

LANEG computes the Sturm count.

Purpose:

 LANEG computes the Sturm count, the number of negative pivots
 encountered while factoring tridiagonal T - sigma I = L D L^T.
 This implementation works directly on the factors without forming
 the tridiagonal matrix T.  The Sturm count is also the number of
 eigenvalues of T less than sigma.

 This routine is called from SLARRB.

 The current routine does not use the PIVMIN parameter but rather
 requires IEEE-754 propagation of Infinities and NaNs.  This
 routine also has no input range restrictions but does require
 default exception handling such that x/0 produces Inf when x is
 non-zero, and Inf/Inf produces NaN.  For more information, see:

   Marques, Riedy, and Voemel, "Benefits of IEEE-754 Features in
   Modern Symmetric Tridiagonal Eigensolvers," SIAM Journal on
   Scientific Computing, v28, n5, 2006.  DOI 10.1137/050641624
   (Tech report version in LAWN 172 with the same title.)

Parameters:
  • N – [in]

    N is INTEGER

    The order of the matrix.

  • D – [in]

    D is REAL array, dimension (N)

    The N diagonal elements of the diagonal matrix D.

  • LLD – [in]

    LLD is REAL array, dimension (N-1)

    The (N-1) elements L(i)*L(i)*D(i).

  • SIGMA – [in]

    SIGMA is REAL

    Shift amount in T - sigma I = L D L^T.

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum pivot in the Sturm sequence. May be used when zero pivots are encountered on non-IEEE-754 architectures.

  • R – [in]

    R is INTEGER

    The twist index for the twisted factorization that is used for the negcount.

Returns:

INTEGER Return value of the function.

LAED0#

group laed0

Functions

template<typename T>
void laed0(integer *icompq, integer *qsiz, integer *n, T *d, T *e, T *q, integer *ldq, T *qstore, integer *ldqs, T *work, integer *iwork, integer *info)#

LAED0 used by sstedc. Computes all eigenvalues and corresponding

eigenvectors of an unreduced symmetric tridiagonal matrix using the

divide and conquer method.

Purpose:

 LAED0 computes all eigenvalues and corresponding eigenvectors of a
 symmetric tridiagonal matrix using the divide and conquer method.

Parameters:
  • ICOMPQ – [in]

    ICOMPQ is INTEGER

    = 0: Compute eigenvalues only.

    = 1: Compute eigenvectors of original dense symmetric matrix also. On entry, Q contains the orthogonal matrix used to reduce the original matrix to tridiagonal form.

    = 2: Compute eigenvalues and eigenvectors of tridiagonal matrix.

  • QSIZ – [in]

    QSIZ is INTEGER

    The dimension of the orthogonal matrix used to reduce the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.

  • N – [in]

    N is INTEGER

    The dimension of the symmetric tridiagonal matrix. N >= 0.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the main diagonal of the tridiagonal matrix. On exit, its eigenvalues.

  • E – [in]

    E is REAL array, dimension (N-1)

    The off-diagonal elements of the tridiagonal matrix. On exit, E has been destroyed.

  • Q – [inout]

    Q is REAL array, dimension (LDQ, N)

    On entry, Q must contain an N-by-N orthogonal matrix.

    If ICOMPQ = 0 Q is not referenced.

    If ICOMPQ = 1 On entry, Q is a subset of the columns of the orthogonal matrix used to reduce the full matrix to tridiagonal form corresponding to the subset of the full matrix which is being decomposed at this time.

    If ICOMPQ = 2 On entry, Q will be the identity matrix. On exit, Q contains the eigenvectors of the tridiagonal matrix.

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q. If eigenvectors are desired, then LDQ >= fla_max(1,N). In any case, LDQ >= 1.

  • QSTORE – [out]

    QSTORE is REAL array, dimension (LDQS, N)

    Referenced only when ICOMPQ = 1. Used to store parts of the eigenvector matrix when the updating matrix multiplies take place.

  • LDQS – [in]

    LDQS is INTEGER

    The leading dimension of the array QSTORE. If ICOMPQ = 1, then LDQS >= fla_max(1,N). In any case, LDQS >= 1.

  • WORK – [out]

    WORK is REAL array,

    If ICOMPQ = 0 or 1, the dimension of WORK must be at least 1 + 3*N + 2*N*lg N + 3*N**2

    (lg(N) = smallest integer k such that 2^k >= N)

    If ICOMPQ = 2, the dimension of WORK must be at least 4*N + N**2.

  • IWORK – [out]

    IWORK is INTEGER array,

    If ICOMPQ = 0 or 1, the dimension of IWORK must be at least 6 + 6*N + 5*N*lg N.

    (lg(N) = smallest integer k such that 2^k >= N)

    If ICOMPQ = 2, the dimension of IWORK must be at least 3 + 5*N.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

    > 0: The algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1).

template<typename T, typename Ta>
void laed0(integer *qsiz, integer *n, Ta *d, Ta *e, T *q, integer *ldq, T *qstore, integer *ldqs, Ta *rwork, integer *iwork, integer *info)#

LAED1#

group laed1

Functions

template<typename T>
void laed1(integer *n, T *d, T *q, integer *ldq, integer *indxq, T *rho, integer *cutpnt, T *work, integer *iwork, integer *info)#

LAED1 used by sstedc. Computes the updated eigensystem of a diagonal

matrix after modification by a rank-one symmetric matrix. Used when the

original matrix is tridiagonal.

Purpose:

 LAED1 computes the updated eigensystem of a diagonal
 matrix after modification by a rank-one symmetric matrix.  This
 routine is used only for the eigenproblem which requires all
 eigenvalues and eigenvectors of a tridiagonal matrix.  SLAED7 handles
 the case in which eigenvalues only or eigenvalues and eigenvectors
 of a full symmetric matrix (which was reduced to tridiagonal form)
 are desired.

   T = Q(in) (D(in) + RHO * Z*Z**T) Q**T(in) = Q(out) * D(out) * Q**T(out)

    where Z = Q**T*u, u is a vector of length N with ones in the
    CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.

    The eigenvectors of the original matrix are stored in Q, and the
    eigenvalues are in D.  The algorithm consists of three stages:

       The first stage consists of deflating the size of the problem
       when there are multiple eigenvalues or if there is a zero in
       the Z vector.  For each such occurrence the dimension of the
       secular equation problem is reduced by one.  This stage is
       performed by the routine SLAED2.

       The second stage consists of calculating the updated
       eigenvalues. This is done by finding the roots of the secular
       equation via the routine SLAED4 (as called by SLAED3).
       This routine also calculates the eigenvectors of the current
       problem.

       The final stage consists of computing the updated eigenvectors
       directly using the updated eigenvalues.  The eigenvectors for
       the current problem are multiplied with the eigenvectors from
       the overall problem.

Parameters:
  • N – [in]

    N is INTEGER

    The dimension of the symmetric tridiagonal matrix. N >= 0.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the eigenvalues of the rank-1-perturbed matrix. On exit, the eigenvalues of the repaired matrix.

  • Q – [inout]

    Q is REAL array, dimension (LDQ,N)

    On entry, the eigenvectors of the rank-1-perturbed matrix. On exit, the eigenvectors of the repaired tridiagonal matrix.

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q. LDQ >= fla_max(1,N).

  • INDXQ – [inout]

    INDXQ is INTEGER array, dimension (N)

    On entry, the permutation which separately sorts the two subproblems in D into ascending order.

    On exit, the permutation which will reintegrate the subproblems back into sorted order, i.e. D(INDXQ(I = 1, N)) will be in ascending order.

  • RHO – [in]

    RHO is REAL

    The subdiagonal entry used to create the rank-1 modification.

  • CUTPNT – [in]

    CUTPNT is INTEGER

    The location of the last eigenvalue in the leading sub-matrix. min(1,N) <= CUTPNT <= N/2.

  • WORK – [out] WORK is REAL array, dimension (4*N + N**2)

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

    > 0: if INFO = 1, an eigenvalue did not converge

LAED2#

group laed2

Functions

template<typename T>
void laed2(integer *k, integer *n, integer *n1, T *d, T *q, integer *ldq, integer *indxq, T *rho, T *z, T *dlamda, T *w, T *q2, integer *indx, integer *indxc, integer *indxp, integer *coltyp, integer *info)#

LAED2 used by sstedc. Merges eigenvalues and deflates secular equation.

Used when the original matrix is tridiagonal.

Purpose:

 LAED2 merges the two sets of eigenvalues together into a single
 sorted set.  Then it tries to deflate the size of the problem.
 There are two ways in which deflation can occur:  when two or more
 eigenvalues are close together or if there is a tiny entry in the
 Z vector.  For each such occurrence the order of the related secular
 equation problem is reduced by one.

Parameters:
  • K – [out]

    K is INTEGER

    The number of non-deflated eigenvalues, and the order of the related secular equation. 0 <= K <=N.

  • N – [in]

    N is INTEGER

    The dimension of the symmetric tridiagonal matrix. N >= 0.

  • N1 – [in]

    N1 is INTEGER

    The location of the last eigenvalue in the leading sub-matrix. min(1,N) <= N1 <= N/2.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, D contains the eigenvalues of the two submatrices to be combined.

    On exit, D contains the trailing (N-K) updated eigenvalues (those which were deflated) sorted into increasing order.

  • Q – [inout]

    Q is REAL array, dimension (LDQ, N)

    On entry, Q contains the eigenvectors of two submatrices in the two square blocks with corners at (1,1), (N1,N1) and (N1+1, N1+1), (N,N).

    On exit, Q contains the trailing (N-K) updated eigenvectors (those which were deflated) in its last N-K columns.

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q. LDQ >= fla_max(1,N).

  • INDXQ – [inout]

    INDXQ is INTEGER array, dimension (N)

    The permutation which separately sorts the two sub-problems in D into ascending order. Note that elements in the second half of this permutation must first have N1 added to their values. Destroyed on exit.

  • RHO – [inout]

    RHO is REAL

    On entry, the off-diagonal element associated with the rank-1 cut which originally split the two submatrices which are now being recombined.

    On exit, RHO has been modified to the value required by SLAED3.

  • Z – [in]

    Z is REAL array, dimension (N)

    On entry, Z contains the updating vector (the last row of the first sub-eigenvector matrix and the first row of the second sub-eigenvector matrix).

    On exit, the contents of Z have been destroyed by the updating process.

  • DLAMDA – [out]

    DLAMDA is REAL array, dimension (N)

    A copy of the first K eigenvalues which will be used by SLAED3 to form the secular equation.

  • W – [out]

    W is REAL array, dimension (N)

    The first k values of the final deflation-altered z-vector which will be passed to SLAED3.

  • Q2 – [out]

    Q2 is REAL array, dimension (N1**2+(N-N1)**2)

    A copy of the first K eigenvectors which will be used by SLAED3 in a matrix multiply (SGEMM) to solve for the new eigenvectors.

  • INDX – [out]

    INDX is INTEGER array, dimension (N)

    The permutation used to sort the contents of DLAMDA into ascending order.

  • INDXC – [out]

    INDXC is INTEGER array, dimension (N)

    The permutation used to arrange the columns of the deflated Q matrix into three groups: the first group contains non-zero elements only at and above N1, the second contains non-zero elements only below N1, and the third is dense.

  • INDXP – [out]

    INDXP is INTEGER array, dimension (N)

    The permutation used to place deflated values of D at the end of the array. INDXP(1:K) points to the nondeflated D-values and INDXP(K+1:N) points to the deflated eigenvalues.

  • COLTYP – [out]

    COLTYP is INTEGER array, dimension (N)

    During execution, a label which will indicate which of the following types a column in the Q2 matrix is:

    1 : non-zero in the upper half only;

    2 : dense;

    3 : non-zero in the lower half only;

    4 : deflated.

    On exit, COLTYP(i) is the number of columns of type i, for i=1 to 4 only.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

LAED3#

group laed3

Functions

template<typename T>
void laed3(integer *k, integer *n, integer *n1, T *d, T *q, integer *ldq, T *rho, T *dlamda, T *q2, integer *indx, integer *ctot, T *w, T *s, integer *info)#

LAED3 used by sstedc. Finds the roots of the secular equation and

updates the eigenvectors. Used when the original matrix is tridiagonal.

Purpose:

 LAED3 finds the roots of the secular equation, as defined by the
 values in D, W, and RHO, between 1 and K.  It makes the
 appropriate calls to SLAED4 and then updates the eigenvectors by
 multiplying the matrix of eigenvectors of the pair of eigensystems
 being combined by the matrix of eigenvectors of the K-by-K system
 which is solved here.

 This code makes very mild assumptions about floating point
 arithmetic. It will work on machines with a guard digit in
 add/subtract, or on those binary machines without guard digits
 which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
 It could conceivably fail on hexadecimal or decimal machines
 without guard digits, but we know of none.

Parameters:
  • K – [in]

    K is INTEGER

    The number of terms in the rational function to be solved by SLAED4. K >= 0.

  • N – [in]

    N is INTEGER

    The number of rows and columns in the Q matrix. N >= K (deflation may result in N>K).

  • N1 – [in]

    N1 is INTEGER

    The location of the last eigenvalue in the leading submatrix. min(1,N) <= N1 <= N/2.

  • D – [out]

    D is REAL array, dimension (N)

    D(I) contains the updated eigenvalues for 1 <= I <= K.

  • Q – [out]

    Q is REAL array, dimension (LDQ,N)

    Initially the first K columns are used as workspace. On output the columns 1 to K contain the updated eigenvectors.

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q. LDQ >= fla_max(1,N).

  • RHO – [in]

    RHO is REAL

    The value of the parameter in the rank one update equation. RHO >= 0 required.

  • DLAMDA – [inout]

    DLAMDA is REAL array, dimension (K)

    The first K elements of this array contain the old roots of the deflated updating problem. These are the poles of the secular equation. May be changed on output by having lowest order bit set to zero on Cray X-MP, Cray Y-MP, Cray-2, or Cray C-90, as described above.

  • Q2 – [in]

    Q2 is REAL array, dimension (LDQ2*N)

    The first K columns of this matrix contain the non-deflated eigenvectors for the split problem.

  • INDX – [in]

    INDX is INTEGER array, dimension (N)

    The permutation used to arrange the columns of the deflated Q matrix into three groups (see SLAED2). The rows of the eigenvectors found by SLAED4 must be likewise permuted before the matrix multiply can take place.

  • CTOT – [in]

    CTOT is INTEGER array, dimension (4)

    A count of the total number of the various types of columns in Q, as described in INDX. The fourth column type is any column which has been deflated.

  • W – [inout]

    W is REAL array, dimension (K)

    The first K elements of this array contain the components of the deflation-adjusted updating vector. Destroyed on output.

  • S – [out]

    S is REAL array, dimension (N1 + 1)*K

    Will contain the eigenvectors of the repaired matrix which will be multiplied by the previously accumulated eigenvectors to update the system.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

    > 0: if INFO = 1, an eigenvalue did not converge

LAED4#

group laed4

Functions

template<typename T>
void laed4(integer *n, integer *i, T *d, T *z, T *delta, T *rho, T *dlam, integer *info)#

LAED4 used by sstedc. Finds a single root of the secular equation.

Purpose:

 This subroutine computes the I-th updated eigenvalue of a symmetric
 rank-one modification to a diagonal matrix whose elements are
 given in the array d, and that

            D(i) < D(j)  for  i < j

 and that RHO > 0.  This is arranged by the calling routine, and is
 no loss in generality.  The rank-one modified system is thus

            diag(D)  +  RHO * Z * Z_transpose.

 where we assume the Euclidean norm of Z is 1.

 The method consists of approximating the rational functions in the
 secular equation by simpler interpolating rational functions.

Parameters:
  • N – [in]

    N is INTEGER

    The length of all arrays.

  • I – [in]

    I is INTEGER

    The index of the eigenvalue to be computed. 1 <= I <= N.

  • D – [in]

    D is REAL array, dimension (N)

    The original eigenvalues. It is assumed that they are in order, D(I) < D(J) for I < J.

  • Z – [in]

    Z is REAL array, dimension (N)

    The components of the updating vector.

  • DELTA – [out]

    DELTA is REAL array, dimension (N)

    If N > 2, DELTA contains (D(j) - lambda_I) in its j-th component. If N = 1, then DELTA(1) = 1. If N = 2, see SLAED5 for detail. The vector DELTA contains the information necessary to construct the eigenvectors by SLAED3 and SLAED9.

  • RHO – [in]

    RHO is REAL

    The scalar in the symmetric updating formula.

  • DLAM – [out]

    DLAM is REAL

    The computed lambda_I, the I-th updated eigenvalue.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

    > 0: if INFO = 1, the updating process failed.

LAED5#

group laed5

Functions

template<typename T>
void laed5(integer *i, T *d, T *z, T *delta, T *rho, T *dlam)#

LAED5 used by sstedc. Solves the 2-by-2 secular equation.

Purpose:

 This subroutine computes the I-th eigenvalue of a symmetric rank-one
 modification of a 2-by-2 diagonal matrix

            diag(D)  +  RHO * Z * transpose(Z) .

 The diagonal elements in the array D are assumed to satisfy

            D(i) < D(j)  for  i < j .

 We also assume RHO > 0 and that the Euclidean norm of the vector
 Z is one.

Parameters:
  • I – [in]

    I is INTEGER

    The index of the eigenvalue to be computed. I = 1 or I = 2.

  • D – [in]

    D is REAL array, dimension (2)

    The original eigenvalues. We assume D(1) < D(2).

  • Z – [in]

    Z is REAL array, dimension (2)

    The components of the updating vector.

  • DELTA – [out]

    DELTA is REAL array, dimension (2)

    The vector DELTA contains the information necessary to construct the eigenvectors.

  • RHO – [in]

    RHO is REAL

    The scalar in the symmetric updating formula.

  • DLAM – [out]

    DLAM is REAL

    The computed lambda_I, the I-th updated eigenvalue.

LAED6#

group laed6

Functions

template<typename T>
void laed6(integer *kniter, logical *orgati, T *rho, T *d, T *z, T *finit, T *tau, integer *info)#

LAED6 used by sstedc. Computes one Newton step in solution of the secular equation.

Purpose:

   LAED6 computes the positive or negative root (closest to the origin)
   of
                    z(1)        z(2)        z(3)
   f(x) =   rho + --------- + ---------- + ---------
                   d(1)-x      d(2)-x      d(3)-x

   It is assumed that

         if ORGATI = .true. the root is between d(2) and d(3);
         otherwise it is between d(1) and d(2)

   This routine will be called by SLAED4 when necessary. In most cases,
   the root sought is the smallest in magnitude, though it might not be
   in some extremely rare situations.

Parameters:
  • KNITER – [in]

    KNITER is INTEGER

    Refer to SLAED4 for its significance.

  • ORGATI – [in]

    ORGATI is LOGICAL

    If ORGATI is true, the needed root is between d(2) and d(3); otherwise it is between d(1) and d(2). See SLAED4 for further details.

  • RHO – [in]

    RHO is REAL

    Refer to the equation f(x) above.

  • D – [in]

    D is REAL array, dimension (3)

    D satisfies d(1) < d(2) < d(3).

  • Z – [in]

    Z is REAL array, dimension (3)

    Each of the elements in z must be positive.

  • FINIT – [in]

    FINIT is REAL

    The value of f at 0. It is more accurate than the one evaluated inside this routine (if someone wants to do so).

  • TAU – [out]

    TAU is REAL

    The root of the equation f(x).

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

    > 0: if INFO = 1, failure to converge

LAED7#

group laed7

Functions

template<typename T>
void laed7(integer *icompq, integer *n, integer *qsiz, integer *tlvls, integer *curlvl, integer *curpbm, T *d, T *q, integer *ldq, integer *indxq, T *rho, integer *cutpnt, T *qstore, integer *qptr, integer *prmptr, integer *perm, integer *givptr, integer *givcol, T *givnum, T *work, integer *iwork, integer *info)#

LAED7 used by sstedc. Computes the updated eigensystem of a diagonal

matrix after modification by a rank-one symmetric matrix. Used when the

original matrix is dense.

Purpose:

 LAED7 computes the updated eigensystem of a diagonal
 matrix after modification by a rank-one symmetric matrix. This
 routine is used only for the eigenproblem which requires all
 eigenvalues and optionally eigenvectors of a dense symmetric matrix
 that has been reduced to tridiagonal form.  SLAED1 handles
 the case in which all eigenvalues and eigenvectors of a symmetric
 tridiagonal matrix are desired.

   T = Q(in) (D(in) + RHO * Z*Z**T) Q**T(in) = Q(out) * D(out) * Q**T(out)

    where Z = Q**Tu, u is a vector of length N with ones in the
    CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.

    The eigenvectors of the original matrix are stored in Q, and the
    eigenvalues are in D.  The algorithm consists of three stages:

       The first stage consists of deflating the size of the problem
       when there are multiple eigenvalues or if there is a zero in
       the Z vector.  For each such occurrence the dimension of the
       secular equation problem is reduced by one.  This stage is
       performed by the routine SLAED8.

       The second stage consists of calculating the updated
       eigenvalues. This is done by finding the roots of the secular
       equation via the routine SLAED4 (as called by SLAED9).
       This routine also calculates the eigenvectors of the current
       problem.

       The final stage consists of computing the updated eigenvectors
       directly using the updated eigenvalues.  The eigenvectors for
       the current problem are multiplied with the eigenvectors from
       the overall problem.

Parameters:
  • ICOMPQ – [in]

    ICOMPQ is INTEGER

    = 0: Compute eigenvalues only.

    = 1: Compute eigenvectors of original dense symmetric matrix also. On entry, Q contains the orthogonal matrix used to reduce the original matrix to tridiagonal form.

  • N – [in]

    N is INTEGER

    The dimension of the symmetric tridiagonal matrix. N >= 0.

  • QSIZ – [in]

    QSIZ is INTEGER

    The dimension of the orthogonal matrix used to reduce the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.

  • TLVLS – [in]

    TLVLS is INTEGER

    The total number of merging levels in the overall divide and conquer tree.

  • CURLVL – [in]

    CURLVL is INTEGER

    The current level in the overall merge routine, 0 <= CURLVL <= TLVLS.

  • CURPBM – [in]

    CURPBM is INTEGER

    The current problem in the current level in the overall merge routine (counting from upper left to lower right).

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the eigenvalues of the rank-1-perturbed matrix. On exit, the eigenvalues of the repaired matrix.

  • Q – [inout]

    Q is REAL array, dimension (LDQ, N)

    On entry, the eigenvectors of the rank-1-perturbed matrix. On exit, the eigenvectors of the repaired tridiagonal matrix.

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q. LDQ >= fla_max(1,N).

  • INDXQ – [out]

    INDXQ is INTEGER array, dimension (N)

    The permutation which will reintegrate the subproblem just solved back into sorted order, i.e., D(INDXQ(I = 1, N)) will be in ascending order.

  • RHO – [in]

    RHO is REAL

    The subdiagonal element used to create the rank-1 modification.

  • CUTPNT – [in]

    CUTPNT is INTEGER

    Contains the location of the last eigenvalue in the leading sub-matrix. min(1,N) <= CUTPNT <= N.

  • QSTORE – [inout]

    QSTORE is REAL array, dimension (N**2+1)

    Stores eigenvectors of submatrices encountered during divide and conquer, packed together. QPTR points to beginning of the submatrices.

  • QPTR – [inout]

    QPTR is INTEGER array, dimension (N+2)

    List of indices pointing to beginning of submatrices stored in QSTORE. The submatrices are numbered starting at the bottom left of the divide and conquer tree, from left to right and bottom to top.

  • PRMPTR – [in]

    PRMPTR is INTEGER array, dimension (N lg N)

    Contains a list of pointers which indicate where in PERM a level’s permutation is stored. PRMPTR(i+1) - PRMPTR(i) indicates the size of the permutation and also the size of the full, non-deflated problem.

  • PERM – [in]

    PERM is INTEGER array, dimension (N lg N)

    Contains the permutations (from deflation and sorting) to be applied to each eigenblock.

  • GIVPTR – [in]

    GIVPTR is INTEGER array, dimension (N lg N)

    Contains a list of pointers which indicate where in GIVCOL a level’s Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i) indicates the number of Givens rotations.

  • GIVCOL – [in]

    GIVCOL is INTEGER array, dimension (2, N lg N)

    Each pair of numbers indicates a pair of columns to take place in a Givens rotation.

  • GIVNUM – [in]

    GIVNUM is REAL array, dimension (2, N lg N)

    Each number indicates the S value to be used in the corresponding Givens rotation.

  • WORK – [out] WORK is REAL array, dimension (3*N+2*QSIZ*N)

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

    > 0: if INFO = 1, an eigenvalue did not converge

template<typename T, typename Ta>
void laed7(integer *n, integer *cutpnt, integer *qsiz, integer *tlvls, integer *curlvl, integer *curpbm, Ta *d, T *q, integer *ldq, Ta *rho, integer *indxq, Ta *qstore, integer *qptr, integer *prmptr, integer *perm, integer *givptr, integer *givcol, Ta *givnum, T *work, Ta *rwork, integer *iwork, integer *info)#

LAED8#

group laed8

Functions

template<typename T>
void laed8(integer *icompq, integer *k, integer *n, integer *qsiz, T *d, T *q, integer *ldq, integer *indxq, T *rho, integer *cutpnt, T *z, T *dlamda, T *q2, integer *ldq2, T *w, integer *perm, integer *givptr, integer *givcol, T *givnum, integer *indxp, integer *indx, integer *info)#

LAED8 used by sstedc. Merges eigenvalues and deflates secular

equation. Used when the original matrix is dense.

Purpose:

 LAED8 merges the two sets of eigenvalues together into a single
 sorted set.  Then it tries to deflate the size of the problem.
 There are two ways in which deflation can occur:  when two or more
 eigenvalues are close together or if there is a tiny element in the
 Z vector.  For each such occurrence the order of the related secular
 equation problem is reduced by one.

Parameters:
  • ICOMPQ – [in]

    ICOMPQ is INTEGER

    = 0: Compute eigenvalues only.

    = 1: Compute eigenvectors of original dense symmetric matrix also. On entry, Q contains the orthogonal matrix used to reduce the original matrix to tridiagonal form.

  • K – [out]

    K is INTEGER

    The number of non-deflated eigenvalues, and the order of the related secular equation.

  • N – [in]

    N is INTEGER

    The dimension of the symmetric tridiagonal matrix. N >= 0.

  • QSIZ – [in]

    QSIZ is INTEGER

    The dimension of the orthogonal matrix used to reduce the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the eigenvalues of the two submatrices to be combined. On exit, the trailing (N-K) updated eigenvalues (those which were deflated) sorted into increasing order.

  • Q – [inout]

    Q is REAL array, dimension (LDQ,N)

    If ICOMPQ = 0, Q is not referenced. Otherwise, on entry, Q contains the eigenvectors of the partially solved system which has been previously updated in matrix multiplies with other partially solved eigensystems. On exit, Q contains the trailing (N-K) updated eigenvectors (those which were deflated) in its last N-K columns.

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q. LDQ >= fla_max(1,N).

  • INDXQ – [in]

    INDXQ is INTEGER array, dimension (N)

    The permutation which separately sorts the two sub-problems in D into ascending order. Note that elements in the second half of this permutation must first have CUTPNT added to their values in order to be accurate.

  • RHO – [inout]

    RHO is REAL

    On entry, the off-diagonal element associated with the rank-1 cut which originally split the two submatrices which are now being recombined.

    On exit, RHO has been modified to the value required by SLAED3.

  • CUTPNT – [in]

    CUTPNT is INTEGER

    The location of the last eigenvalue in the leading sub-matrix. min(1,N) <= CUTPNT <= N.

  • Z – [in]

    Z is REAL array, dimension (N)

    On entry, Z contains the updating vector (the last row of the first sub-eigenvector matrix and the first row of the second sub-eigenvector matrix).

    On exit, the contents of Z are destroyed by the updating process.

  • DLAMDA – [out]

    DLAMDA is REAL array, dimension (N)

    A copy of the first K eigenvalues which will be used by SLAED3 to form the secular equation.

  • Q2 – [out]

    Q2 is REAL array, dimension (LDQ2,N)

    If ICOMPQ = 0, Q2 is not referenced. Otherwise, a copy of the first K eigenvectors which will be used by SLAED7 in a matrix multiply (SGEMM) to update the new eigenvectors.

  • LDQ2 – [in]

    LDQ2 is INTEGER

    The leading dimension of the array Q2. LDQ2 >= fla_max(1,N).

  • W – [out]

    W is REAL array, dimension (N)

    The first k values of the final deflation-altered z-vector and will be passed to SLAED3.

  • PERM – [out]

    PERM is INTEGER array, dimension (N)

    The permutations (from deflation and sorting) to be applied to each eigenblock.

  • GIVPTR – [out]

    GIVPTR is INTEGER

    The number of Givens rotations which took place in this subproblem.

  • GIVCOL – [out]

    GIVCOL is INTEGER array, dimension (2, N)

    Each pair of numbers indicates a pair of columns to take place in a Givens rotation.

  • GIVNUM – [out]

    GIVNUM is REAL array, dimension (2, N)

    Each number indicates the S value to be used in the corresponding Givens rotation.

  • INDXP – [out]

    INDXP is INTEGER array, dimension (N)

    The permutation used to place deflated values of D at the end of the array. INDXP(1:K) points to the nondeflated D-values and INDXP(K+1:N) points to the deflated eigenvalues.

  • INDX – [out]

    INDX is INTEGER array, dimension (N)

    The permutation used to sort the contents of D into ascending order.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

template<typename T, typename Ta>
void laed8(integer *k, integer *n, integer *qsiz, T *q, integer *ldq, Ta *d, Ta *rho, integer *cutpnt, Ta *z, Ta *dlamda, T *q2, integer *ldq2, Ta *w, integer *indxp, integer *indx, integer *indxq, integer *perm, integer *givptr, integer *givcol, Ta *givnum, integer *info)#

LAED9#

group laed9

Functions

template<typename T>
void laed9(integer *k, integer *kstart, integer *kstop, integer *n, T *d, T *q, integer *ldq, T *rho, T *dlamda, T *w, T *s, integer *lds, integer *info)#

LAED9 used by sstedc. Finds the roots of the secular equation and

updates the eigenvectors. Used when the original matrix is dense.

Purpose:

 LAED9 finds the roots of the secular equation, as defined by the
 values in D, Z, and RHO, between KSTART and KSTOP.  It makes the
 appropriate calls to SLAED4 and then stores the new matrix of
 eigenvectors for use in calculating the next level of Z vectors.

Parameters:
  • K – [in]

    K is INTEGER

    The number of terms in the rational function to be solved by SLAED4. K >= 0.

  • KSTART – [in] KSTART is INTEGER

  • KSTOP – [in]

    KSTOP is INTEGER

    The updated eigenvalues Lambda(I), KSTART <= I <= KSTOP are to be computed. 1 <= KSTART <= KSTOP <= K.

  • N – [in]

    N is INTEGER

    The number of rows and columns in the Q matrix. N >= K (delation may result in N > K).

  • D – [out]

    D is REAL array, dimension (N)

    D(I) contains the updated eigenvalues

    for KSTART <= I <= KSTOP.

  • Q – [out] Q is REAL array, dimension (LDQ,N)

  • LDQ – [in]

    LDQ is INTEGER

    The leading dimension of the array Q. LDQ >= fla_max(1, N).

  • RHO – [in]

    RHO is REAL

    The value of the parameter in the rank one update equation. RHO >= 0 required.

  • DLAMDA – [in]

    DLAMDA is REAL array, dimension (K)

    The first K elements of this array contain the old roots of the deflated updating problem. These are the poles of the secular equation.

  • W – [in]

    W is REAL array, dimension (K)

    The first K elements of this array contain the components of the deflation-adjusted updating vector.

  • S – [out]

    S is REAL array, dimension (LDS, K)

    Will contain the eigenvectors of the repaired matrix which will be stored for subsequent Z vector calculation and multiplied by the previously accumulated eigenvectors to update the system.

  • LDS – [in]

    LDS is INTEGER

    The leading dimension of S. LDS >= fla_max(1, K).

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

    > 0: if INFO = 1, an eigenvalue did not converge

LAEDA#

group laeda

Functions

template<typename T>
void laeda(integer *n, integer *tlvls, integer *curlvl, integer *curpbm, integer *prmptr, integer *perm, integer *givptr, integer *givcol, float *givnum, float *q, integer *qptr, float *z, float *ztemp, integer *info)#

LAEDA used by sstedc. Computes the Z vector determining the rank-one

modification of the diagonal matrix. Used when the original matrix is dense.

Purpose:

 LAEDA computes the Z vector corresponding to the merge step in the
 CURLVLth step of the merge process with TLVLS steps for the CURPBMth
 problem.

Parameters:
  • N – [in]

    N is INTEGER

    The dimension of the symmetric tridiagonal matrix. N >= 0.

  • TLVLS – [in]

    TLVLS is INTEGER

    The total number of merging levels in the overall divide and conquer tree.

  • CURLVL – [in]

    CURLVL is INTEGER

    The current level in the overall merge routine, 0 <= curlvl <= tlvls.

  • CURPBM – [in]

    CURPBM is INTEGER

    The current problem in the current level in the overall merge routine (counting from upper left to lower right).

  • PRMPTR – [in]

    PRMPTR is INTEGER array, dimension (N lg N)

    Contains a list of pointers which indicate where in PERM a level’s permutation is stored. PRMPTR(i+1) - PRMPTR(i) indicates the size of the permutation and incidentally the size of the full, non-deflated problem.

  • PERM – [in]

    PERM is INTEGER array, dimension (N lg N)

    Contains the permutations (from deflation and sorting) to be applied to each eigenblock.

  • GIVPTR – [in]

    GIVPTR is INTEGER array, dimension (N lg N)

    Contains a list of pointers which indicate where in GIVCOL a level’s Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i) indicates the number of Givens rotations.

  • GIVCOL – [in]

    GIVCOL is INTEGER array, dimension (2, N lg N)

    Each pair of numbers indicates a pair of columns to take place in a Givens rotation.

  • GIVNUM – [in]

    GIVNUM is REAL array, dimension (2, N lg N)

    Each number indicates the S value to be used in the corresponding Givens rotation.

  • Q – [in]

    Q is REAL array, dimension (N**2)

    Contains the square eigenblocks from previous levels, the starting positions for blocks are given by QPTR.

  • QPTR – [in]

    QPTR is INTEGER array, dimension (N+2)

    Contains a list of pointers which indicate where in Q an eigenblock is stored. SQRT(QPTR(i+1) - QPTR(i)) indicates the size of the block.

  • Z – [out]

    Z is REAL array, dimension (N)

    On output this vector contains the updating vector (the last row of the first sub-eigenvector matrix and the first row of the second sub-eigenvector matrix).

  • ZTEMP – [out] ZTEMP is REAL array, dimension (N)

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit.

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

LARRA#

group larra

Functions

template<typename T>
void larra(integer *n, T *d, T *e, T *e2, T *spltol, T *tnrm, integer *nsplit, integer *isplit, integer *info)#

LARRA computes the splitting points with the specified threshold.

Purpose:

 Compute the splitting points with threshold SPLTOL.
 LARRA sets any "small" off-diagonal elements to zero.

Parameters:
  • N – [in]

    N is INTEGER

    The order of the matrix. N > 0.

  • D – [in]

    D is REAL array, dimension (N)

    On entry, the N diagonal elements of the tridiagonal matrix T.

  • E – [inout]

    E is REAL array, dimension (N)

    On entry, the first (N-1) entries contain the subdiagonal elements of the tridiagonal matrix T; E(N) need not be set. On exit, the entries E(ISPLIT(I)), 1 <= I <= NSPLIT, are set to zero, the other entries of E are untouched.

  • E2 – [inout]

    E2 is REAL array, dimension (N)

    On entry, the first (N-1) entries contain the SQUARES of the subdiagonal elements of the tridiagonal matrix T; E2(N) need not be set.

    On exit, the entries E2(ISPLIT(I)), 1 <= I <= NSPLIT, have been set to zero

  • SPLTOL – [in]

    SPLTOL is REAL

    The threshold for splitting. Two criteria can be used: SPLTOL<0 : criterion based on absolute off-diagonal value SPLTOL>0 : criterion that preserves relative accuracy

  • TNRM – [in]

    TNRM is REAL

    The norm of the matrix.

  • NSPLIT – [out]

    NSPLIT is INTEGER

    The number of blocks T splits into. 1 <= NSPLIT <= N.

  • ISPLIT – [out]

    ISPLIT is INTEGER array, dimension (N)

    The splitting points, at which T breaks up into blocks. The first block consists of rows/columns 1 to ISPLIT(1), the second of rows/columns ISPLIT(1)+1 through ISPLIT(2), etc., and the NSPLIT-th consists of rows/columns ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

LARRB#

group larrb

Functions

template<typename T>
void larrb(integer *n, T *d, T *lld, integer *ifirst, integer *ilast, T *rtol1, T *rtol2, integer *offset, T *w, T *wgap, T *werr, T *work, integer *iwork, T *pivmin, T *spdiam, integer *twist, integer *info)#

LARRB provides limited bisection to locate eigenvalues for more accuracy.

Purpose:

 Given the relatively robust representation(RRR) L D L^T, SLARRB
 does "limited" bisection to refine the eigenvalues of L D L^T,
 W(IFIRST-OFFSET) through W(ILAST-OFFSET), to more accuracy. Initial
 guesses for these eigenvalues are input in W, the corresponding estimate
 of the error in these guesses and their gaps are input in WERR
 and WGAP, respectively. During bisection, intervals
 [left, right] are maintained by storing their mid-points and
 semi-widths in the arrays W and WERR respectively.

Parameters:
  • N – [in]

    N is INTEGER

    The order of the matrix.

  • D – [in]

    D is REAL array, dimension (N)

    The N diagonal elements of the diagonal matrix D.

  • LLD – [in]

    LLD is REAL array, dimension (N-1)

    The (N-1) elements L(i)*L(i)*D(i).

  • IFIRST – [in]

    IFIRST is INTEGER

    The index of the first eigenvalue to be computed.

  • ILAST – [in]

    ILAST is INTEGER

    The index of the last eigenvalue to be computed.

  • RTOL1 – [in] RTOL1 is REAL

  • RTOL2 – [in]

    RTOL2 is REAL

    Tolerance for the convergence of the bisection intervals. An interval [LEFT,RIGHT] has converged if RIGHT-LEFT < MAX(RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|)) where GAP is the (estimated) distance to the nearest eigenvalue.

  • OFFSET – [in]

    OFFSET is INTEGER

    Offset for the arrays W, WGAP and WERR, i.e., the IFIRST-OFFSET through ILAST-OFFSET elements of these arrays are to be used.

  • W – [inout]

    W is REAL array, dimension (N)

    On input, W(IFIRST-OFFSET) through W(ILAST-OFFSET) are estimates of the eigenvalues of L D L^T indexed IFIRST through ILAST.

    On output, these estimates are refined.

  • WGAP – [inout]

    WGAP is REAL array, dimension (N-1)

    On input, the (estimated) gaps between consecutive eigenvalues of L D L^T, i.e., WGAP(I-OFFSET) is the gap between eigenvalues I and I+1. Note that if IFIRST = ILAST then WGAP(IFIRST-OFFSET) must be set to ZERO.

    On output, these gaps are refined.

  • WERR – [inout]

    WERR is REAL array, dimension (N)

    On input, WERR(IFIRST-OFFSET) through WERR(ILAST-OFFSET) are the errors in the estimates of the corresponding elements in W. On output, these errors are refined.

  • WORK – [out]

    WORK is REAL array, dimension (2*N)

    Workspace.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (2*N)

    Workspace.

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum pivot in the Sturm sequence.

  • SPDIAM – [in]

    SPDIAM is REAL

    The spectral diameter of the matrix.

  • TWIST – [in]

    TWIST is INTEGER

    The twist index for the twisted factorization that is used for the negcount.

    TWIST = N: Compute negcount from L D L^T - LAMBDA I = L+ D+ L+^T

    TWIST = 1: Compute negcount from L D L^T - LAMBDA I = U- D- U-^T

    TWIST = R: Compute negcount from L D L^T - LAMBDA I = N(r) D(r) N(r)

  • INFO – [out]

    INFO is INTEGER

    Error flag.

LARRC#

group larrc

Functions

template<typename T>
void larrc(char *jobt, integer *n, T *vl, T *vu, T *d, T *e, T *pivmin, integer *eigcnt, integer *lcnt, integer *rcnt, integer *info)#

LARRC computes the number of eigenvalues of the symmetric tridiagonal matrix.

Purpose:

 Find the number of eigenvalues of the symmetric tridiagonal matrix T
 that are in the interval (VL,VU] if JOBT = 'T', and of L D L^T
 if JOBT = 'L'.

Parameters:
  • JOBT – [in]

    JOBT is CHARACTER*1

    = ‘T’: Compute Sturm count for matrix T.

    = ‘L’: Compute Sturm count for matrix L D L^T.

  • N – [in]

    N is INTEGER

    The order of the matrix. N > 0.

  • VL – [in]

    VL is REAL

    The lower bound for the eigenvalues.

  • VU – [in]

    VU is REAL

    The upper bound for the eigenvalues.

  • D – [in]

    D is REAL array, dimension (N)

    JOBT = ‘T’: The N diagonal elements of the tridiagonal matrix T.

    JOBT = ‘L’: The N diagonal elements of the diagonal matrix D.

  • E – [in]

    E is REAL array, dimension (N)

    JOBT = ‘T’: The N-1 offdiagonal elements of the matrix T.

    JOBT = ‘L’: The N-1 offdiagonal elements of the matrix L.

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum pivot in the Sturm sequence for T.

  • EIGCNT – [out]

    EIGCNT is INTEGER

    The number of eigenvalues of the symmetric tridiagonal matrix T that are in the interval (VL,VU]

  • LCNT – [out] LCNT is INTEGER

  • RCNT – [out]

    RCNT is INTEGER

    The left and right negcounts of the interval.

  • INFO – [out] INFO is INTEGER

LARRD#

group larrd

Functions

template<typename T>
void larrd(char *range, char *order, integer *n, T *vl, T *vu, integer *il, integer *iu, T *gers, T *reltol, T *d, T *e, T *e2, T *pivmin, integer *nsplit, integer *isplit, integer *m, T *w, T *werr, T *wl, T *wu, integer *iblock, integer *indexw, T *work, integer *iwork, integer *info)#

LARRD computes the eigenvalues of a symmetric tridiagonal matrix to suitable accuracy.

Purpose:

   LARRD computes the eigenvalues of a symmetric tridiagonal
   matrix T to suitable accuracy. This is an auxiliary code to be
   called from SSTEMR.
   The user may ask for all eigenvalues, all eigenvalues
   in the half-open interval (VL, VU], or the IL-th through IU-th
   eigenvalues.

   To avoid overflow, the matrix must be scaled so that its
   largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and
for greatest accuracy, it should not be much smaller than that.

   See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
   Matrix", Report CS41, Computer Science Dept., Stanford
   University, July 21, 1966.

Parameters:
  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: (“All”) all eigenvalues will be found.

    = ‘V’: (“Value”) all eigenvalues in the half-open interval (VL, VU] will be found.

    = ‘I’: (“Index”) the IL-th through IU-th eigenvalues (of the entire matrix) will be found.

  • ORDER – [in]

    ORDER is CHARACTER*1

    = ‘B’: (“By Block”) the eigenvalues will be grouped by split-off block (see IBLOCK, ISPLIT) and ordered from smallest to largest within the block.

    = ‘E’: (“Entire matrix”)

    the eigenvalues for the entire matrix will be ordered from smallest to largest.

  • N – [in]

    N is INTEGER

    The order of the tridiagonal matrix T. N >= 0.

  • VL – [in]

    VL is REAL

    If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. Eigenvalues less than or equal to VL, or greater than VU, will not be returned. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • VU – [in]

    VU is REAL

    If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. Eigenvalues less than or equal to VL, or greater than VU, will not be returned. VL < VU.

    Not referenced if RANGE = ‘A’ or ‘I’.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.

    Not referenced if RANGE = ‘A’ or ‘V’.

  • GERS – [in]

    GERS is REAL array, dimension (2*N)

    The N Gerschgorin intervals (the i-th Gerschgorin interval is (GERS(2*i-1), GERS(2*i)).

  • RELTOL – [in]

    RELTOL is REAL

    The minimum relative width of an interval. When an interval is narrower than RELTOL times the larger (in magnitude) endpoint, then it is considered to be sufficiently small, i.e., converged. Note: this should always be at least radix*machine epsilon.

  • 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) off-diagonal elements of the tridiagonal matrix T.

  • E2 – [in]

    E2 is REAL array, dimension (N-1)

    The (n-1) squared off-diagonal elements of the tridiagonal matrix T.

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum pivot allowed in the Sturm sequence for T.

  • NSPLIT – [in]

    NSPLIT is INTEGER

    The number of diagonal blocks in the matrix T. 1 <= NSPLIT <= N.

  • 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., and the NSPLIT-th consists of rows/columns ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.

    (Only the first NSPLIT elements will actually be used, but since the user cannot know a priori what value NSPLIT will have, N words must be reserved for ISPLIT.)

  • M – [out]

    M is INTEGER

    The actual number of eigenvalues found. 0 <= M <= N. (See also the description of INFO=2,3.)

  • W – [out]

    W is REAL array, dimension (N)

    On exit, the first M elements of W will contain the eigenvalue approximations. SLARRD computes an interval I_j = (a_j, b_j] that includes eigenvalue j. The eigenvalue approximation is given as the interval midpoint W(j)= (a_j + b_j)/2. The corresponding error is bounded by WERR(j) = abs(a_j - b_j)/2

  • WERR – [out]

    WERR is REAL array, dimension (N)

    The error bound on the corresponding eigenvalue approximation in W.

  • WL – [out] WL is REAL

  • WU – [out]

    WU is REAL

    The interval (WL, WU] contains all the wanted eigenvalues.

    If RANGE=’V’, then WL=VL and WU=VU.

    If RANGE=’A’, then WL and WU are the global Gerschgorin bounds on the spectrum.

    If RANGE=’I’, then WL and WU are computed by SLAEBZ from the index range specified.

  • IBLOCK – [out]

    IBLOCK is INTEGER array, dimension (N)

    At each row/column j where E(j) is zero or small, the matrix T is considered to split into a block diagonal matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which block (from 1 to the number of blocks) the eigenvalue W(i) belongs. (SLARRD may use the remaining N-M elements as workspace.)

  • INDEXW – [out]

    INDEXW is INTEGER array, dimension (N)

    The indices of the eigenvalues within each block (submatrix); for example, INDEXW(i)= j and IBLOCK(i)=k imply that the i-th eigenvalue W(i) is the j-th eigenvalue in block k.

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

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

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

    > 0: some or all of the eigenvalues failed to converge or were not computed:

    =1 or 3: Bisection failed to converge for some eigenvalues; these eigenvalues are flagged by a negative block number. The effect is that the eigenvalues may not be as accurate as the absolute and relative tolerances. This is generally caused by unexpectedly inaccurate arithmetic.

    =2 or 3: RANGE=’I’ only: Not all of the eigenvalues IL:IU were found.

    Effect: M < IU+1-IL

    Cause: non-monotonic arithmetic, causing the Sturm sequence to be non-monotonic.

    Cure: recalculate, using RANGE=’A’, and pick out eigenvalues IL:IU. In some cases, increasing the PARAMETER “FUDGE” may make things work.

    = 4: RANGE=’I’, and the Gershgorin interval initially used was too small. No eigenvalues were computed.

    Probable cause: your machine has sloppy floating-point arithmetic.

    Cure: Increase the PARAMETER “FUDGE”, recompile, and try again.

LARRE#

group larre

Functions

template<typename T>
void larre(char *range, integer *n, T *vl, T *vu, integer *il, integer *iu, T *d, T *e, T *e2, T *rtol1, T *rtol2, T *spltol, integer *nsplit, integer *isplit, integer *m, T *w, T *werr, T *wgap, integer *iblock, integer *indexw, T *gers, T *pivmin, T *work, integer *iwork, integer *info)#

LARRE given the tridiagonal matrix T, sets small off-diagonal elements to

zero and for each unreduced block Ti, finds base representations and eigenvalues.

Purpose:

 To find the desired eigenvalues of a given real symmetric
 tridiagonal matrix T, SLARRE sets any "small" off-diagonal
 elements to zero, and for each unreduced block T_i, it finds
 (a) a suitable shift at one end of the block's spectrum,
 (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and
 (c) eigenvalues of each L_i D_i L_i^T.
 The representations and eigenvalues found are then used by
 SSTEMR to compute the eigenvectors of T.
 The accuracy varies depending on whether bisection is used to
 find a few eigenvalues or the dqds algorithm (subroutine SLASQ2) to
 conpute all and then discard any unwanted one.
 As an added benefit, SLARRE also outputs the n
 Gerschgorin intervals for the matrices L_i D_i L_i^T.

Parameters:
  • RANGE – [in]

    RANGE is CHARACTER*1

    = ‘A’: (“All”) all eigenvalues will be found.

    = ‘V’: (“Value”) all eigenvalues in the half-open interval (VL, VU] will be found.

    = ‘I’: (“Index”) the IL-th through IU-th eigenvalues (of the entire matrix) will be found.

  • N – [in]

    N is INTEGER

    The order of the matrix. N > 0.

  • VL – [inout]

    VL is REAL

    If RANGE=’V’, the lower bound for the eigenvalues. Eigenvalues less than or equal to VL, or greater than VU, will not be returned. VL < VU.

    If RANGE=’I’ or =’A’, SLARRE computes bounds on the desired part of the spectrum.

  • VU – [inout]

    VU is REAL

    If RANGE=’V’, the upper bound for the eigenvalues. Eigenvalues less than or equal to VL, or greater than VU, will not be returned. VL < VU.

    If RANGE=’I’ or =’A’, SLARRE computes bounds on the desired part of the spectrum.

  • IL – [in]

    IL is INTEGER

    If RANGE=’I’, the index of the smallest eigenvalue to be returned.

    1 <= IL <= IU <= N.

  • IU – [in]

    IU is INTEGER

    If RANGE=’I’, the index of the largest eigenvalue to be returned.

    1 <= IL <= IU <= N.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the N diagonal elements of the tridiagonal matrix T.

    On exit, the N diagonal elements of the diagonal matrices D_i.

  • E – [inout]

    E is REAL array, dimension (N)

    On entry, the first (N-1) entries contain the subdiagonal elements of the tridiagonal matrix T; E(N) need not be set.

    On exit, E contains the subdiagonal elements of the unit bidiagonal matrices L_i. The entries E(ISPLIT(I)),

    1 <= I <= NSPLIT, contain the base points sigma_i on output.

  • E2 – [inout]

    E2 is REAL array, dimension (N)

    On entry, the first (N-1) entries contain the SQUARES of the subdiagonal elements of the tridiagonal matrix T; E2(N) need not be set.

    On exit, the entries E2(ISPLIT(I)), 1 <= I <= NSPLIT, have been set to zero

  • RTOL1 – [in] RTOL1 is REAL

  • RTOL2 – [in]

    RTOL2 is REAL

    Parameters for bisection.

    An interval [LEFT,RIGHT] has converged if RIGHT-LEFT < MAX(RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|))

  • SPLTOL – [in]

    SPLTOL is REAL

    The threshold for splitting.

  • NSPLIT – [out]

    NSPLIT is INTEGER

    The number of blocks T splits into. 1 <= NSPLIT <= N.

  • ISPLIT – [out]

    ISPLIT is INTEGER array, dimension (N)

    The splitting points, at which T breaks up into blocks. The first block consists of rows/columns 1 to ISPLIT(1), the second of rows/columns ISPLIT(1)+1 through ISPLIT(2), etc., and the NSPLIT-th consists of rows/columns ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.

  • M – [out]

    M is INTEGER

    The total number of eigenvalues (of all L_i D_i L_i^T)

    found.

  • W – [out]

    W is REAL array, dimension (N)

    The first M elements contain the eigenvalues. The eigenvalues of each of the blocks, L_i D_i L_i^T, are sorted in ascending order (SLARRE may use the remaining N-M elements as workspace).

  • WERR – [out]

    WERR is REAL array, dimension (N)

    The error bound on the corresponding eigenvalue in W.

  • WGAP – [out]

    WGAP is REAL array, dimension (N)

    The separation from the right neighbor eigenvalue in W. The gap is only with respect to the eigenvalues of the same block as each block has its own representation tree. Exception: at the right end of a block we store the left gap

  • IBLOCK – [out]

    IBLOCK is INTEGER array, dimension (N)

    The indices of the blocks (submatrices) associated with the corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to the first block from the top, =2 if W(i) belongs to the second block, etc.

  • INDEXW – [out]

    INDEXW is INTEGER array, dimension (N)

    The indices of the eigenvalues within each block (submatrix); for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the i-th eigenvalue W(i) is the 10-th eigenvalue in block 2

  • GERS – [out]

    GERS is REAL array, dimension (2*N)

    The N Gerschgorin intervals (the i-th Gerschgorin interval is (GERS(2*i-1), GERS(2*i)).

  • PIVMIN – [out]

    PIVMIN is REAL

    The minimum pivot in the Sturm sequence for T.

  • WORK – [out]

    WORK is REAL array, dimension (6*N)

    Workspace.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (5*N)

    Workspace.

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

    > 0: A problem occurred in SLARRE.

    < 0: One of the called subroutines signaled an internal problem. Needs inspection of the corresponding parameter IINFO for further information.

    =-1: Problem in SLARRD.

    = 2: No base representation could be found in MAXTRY iterations. Increasing MAXTRY and recompilation might be a remedy.

    =-3: Problem in SLARRB when computing the refined root representation for SLASQ2.

    =-4: Problem in SLARRB when preforming bisection on the desired part of the spectrum.

    =-5: Problem in SLASQ2.

    =-6: Problem in SLASQ2.

LARRF#

group larrf

Functions

template<typename T>
void larrf(integer *n, T *d, T *l, T *ld, integer *clstrt, integer *clend, T *w, T *wgap, T *werr, T *spdiam, T *clgapl, T *clgapr, T *pivmin, T *sigma, T *dplus, T *lplus, T *work, integer *info)#

LARRF finds a new relatively robust representation such that at least

one of the eigenvalues is relatively isolated.

Purpose:

 Given the initial representation L D L^T and its cluster of close
 eigenvalues (in a relative measure), W(CLSTRT), W(CLSTRT+1), ...
 W(CLEND), SLARRF finds a new relatively robust representation
 L D L^T - SIGMA I = L(+) D(+) L(+)^T such that at least one of the
 eigenvalues of L(+) D(+) L(+)^T is relatively isolated.

Parameters:
  • N – [in]

    N is INTEGER

    The order of the matrix (subblock, if the matrix split).

  • D – [in]

    D is REAL array, dimension (N)

    The N diagonal elements of the diagonal matrix D.

  • L – [in]

    L is REAL array, dimension (N-1)

    The (N-1) subdiagonal elements of the unit bidiagonal matrix L.

  • LD – [in]

    LD is REAL array, dimension (N-1)

    The (N-1) elements L(i)*D(i).

  • CLSTRT – [in]

    CLSTRT is INTEGER

    The index of the first eigenvalue in the cluster.

  • CLEND – [in]

    CLEND is INTEGER

    The index of the last eigenvalue in the cluster.

  • W – [in]

    W is REAL array, dimension

    dimension is >= (CLEND-CLSTRT+1)

    The eigenvalue APPROXIMATIONS of L D L^T in ascending order. W(CLSTRT) through W(CLEND) form the cluster of relatively close eigenalues.

  • WGAP – [inout]

    WGAP is REAL array, dimension

    dimension is >= (CLEND-CLSTRT+1)

    The separation from the right neighbor eigenvalue in W.

  • WERR – [in]

    WERR is REAL array, dimension

    dimension is >= (CLEND-CLSTRT+1)

    WERR contain the semiwidth of the uncertainty interval of the corresponding eigenvalue APPROXIMATION in W

  • SPDIAM – [in]

    SPDIAM is REAL

    estimate of the spectral diameter obtained from the Gerschgorin intervals

  • CLGAPL – [in] CLGAPL is REAL

  • CLGAPR – [in]

    CLGAPR is REAL

    absolute gap on each end of the cluster. Set by the calling routine to protect against shifts too close to eigenvalues outside the cluster.

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum pivot allowed in the Sturm sequence.

  • SIGMA – [out]

    SIGMA is REAL

    The shift used to form L(+) D(+) L(+)^T.

  • DPLUS – [out]

    DPLUS is REAL array, dimension (N)

    The N diagonal elements of the diagonal matrix D(+).

  • LPLUS – [out]

    LPLUS is REAL array, dimension (N-1)

    The first (N-1) elements of LPLUS contain the subdiagonal elements of the unit bidiagonal matrix L(+).

  • WORK – [out]

    WORK is REAL array, dimension (2*N)

    Workspace.

  • INFO – [out]

    INFO is INTEGER

    Signals processing OK (=0) or failure (=1)

LARRJ#

group larrj

Functions

template<typename T>
void larrj(integer *n, T *d, T *e2, integer *ifirst, integer *ilast, T *rtol, integer *offset, T *w, T *werr, T *work, integer *iwork, T *pivmin, T *spdiam, integer *info)#

LARRJ performs refinement of the initial estimates of the eigenvalues of the matrix T.

Purpose:

   Given the initial eigenvalue approximations of T, SLARRJ
   does  bisection to refine the eigenvalues of T,
   W(IFIRST-OFFSET) through W(ILAST-OFFSET), to more accuracy. Initial
   guesses for these eigenvalues are input in W, the corresponding estimate
   of the error in these guesses in WERR. During bisection, intervals
   [left, right] are maintained by storing their mid-points and
   semi-widths in the arrays W and WERR respectively.

Parameters:
  • N – [in]

    N is INTEGER

    The order of the matrix.

  • D – [in]

    D is REAL array, dimension (N)

    The N diagonal elements of T.

  • E2 – [in]

    E2 is REAL array, dimension (N-1)

    The Squares of the (N-1) subdiagonal elements of T.

  • IFIRST – [in]

    IFIRST is INTEGER

    The index of the first eigenvalue to be computed.

  • ILAST – [in]

    ILAST is INTEGER

    The index of the last eigenvalue to be computed.

  • RTOL – [in]

    RTOL is REAL

    Tolerance for the convergence of the bisection intervals. An interval [LEFT,RIGHT] has converged if RIGHT-LEFT < RTOL*MAX(|LEFT|,|RIGHT|).

  • OFFSET – [in]

    OFFSET is INTEGER

    Offset for the arrays W and WERR, i.e., the IFIRST-OFFSET through ILAST-OFFSET elements of these arrays are to be used.

  • W – [inout]

    W is REAL array, dimension (N)

    On input, W(IFIRST-OFFSET) through W(ILAST-OFFSET) are estimates of the eigenvalues of L D L^T indexed IFIRST through ILAST.

    On output, these estimates are refined.

  • WERR – [inout]

    WERR is REAL array, dimension (N)

    On input, WERR(IFIRST-OFFSET) through WERR(ILAST-OFFSET) are the errors in the estimates of the corresponding elements in W. On output, these errors are refined.

  • WORK – [out]

    WORK is REAL array, dimension (2*N)

    Workspace.

  • IWORK – [out]

    IWORK is INTEGER array, dimension (2*N)

    Workspace.

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum pivot in the Sturm sequence for T.

  • SPDIAM – [in]

    SPDIAM is REAL

    The spectral diameter of T.

  • INFO – [out]

    INFO is INTEGER

    Error flag.

LARRK#

group larrk

Functions

template<typename T>
void larrk(integer *n, integer *iw, T *gl, T *gu, T *d, T *e2, T *pivmin, T *reltol, T *w, T *werr, integer *info)#

LARRK computes one eigenvalue of a symmetric tridiagonal matrix T to suitable accuracy.

Purpose:

   LARRK computes one eigenvalue of a symmetric tridiagonal
   matrix T to suitable accuracy. This is an auxiliary code to be
   called from SSTEMR.

   To avoid overflow, the matrix must be scaled so that its
   largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and
for greatest accuracy, it should not be much smaller than that.

   See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
   Matrix", Report CS41, Computer Science Dept., Stanford
   University, July 21, 1966.

Parameters:
  • N – [in]

    N is INTEGER

    The order of the tridiagonal matrix T. N >= 0.

  • IW – [in]

    IW is INTEGER

    The index of the eigenvalues to be returned.

  • GL – [in] GL is REAL

  • GU – [in]

    GU is REAL

    An upper and a lower bound on the eigenvalue.

  • D – [in]

    D is REAL array, dimension (N)

    The n diagonal elements of the tridiagonal matrix T.

  • E2 – [in]

    E2 is REAL array, dimension (N-1)

    The (n-1) squared off-diagonal elements of the tridiagonal matrix T.

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum pivot allowed in the Sturm sequence for T.

  • RELTOL – [in]

    RELTOL is REAL

    The minimum relative width of an interval. When an interval is narrower than RELTOL times the larger (in magnitude) endpoint, then it is considered to be sufficiently small, i.e., converged. Note: this should always be at least radix*machine epsilon.

  • W – [out] W is REAL

  • WERR – [out]

    WERR is REAL

    The error bound on the corresponding eigenvalue approximation in W.

  • INFO – [out]

    INFO is INTEGER

    = 0: Eigenvalue converged

    = -1: Eigenvalue did NOT converge

LARRV#

group larrv

Functions

template<typename T>
void larrv(integer *n, T *vl, T *vu, T *d, T *l, T *pivmin, integer *isplit, integer *m, integer *dol, integer *dou, T *minrgp, T *rtol1, T *rtol2, T *w, T *werr, T *wgap, integer *iblock, integer *indexw, T *gers, T *z, integer *ldz, integer *isuppz, T *work, integer *iwork, integer *info)#

LARRV computes the eigenvectors of the tridiagonal matrix T = L D LT

given L, D and the eigenvalues of L D LT.

Purpose:

 LARRV computes the eigenvectors of the tridiagonal matrix
 T = L D L**T given L, D and APPROXIMATIONS to the eigenvalues of L D L**T.
 The input eigenvalues should have been computed by LARRE.

Parameters:
  • N – [in]

    N is INTEGER

    The order of the matrix. N >= 0.

  • VL – [in]

    VL is REAL

    Lower bound of the interval that contains the desired eigenvalues. VL < VU. Needed to compute gaps on the left or right end of the extremal eigenvalues in the desired RANGE.

  • VU – [in]

    VU is REAL

    Upper bound of the interval that contains the desired eigenvalues. VL < VU.

    Note: VU is currently not used by this implementation of SLARRV, VU is passed to SLARRV because it could be used compute gaps on the right end of the extremal eigenvalues. However, with not much initial accuracy in LAMBDA and VU, the formula can lead to an overestimation of the right gap and thus to inadequately early RQI ‘convergence’. This is currently prevented this by forcing a small right gap. And so it turns out that VU is currently not used by this implementation of SLARRV.

  • D – [inout]

    D is REAL array, dimension (N)

    On entry, the N diagonal elements of the diagonal matrix D. On exit, D may be overwritten.

  • L – [inout]

    L is REAL array, dimension (N)

    On entry, the (N-1) subdiagonal elements of the unit bidiagonal matrix L are in elements 1 to N-1 of L (if the matrix is not split.) At the end of each block is stored the corresponding shift as given by SLARRE.

    On exit, L is overwritten.

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum pivot allowed in the Sturm sequence.

  • ISPLIT – [in]

    ISPLIT is INTEGER array, dimension (N)

    The splitting points, at which T breaks up into blocks. The first block consists of rows/columns 1 to ISPLIT(1), the second of rows/columns ISPLIT(1)+1 through ISPLIT(2), etc.

  • M – [in]

    M is INTEGER

    The total number of input eigenvalues. 0 <= M <= N.

  • DOL – [in] DOL is INTEGER

  • DOU – [in]

    DOU is INTEGER

    If the user wants to compute only selected eigenvectors from all the eigenvalues supplied, he can specify an index range DOL:DOU. Or else the setting DOL=1, DOU=M should be applied. Note that DOL and DOU refer to the order in which the eigenvalues are stored in W.

    If the user wants to compute only selected eigenpairs, then the columns DOL-1 to DOU+1 of the eigenvector space Z contain the computed eigenvectors. All other columns of Z are set to zero.

  • MINRGP – [in] MINRGP is REAL

  • RTOL1 – [in] RTOL1 is REAL

  • RTOL2 – [in]

    RTOL2 is REAL

    Parameters for bisection.

    An interval [LEFT,RIGHT] has converged if RIGHT-LEFT < MAX(RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|))

  • W – [inout]

    W is REAL array, dimension (N)

    The first M elements of W contain the APPROXIMATE 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 SLARRE is expected here). Furthermore, they are with respect to the shift of the corresponding root representation for their block. On exit, W holds the eigenvalues of the UNshifted matrix.

  • WERR – [inout]

    WERR is REAL array, dimension (N)

    The first M elements contain the semiwidth of the uncertainty interval of the corresponding eigenvalue in W

  • WGAP – [inout]

    WGAP is REAL array, dimension (N)

    The separation from the right neighbor eigenvalue in W.

  • IBLOCK – [in]

    IBLOCK is INTEGER array, dimension (N)

    The indices of the blocks (submatrices) associated with the corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to the first block from the top, =2 if W(i) belongs to the second block, etc.

  • INDEXW – [in]

    INDEXW is INTEGER array, dimension (N)

    The indices of the eigenvalues within each block (submatrix); for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.

  • GERS – [in]

    GERS is REAL array, dimension (2*N)

    The N Gerschgorin intervals (the i-th Gerschgorin interval is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should be computed from the original UNshifted matrix.

  • Z – [out]

    Z is REAL array, dimension (LDZ, fla_max(1,M))

    If INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix T corresponding to the input eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). Note: the user must ensure that at least fla_max(1,M) columns are supplied in the array Z.

  • LDZ – [in]

    LDZ is INTEGER

    The leading dimension of the array Z. LDZ >= 1, and if JOBZ = ‘V’, LDZ >= fla_max(1,N).

  • ISUPPZ – [out]

    ISUPPZ is INTEGER array, dimension (2*max(1,M))

    The support of the eigenvectors in Z, i.e., the indices indicating the nonzero elements in Z. The I-th eigenvector is nonzero only in elements ISUPPZ(2*I-1) through ISUPPZ(2*I).

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

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

  • INFO – [out]

    INFO is INTEGER

    = 0: successful exit

    > 0: A problem occurred in SLARRV.

    < 0: One of the called subroutines signaled an internal problem. Needs inspection of the corresponding parameter IINFO for further information.

    =-1: Problem in SLARRB when refining a child’s eigenvalues.

    =-2: Problem in SLARRF when computing the RRR of a child. When a child is inside a tight cluster, it can be difficult to find an RRR. A partial remedy from the user’s point of view is to make the parameter MINRGP smaller and recompile. However, as the orthogonality of the computed vectors is proportional to 1/MINRGP, the user should be aware that he might be trading in precision when he decreases MINRGP.

    =-3: Problem in SLARRB when refining a single eigenvalue after the Rayleigh correction was rejected.

    = 5: The Rayleigh Quotient Iteration failed to converge to full accuracy in MAXITR steps.

template<typename T, typename Ta>
void larrv(integer *n, Ta *vl, Ta *vu, Ta *d, Ta *l, Ta *pivmin, integer *isplit, integer *m, integer *dol, integer *dou, Ta *minrgp, Ta *rtol1, Ta *rtol2, Ta *w, Ta *werr, Ta *wgap, integer *iblock, integer *indexw, Ta *gers, T *z, integer *ldz, integer *isuppz, Ta *work, integer *iwork, integer *info)#

LAR1V#

group lar1v

Functions

template<typename T>
void lar1v(integer *n, integer *b1, integer *bn, T *lambda, T *d, T *l, T *ld, T *lld, T *pivmin, T *gaptol, T *z, logical *wantnc, integer *negcnt, T *ztz, T *mingma, integer *r, integer *isuppz, T *nrminv, T *resid, T *rqcorr, T *work)#

LAR1V computes the (scaled) r-th column of the inverse of the

submatrix in rows b1 through bn of the tridiagonal matrix LDLT - λI.

Purpose:

 LAR1V computes the (scaled) r-th column of the inverse of
 the sumbmatrix in rows B1 through BN of the tridiagonal matrix
 L D L**T - sigma I. When sigma is close to an eigenvalue, the
 computed vector is an accurate eigenvector. Usually, r corresponds
 to the index where the eigenvector is largest in magnitude.
 The following steps accomplish this computation :
 (a) Stationary qd transform, L D L**T - sigma I = L(+) D(+) L(+)**T,
 (b) Progressive qd transform, L D L**T - sigma I = U(-) D(-) U(-)**T,
 (c) Computation of the diagonal elements of the inverse of
     L D L**T - sigma I by combining the above transforms, and choosing
     r as the index where the diagonal of the inverse is (one of the)
     largest in magnitude.
 (d) Computation of the (scaled) r-th column of the inverse using the
     twisted factorization obtained by combining the top part of the
     the stationary and the bottom part of the progressive transform.

Parameters:
  • N – [in]

    N is INTEGER

    The order of the matrix L D L**T.

  • B1 – [in]

    B1 is INTEGER

    First index of the submatrix of L D L**T.

  • BN – [in]

    BN is INTEGER

    Last index of the submatrix of L D L**T.

  • LAMBDA – [in]

    LAMBDA is REAL

    The shift. In order to compute an accurate eigenvector, LAMBDA should be a good approximation to an eigenvalue of L D L**T.

  • L – [in]

    L is REAL array, dimension (N-1)

    The (n-1) subdiagonal elements of the unit bidiagonal matrix L, in elements 1 to N-1.

  • D – [in]

    D is REAL array, dimension (N)

    The n diagonal elements of the diagonal matrix D.

  • LD – [in]

    LD is REAL array, dimension (N-1)

    The n-1 elements L(i)*D(i).

  • LLD – [in]

    LLD is REAL array, dimension (N-1)

    The n-1 elements L(i)*L(i)*D(i).

  • PIVMIN – [in]

    PIVMIN is REAL

    The minimum pivot in the Sturm sequence.

  • GAPTOL – [in]

    GAPTOL is REAL

    Tolerance that indicates when eigenvector entries are negligible w.r.t. their contribution to the residual.

  • Z – [inout]

    Z is REAL array, dimension (N)

    On input, all entries of Z must be set to 0. On output, Z contains the (scaled) r-th column of the inverse. The scaling is such that Z(R) equals 1.

  • WANTNC – [in]

    WANTNC is LOGICAL

    Specifies whether NEGCNT has to be computed.

  • NEGCNT – [out]

    NEGCNT is INTEGER

    If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin in the matrix factorization L D L**T, and NEGCNT = -1 otherwise.

  • ZTZ – [out]

    ZTZ is REAL

    The square of the 2-norm of Z.

  • MINGMA – [out]

    MINGMA is REAL

    The reciprocal of the largest (in magnitude) diagonal element of the inverse of L D L**T - sigma I.

  • R – [inout]

    R is INTEGER

    The twist index for the twisted factorization used to compute Z.

    On input, 0 <= R <= N. If R is input as 0, R is set to the index where (L D L**T - sigma I)^{-1} is largest in magnitude. If 1 <= R <= N, R is unchanged. On output, R contains the twist index used to compute Z. Ideally, R designates the position of the maximum entry in the eigenvector.

  • ISUPPZ – [out]

    ISUPPZ is INTEGER array, dimension (2)

    The support of the vector in Z, i.e., the vector Z is nonzero only in elements ISUPPZ(1) through ISUPPZ(2).

  • NRMINV – [out]

    NRMINV is REAL

    NRMINV = 1/SQRT(ZTZ)

  • RESID – [out]

    RESID is REAL

    The residual of the FP vector. RESID = ABS(MINGMA)/SQRT(ZTZ)

  • RQCORR – [out]

    RQCORR is REAL

    The Rayleigh Quotient correction to LAMBDA. RQCORR = MINGMA*TMP

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

template<typename T, typename Ta>
void lar1v(integer *n, integer *b1, integer *bn, Ta *lambda, Ta *d, Ta *l, Ta *ld, Ta *lld, Ta *pivmin, Ta *gaptol, T *z, logical *wantnc, integer *negcnt, Ta *ztz, Ta *mingma, integer *r, integer *isuppz, Ta *nrminv, Ta *resid, Ta *rqcorr, Ta *work)#