stedc#

Functions

void sstedc(
    const char* compz,
    const INT   n,
          f32*  D,
          f32*  E,
          f32*  Z,
    const INT   ldz,
          f32*  work,
    const INT   lwork,
          INT*  iwork,
    const INT   liwork,
          INT*  info
);
void sstedc(const char *compz, const INT n, f32 *D, f32 *E, f32 *Z, const INT ldz, f32 *work, const INT lwork, INT *iwork, const INT liwork, INT *info)#

SSTEDC computes 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.

Parameters

in
compz

= ‘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.

in
n

The dimension of the symmetric tridiagonal matrix. n >= 0.

inout
D

Double precision array, dimension (n). On entry, the diagonal elements of the tridiagonal matrix. On exit, if info = 0, the eigenvalues in ascending order.

inout
E

Double precision array, dimension (n-1). On entry, the 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’, 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.

in
ldz

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

out
work

Double precision array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. If compz = ‘N’ or n <= 1 then lwork must be at least 1. If compz = ‘V’ and n > 1 then lwork must be at least ( 1 + 3*n + 2*n*lgn + 4*n^2 ), where lgn = smallest integer k such that 2^k >= n. If compz = ‘I’ and n > 1 then lwork must be at least ( 1 + 4*n + 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 lwork need only be max(1, 2*(n-1)). If lwork = -1, then a workspace query is assumed.

out
iwork

Integer array, dimension (max(1,liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of the array iwork. If compz = ‘N’ or n <= 1 then liwork must be at least 1. If compz = ‘V’ and n > 1 then liwork must be at least ( 6 + 6*n + 5*n*lgn ). If compz = ‘I’ and n > 1 then 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.

out
info

  • = 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).

Functions

void dstedc(
    const char* compz,
    const INT   n,
          f64*  D,
          f64*  E,
          f64*  Z,
    const INT   ldz,
          f64*  work,
    const INT   lwork,
          INT*  iwork,
    const INT   liwork,
          INT*  info
);
void dstedc(const char *compz, const INT n, f64 *D, f64 *E, f64 *Z, const INT ldz, f64 *work, const INT lwork, INT *iwork, const INT liwork, INT *info)#

DSTEDC computes 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 DSYTRD or DSPTRD or DSBTRD has been used to reduce this matrix to tridiagonal form.

Parameters

in
compz

= ‘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.

in
n

The dimension of the symmetric tridiagonal matrix. n >= 0.

inout
D

Double precision array, dimension (n). On entry, the diagonal elements of the tridiagonal matrix. On exit, if info = 0, the eigenvalues in ascending order.

inout
E

Double precision array, dimension (n-1). On entry, the 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’, 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.

in
ldz

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

out
work

Double precision array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. If compz = ‘N’ or n <= 1 then lwork must be at least 1. If compz = ‘V’ and n > 1 then lwork must be at least ( 1 + 3*n + 2*n*lgn + 4*n^2 ), where lgn = smallest integer k such that 2^k >= n. If compz = ‘I’ and n > 1 then lwork must be at least ( 1 + 4*n + 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 lwork need only be max(1, 2*(n-1)). If lwork = -1, then a workspace query is assumed.

out
iwork

Integer array, dimension (max(1,liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of the array iwork. If compz = ‘N’ or n <= 1 then liwork must be at least 1. If compz = ‘V’ and n > 1 then liwork must be at least ( 6 + 6*n + 5*n*lgn ). If compz = ‘I’ and n > 1 then 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.

out
info

  • = 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).

Functions

void cstedc(
    const char* compz,
    const INT   n,
          f32*  D,
          f32*  E,
          c64*  Z,
    const INT   ldz,
          c64*  work,
    const INT   lwork,
          f32*  rwork,
    const INT   lrwork,
          INT*  iwork,
    const INT   liwork,
          INT*  info
);
void cstedc(const char *compz, const INT n, f32 *D, f32 *E, c64 *Z, const INT ldz, c64 *work, const INT lwork, f32 *rwork, const INT lrwork, INT *iwork, const INT liwork, INT *info)#

CSTEDC computes all eigenvalues and, optionally, eigenvectors of a symmetric tridiagonal matrix using the divide and conquer method.

The eigenvectors of a full or band complex Hermitian matrix can also be found if CHETRD or CHPTRD or CHBTRD has been used to reduce this matrix to tridiagonal form.

Parameters

in
compz

= ‘N’: Compute eigenvalues only. = ‘I’: Compute eigenvectors of tridiagonal matrix also. = ‘V’: Compute eigenvectors of original Hermitian matrix also. On entry, Z contains the unitary matrix used to reduce the original matrix to tridiagonal form.

in
n

The dimension of the symmetric tridiagonal matrix. n >= 0.

inout
D

Single precision array, dimension (n). On entry, the diagonal elements of the tridiagonal matrix. On exit, if info = 0, the eigenvalues in ascending order.

inout
E

Single precision array, dimension (n-1). On entry, the 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’, then Z contains the unitary 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 Hermitian matrix, and if compz = ‘I’, Z contains the orthonormal eigenvectors of the symmetric tridiagonal matrix. If compz = ‘N’, then Z is not referenced.

in
ldz

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

out
work

Complex*16 array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

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. If lwork = -1, then a workspace query is assumed.

out
rwork

Single precision array, dimension (max(1,lrwork)). On exit, if info = 0, rwork[0] returns the optimal lrwork.

in
lrwork

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*lgn + 4*n^2, where lgn = 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. If lrwork = -1, then a workspace query is assumed.

out
iwork

Integer array, dimension (max(1,liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of the array iwork. If compz = ‘N’ or n <= 1, liwork must be at least 1. If compz = ‘V’ and n > 1, liwork must be at least 6 + 6*n + 5*n*lgn. If compz = ‘I’ and n > 1, liwork must be at least 3 + 5*n. If liwork = -1, then a workspace query is assumed.

out
info

  • = 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).

Functions

void zstedc(
    const char* compz,
    const INT   n,
          f64*  D,
          f64*  E,
          c128* Z,
    const INT   ldz,
          c128* work,
    const INT   lwork,
          f64*  rwork,
    const INT   lrwork,
          INT*  iwork,
    const INT   liwork,
          INT*  info
);
void zstedc(const char *compz, const INT n, f64 *D, f64 *E, c128 *Z, const INT ldz, c128 *work, const INT lwork, f64 *rwork, const INT lrwork, INT *iwork, const INT liwork, INT *info)#

ZSTEDC computes all eigenvalues and, optionally, eigenvectors of a symmetric tridiagonal matrix using the divide and conquer method.

The eigenvectors of a full or band complex Hermitian matrix can also be found if ZHETRD or ZHPTRD or ZHBTRD has been used to reduce this matrix to tridiagonal form.

Parameters

in
compz

= ‘N’: Compute eigenvalues only. = ‘I’: Compute eigenvectors of tridiagonal matrix also. = ‘V’: Compute eigenvectors of original Hermitian matrix also. On entry, Z contains the unitary matrix used to reduce the original matrix to tridiagonal form.

in
n

The dimension of the symmetric tridiagonal matrix. n >= 0.

inout
D

Double precision array, dimension (n). On entry, the diagonal elements of the tridiagonal matrix. On exit, if info = 0, the eigenvalues in ascending order.

inout
E

Double precision array, dimension (n-1). On entry, the 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’, then Z contains the unitary 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 Hermitian matrix, and if compz = ‘I’, Z contains the orthonormal eigenvectors of the symmetric tridiagonal matrix. If compz = ‘N’, then Z is not referenced.

in
ldz

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

out
work

Complex*16 array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

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. If lwork = -1, then a workspace query is assumed.

out
rwork

Double precision array, dimension (max(1,lrwork)). On exit, if info = 0, rwork[0] returns the optimal lrwork.

in
lrwork

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*lgn + 4*n^2, where lgn = 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. If lrwork = -1, then a workspace query is assumed.

out
iwork

Integer array, dimension (max(1,liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of the array iwork. If compz = ‘N’ or n <= 1, liwork must be at least 1. If compz = ‘V’ and n > 1, liwork must be at least 6 + 6*n + 5*n*lgn. If compz = ‘I’ and n > 1, liwork must be at least 3 + 5*n. If liwork = -1, then a workspace query is assumed.

out
info

  • = 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).