XLPack 6.1
C/C++ API Reference Manual (Basic module)
Loading...
Searching...
No Matches

◆ _dsyev()

void _dsyev ( char  jobz,
char  uplo,
int  n,
int  lda,
double  a[],
double  w[],
double  work[],
int  lwork,
int *  info 
)

(Simple driver) Eigenvalues and eigenvectors of a symmetric matrix

Purpose
This routine computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix A. Eigenvalues and eigenvectors are computed by QL or QR method.
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]nOrder of the matrix A. (n >= 0) (If n = 0, returns without computation)
[in]ldaLeading 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]lworkThe size of work[]. (lwork >= max(1, 3*n-1))
For optimal efficiency, lwork >= (nb + 2)*n, where nb is the optimal blocksize.
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal size of the work[] array, and returns the value in work[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)
= i > 0: The algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.
Reference
LAPACK