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

◆ zhbgvd()

void zhbgvd ( char  jobz,
char  uplo,
int  n,
int  ka,
int  kb,
int  ldab,
doublecomplex  ab[],
int  ldbb,
doublecomplex  bb[],
double  w[],
int  ldz,
doublecomplex  z[],
doublecomplex  work[],
int  lwork,
double  rwork[],
int  lrwork,
int  iwork[],
int  liwork,
int *  info 
)

(Divide and conquer driver) Generalized eigenvalue problem of Hermitian band matrices

Purpose
This routine computes all the eigenvalues, and optionally, the eigenvectors of a complex generalized Hermitian-definite banded eigenproblem, of the form
A*x = lambda*B*x.
Here A and B are assumed to be Hermitian and banded, and B is also positive definite.
If eigenvectors are desired, it uses a divide and conquer algorithm.
Parameters
[in]jobz= 'N': Compute eigenvalues only.
= 'V': Compute eigenvalues and eigenvectors.
[in]uplo= 'U': Upper triangles of A and B are stored.
= 'L': Lower triangles of A and B are stored.
[in]nOrder of the matrices A and B. (n >= 0) (If n = 0, returns without computation)
[in]kaNumber of super-diagonals of the matrix A if uplo = 'U' or the number of sub-diagonals if uplo = 'L'. (ka >= 0)
[in]kbNumber of super-diagonals of the matrix B if uplo = 'U' or the number of sub-diagonals if uplo = 'L'. (kb >= 0)
[in]ldabLeading dimension of the two dimensional array ab[][]. (ldab >= ka + 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 ka+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][ka + i - j] = Aij for max(0, j - ka - 1) <= i <= j <= n - 1.
uplo = 'L': ab[j][i - j] = Aij for 0 <= j <= i <= min(n - 1, j + ka - 1).
[out] The contents of ab[][] are destroyed.
[in]ldbbLeading dimension of the two dimensional array bb[][]. (ldbb >= kb + 1)
[in,out]bb[][]Array bb[lbb][ldbb] (lbb >= n)
[in] The upper or lower triangle of the Hermitian positive definite band matrix B, stored in the first kb+1 columns of the array. The j-th column of B is stored in the j-th row of the array bb as follows.
uplo = 'U': bb[j][kb + i - j] = Bij for max(0, j - kb - 1) <= i <= j <= n - 1.
uplo = 'L': bb[j][i - j] = Bij for 0 <= j <= i <= min(n - 1, j + kb - 1).
[out] The factor S from the split Cholesky factorization B = S^H*S, as returned by zpbstf.
[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 if jobz = 'N', ldz >= max(1, n) if jobz = 'V')
[out]z[][]Array z[lz][ldz] (lz >= n)
jobz = 'V': If info = 0, z[][] contains the matrix Z of eigenvectors, with the i-th column of Z holding the eigenvector associated with w[i]. The eigenvectors are normalized so that Z^H*B*Z = I.
jobz = 'N': z[][] is not referenced.
[out]work[]Array work[lwork]
Complex work array
On exit, if info = 0, work[0] returns the optimal lwork.
[in]lworkThe size of work[]. (lwork >= 1 (if n <= 1), n (if jobz = 'N'), 2*n^2 (if jobz = 'V'))
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal size 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 size 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 size 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 ka had an illegal value (ka < 0)
= -5: The argument kb had an illegal value (kb < 0 or kb > ka)
= -6: The argument ldab had an illegal value (ldab < ka + 1)
= -8: The argument ldbb had an illegal value (ldbb < kb + 1)
= -11: The argument ldz had an illegal value (ldz too small)
= -14: The argument lwork had an illegal value (lwork too small)
= -16: The argument lrwork had an illegal value (lrwork too small)
= -18: The argument liwork had an illegal value (liwork too small)
= i (0 < i <= n): The algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero.
= i (i > n): zpbstf returned info = i-n. B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.
Reference
LAPACK