|
|
◆ dstevd()
| void dstevd |
( |
char |
jobz, |
|
|
int |
n, |
|
|
double |
d[], |
|
|
double |
e[], |
|
|
int |
ldz, |
|
|
double |
z[], |
|
|
double |
work[], |
|
|
int |
lwork, |
|
|
int |
iwork[], |
|
|
int |
liwork, |
|
|
int * |
info |
|
) |
| |
(Divide and conquer driver) Eigenvalues and eigenvectors of a symmetric tridiagonal matrix
- Purpose
- This routine computes all eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix. If eigenvectors are desired, it uses a divide and conquer algorithm.
- Parameters
-
| [in] | jobz | = 'N': Compute eigenvalues only.
= 'V': Compute eigenvalues and eigenvectors. |
| [in] | n | Order of the matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in,out] | d[] | Array d[ld] (ld >= n)
[in] n diagonal elements of the symmetric tridiagonal matrix A.
[out] If info = 0, the eigenvalues in ascending order. |
| [in,out] | e[] | Array e[le] (le >= n - 1)
[in] n - 1 subdiagonal elements of the symmetric tridiagonal matrix A stored in elements 0 to n - 2 of e[].
[out] The contents of e[] are destroyed. |
| [in] | ldz | Leading dimension of the two dimensional array z[][]. (ldz >= 1 (jobz = 'N'), ldz >= max(1, n) (jobz = 'V')) |
| [out] | z[][] | Array z[lz][ldz] (lz >= n)
jobz = 'V': If info = 0, z[][] contains the orthonormal eigenvectors of the matrix A, with the i-th row of z[][] holding the eigenvector associated with d[i].
jobz = 'N': z[][] is not referenced. |
| [out] | work[] | Array work[lwork]
Work array.
On exit, if info = 0, work[0] returns the optimal lwork. |
| [in] | lwork | The size of work[]. (lwork >= 1 (if n <= 1), 1 (if jobz = 'N'), n^2 + 4*n + 1 (if jobz = 'V'))
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal size of the work[] and iwork[] arrays, and returns these values in work[0] and iwork[0]. |
| [out] | iwork[] | Array iwork[liwork]
Integer work array.
On exit, if info = 0, iwork[0] returns the optimal liwork. |
| [in] | liwork | The size of iwork[]. (liwork >= 1 (if n <= 1), 1 (if jobz = 'N'), 5*n + 3 (if jobz = 'V'))
If liwork = -1, then a workspace query is assumed. The routine only calculates the optimal size of the work[] and iwork[] arrays, and returns these values in work[0] and iwork[0]. |
| [out] | info | = 0: Successful exit
= -1: The argument jobz had an illegal value (jobz != 'V' nor 'N')
= -2: The argument n had an illegal value (n < 0)
= -5: The argument ldz had an illegal value (ldz too small)
= -8: The argument lwork had an illegal value. (lwork too small)
= -10: The argument liwork had an illegal value. (liwork too small)
= i > 0: The algorithm failed to converge; i off-diagonal elements of e[] did not converge to zero |
- Reference
- LAPACK
|