|
|
◆ dsyevd()
| void dsyevd |
( |
char |
jobz, |
|
|
char |
uplo, |
|
|
int |
n, |
|
|
int |
lda, |
|
|
double |
a[], |
|
|
double |
w[], |
|
|
double |
work[], |
|
|
int |
lwork, |
|
|
int |
iwork[], |
|
|
int |
liwork, |
|
|
int * |
info |
|
) |
| |
(Divide and conquer driver) Eigenvalues and eigenvectors of a symmetric matrix
- Purpose
- This routine computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A. If only eigenvalues are desired, it uses a QL or QR method. If eigenvectors are also desired, it uses a divide and conquer algorithm.
- Parameters
-
| [in] | jobz | = 'N': Compute eigenvalues only.
= 'V': Compute eigenvalues and eigenvectors. |
| [in] | uplo | = 'U': Upper triangle of A is stored.
= 'L': Lower triangle of A is stored. |
| [in] | n | Order of the matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in] | lda | Leading dimension of the two dimensional array a[][]. (lda >= max(1, n)) |
| [in,out] | a[][] | Array a[la][lda] (la >= n)
[in] The symmetric matrix A. If uplo = 'U', the leading n x n upper triangular part of a[][] contains the upper triangular part of the matrix A. If uplo = 'L', the leading n x n lower triangular part of a[][] contains the lower triangular part of the matrix A.
[out] jobz = 'V': If info = 0, a[][] contains the orthonormal eigenvectors of the matrix A.
jobz = 'N': The lower triangle (if uplo = 'L') or the upper triangle (if uplo = 'U') of a[][], including the diagonal, is destroyed. |
| [out] | w[] | Array w[lw] (lw >= n)
If info = 0, the eigenvalues in ascending order. |
| [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), 2*n + 1 (if jobz = 'N'), 2*n^2 + 6*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 uplo had an illegal value. (uplo != 'U' nor 'L')
= -3: The argument n had an illegal value. (n < 0)
= -4: The argument lda had an illegal value. (lda < max(1, n))
= -8: The argument lwork had an illegal value. (lwork too small)
= -10: The argument liwork had an illegal value. (liwork too small)
= i > 0: If jobz = 'N', the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.
If jobz = 'V', the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns i/(n+1) through mod(i, n+1). |
- Reference
- LAPACK
|