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