XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ zheevd()

void zheevd ( char  jobz,
char  uplo,
int  n,
int  lda,
doublecomplex  a[],
double  w[],
doublecomplex  work[],
int  lwork,
double  rwork[],
int  lrwork,
int  iwork[],
int  liwork,
int *  info 
)

(Divide and conquer driver) Eigenvalues and eigenvectors of a Hermitian matrix

Purpose
This routine computes all eigenvalues and, optionally, eigenvectors of a Hermitian 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]nOrder of the matrix A. (n >= 0) (If n = 0, returns without computation)
[in]ldaThe leading dimension of the array a[][]. (lda >= max(1,n))
[in,out]a[][]Array a[la][lda] (la >= n)
[in] The Hermitian 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]
Complex work array.
On exit, if info = 0, work[0] returns the optimal lwork.
[in]lworkThe size of work[]. (lrwork >= 1 (if n <= 1), n + 1 (if jobz = 'N'), n^2 + 2*n (if jobz = 'V'))
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal sizes of the work[], rwork[] and iwork[] arrays, and returns these values in work[0], rwork[0] and iwork[0].
[out]rwork[]Array rwork[lrwork]
Work array. On exit, if info = 0, rwork[0] returns the optimal lwork.
[in]lrworkThe size of rwork[]. (lrwork >= 1 (if n <= 1), n (if jobz = 'N'), 2*n^2 + 5*n + 1 (if jobz = 'V'))
If lrwork = -1, then a workspace query is assumed. The routine only calculates the optimal sizes of the work[], rwork[] and iwork[] arrays, and returns these values in work[0], rwork[0] and iwork[0].
[out]iwork[]Array iwork[liwork]
Integer work array.
On exit, if info = 0, iwork[0] returns the optimal liwork.
[in]liworkThe 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 sizes of the work[], rwork[] and iwork[] arrays, and returns these values in work[0], rwork[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 lrwork had an illegal value (lrwork too small)
= -12: The argument liwork had an illegal value (liwork 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