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

◆ zhbev()

void zhbev ( char  jobz,
char  uplo,
int  n,
int  kd,
int  ldab,
doublecomplex  ab[],
double  w[],
int  ldz,
doublecomplex  z[],
doublecomplex  work[],
double  rwork[],
int *  info 
)

(Simple driver) Eigenvalues and eigenvectors of a Hermitian band matrix

Purpose
This routine computes all the eigenvalues and, optionally, eigenvectors of a Hermitian band 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]kdNumber of super-diagonals of the matrix A if uplo = 'U' or number of sub-diagonals if uplo = 'L'. (kd >= 0)
[in]ldabLeading dimension of the two dimensional array ab[][]. (ldab >= kd + 1)
[in,out]ab[][]Array ab[lab][ldab] (lab >= n)
[in] The upper or lower triangle of the Hermitian band matrix A, stored in the first kd+1 columns of the array. The j-th column of A is stored in the j-th row of the array ab as follows.
uplo = 'U': ab[j][kd + i - j] = A(i, j) for max(0, j - kd - 1) <= i <= j <= n - 1.
uplo = 'L': ab[j][i - j] = A(i, j) for 0 <= j <= i <= min(n - 1, j + kd - 1).
[out] ab[][] is overwritten by values generated during the reduction to tridiagonal form. If uplo = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T are returned in columns kd and kd+1 of ab[][]. If uplo = 'L', the diagonal and first subdiagonal of T are returned in the first two columns of ab[][].
[out]w[]Array w[lw] (lw >= n)
If info = 0, the eigenvalues in ascending order.
[in]ldzLeading 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 w[i].
jobz = 'N': z[][] is not referenced.
[out]work[]Array work[lwork] (lwork >= n)
Work array.
[out]rwork[]Array rwork[lrwork] (lrwork >= max(1, 3*n-2))
Work array.
[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 kd had an illegal value (kd < 0)
= -5: The argument ldab had an illegal value (ldab < kd + 1)
= -8: The argument ldz had an illegal value (ldz 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