pteqr#

Functions

void spteqr(
    const char*          compz,
    const INT            n,
          f32*  restrict D,
          f32*  restrict E,
          f32*  restrict Z,
    const INT            ldz,
          f32*  restrict work,
          INT*           info
);
void spteqr(const char *compz, const INT n, f32 *restrict D, f32 *restrict E, f32 *restrict Z, const INT ldz, f32 *restrict work, INT *info)#

SPTEQR 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.)

  • <= n the Cholesky factorization of the matrix could not be performed because the leading principal minor of order i was not positive.

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

Parameters

in
compz

Specifies whether the eigenvectors are to be computed. = ‘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.

in
n

The order of the matrix. n >= 0.

inout
D

Double precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix. On normal exit, D contains the eigenvalues, in descending order.

inout
E

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

inout
Z

Double precision 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.

in
ldz

The leading dimension of the array Z. ldz >= 1, and if compz = ‘V’ or ‘I’, ldz >= max(1, n).

out
work

Double precision array, dimension (4*n).

out
info

Exit status:

  • = 0: successful exit.

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

  • > 0: if info = i, and i is:

Functions

void dpteqr(
    const char*          compz,
    const INT            n,
          f64*  restrict D,
          f64*  restrict E,
          f64*  restrict Z,
    const INT            ldz,
          f64*  restrict work,
          INT*           info
);
void dpteqr(const char *compz, const INT n, f64 *restrict D, f64 *restrict E, f64 *restrict Z, const INT ldz, f64 *restrict work, INT *info)#

DPTEQR computes all eigenvalues and, optionally, eigenvectors of a symmetric positive definite tridiagonal matrix by first factoring the matrix using DPTTRF, and then calling DBDSQR 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 DSYTRD, DSPTRD, or DSBTRD 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.)

  • <= n the Cholesky factorization of the matrix could not be performed because the leading principal minor of order i was not positive.

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

Parameters

in
compz

Specifies whether the eigenvectors are to be computed. = ‘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.

in
n

The order of the matrix. n >= 0.

inout
D

Double precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix. On normal exit, D contains the eigenvalues, in descending order.

inout
E

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

inout
Z

Double precision 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.

in
ldz

The leading dimension of the array Z. ldz >= 1, and if compz = ‘V’ or ‘I’, ldz >= max(1, n).

out
work

Double precision array, dimension (4*n).

out
info

Exit status:

  • = 0: successful exit.

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

  • > 0: if info = i, and i is:

Functions

void cpteqr(
    const char*          compz,
    const INT            n,
          f32*  restrict D,
          f32*  restrict E,
          c64*  restrict Z,
    const INT            ldz,
          f32*  restrict work,
          INT*           info
);
void cpteqr(const char *compz, const INT n, f32 *restrict D, f32 *restrict E, c64 *restrict Z, const INT ldz, f32 *restrict work, INT *info)#

CPTEQR computes all eigenvalues and, optionally, eigenvectors of a symmetric positive definite tridiagonal matrix by first factoring the matrix using SPTTRF, and then calling CBDSQR 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 positive definite Hermitian matrix can also be found if CHETRD, CHPTRD, or CHBTRD 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.)

  • <= n the Cholesky factorization of the matrix could not be performed because the leading principal minor of order i was not positive.

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

Parameters

in
compz

Specifies whether the eigenvectors are to be computed. = ‘N’: Compute eigenvalues only. = ‘V’: Compute eigenvectors of original Hermitian matrix also. Array Z contains the unitary matrix used to reduce the original matrix to tridiagonal form. = ‘I’: Compute eigenvectors of tridiagonal matrix also.

in
n

The order of the matrix. n >= 0.

inout
D

Single precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix. On normal exit, D contains the eigenvalues, in descending order.

inout
E

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

inout
Z

Complex*16 array, dimension (ldz, n). On entry, if compz = ‘V’, the unitary matrix used in the reduction to tridiagonal form. On exit, if compz = ‘V’, the orthonormal eigenvectors of the original Hermitian 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.

in
ldz

The leading dimension of the array Z. ldz >= 1, and if compz = ‘V’ or ‘I’, ldz >= max(1, n).

out
work

Single precision array, dimension (4*n).

out
info

Exit status:

  • = 0: successful exit.

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

  • > 0: if info = i, and i is:

Functions

void zpteqr(
    const char*          compz,
    const INT            n,
          f64*  restrict D,
          f64*  restrict E,
          c128* restrict Z,
    const INT            ldz,
          f64*  restrict work,
          INT*           info
);
void zpteqr(const char *compz, const INT n, f64 *restrict D, f64 *restrict E, c128 *restrict Z, const INT ldz, f64 *restrict work, INT *info)#

ZPTEQR computes all eigenvalues and, optionally, eigenvectors of a symmetric positive definite tridiagonal matrix by first factoring the matrix using DPTTRF, and then calling ZBDSQR 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 positive definite Hermitian matrix can also be found if ZHETRD, ZHPTRD, or ZHBTRD 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.)

  • <= n the Cholesky factorization of the matrix could not be performed because the leading principal minor of order i was not positive.

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

Parameters

in
compz

Specifies whether the eigenvectors are to be computed. = ‘N’: Compute eigenvalues only. = ‘V’: Compute eigenvectors of original Hermitian matrix also. Array Z contains the unitary matrix used to reduce the original matrix to tridiagonal form. = ‘I’: Compute eigenvectors of tridiagonal matrix also.

in
n

The order of the matrix. n >= 0.

inout
D

Double precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix. On normal exit, D contains the eigenvalues, in descending order.

inout
E

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

inout
Z

Complex*16 array, dimension (ldz, n). On entry, if compz = ‘V’, the unitary matrix used in the reduction to tridiagonal form. On exit, if compz = ‘V’, the orthonormal eigenvectors of the original Hermitian 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.

in
ldz

The leading dimension of the array Z. ldz >= 1, and if compz = ‘V’ or ‘I’, ldz >= max(1, n).

out
work

Double precision array, dimension (4*n).

out
info

Exit status:

  • = 0: successful exit.

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

  • > 0: if info = i, and i is: