hbgvd#

Functions

void chbgvd(
    const char*          jobz,
    const char*          uplo,
    const INT            n,
    const INT            ka,
    const INT            kb,
          c64*  restrict AB,
    const INT            ldab,
          c64*  restrict BB,
    const INT            ldbb,
          f32*  restrict W,
          c64*  restrict Z,
    const INT            ldz,
          c64*  restrict work,
    const INT            lwork,
          f32*  restrict rwork,
    const INT            lrwork,
          INT*  restrict iwork,
    const INT            liwork,
          INT*           info
);
void chbgvd(const char *jobz, const char *uplo, const INT n, const INT ka, const INT kb, c64 *restrict AB, const INT ldab, c64 *restrict BB, const INT ldbb, f32 *restrict W, c64 *restrict Z, const INT ldz, c64 *restrict work, const INT lwork, f32 *restrict rwork, const INT lrwork, INT *restrict iwork, const INT liwork, INT *info)#

CHBGVD 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
n

The order of the matrices A and B. n >= 0.

in
ka

The number of superdiagonals of the matrix A if uplo = ‘U’, or the number of subdiagonals if uplo = ‘L’. ka >= 0.

in
kb

The number of superdiagonals of the matrix B if uplo = ‘U’, or the number of subdiagonals if uplo = ‘L’. kb >= 0.

inout
AB

Complex array, dimension (ldab, n). On entry, the upper or lower triangle of the Hermitian band matrix A, stored in the first ka+1 rows. On exit, the contents of AB are destroyed.

in
ldab

The leading dimension of AB. ldab >= ka+1.

inout
BB

Complex array, dimension (ldbb, n). On entry, the upper or lower triangle of the Hermitian band matrix B, stored in the first kb+1 rows. On exit, the factor S from the split Cholesky factorization B = S**H*S, as returned by CPBSTF.

in
ldbb

The leading dimension of BB. ldbb >= kb+1.

out
W

Single precision array, dimension (n). If info = 0, the eigenvalues in ascending order.

out
Z

Complex array, dimension (ldz, n). If jobz = ‘V’, then if info = 0, Z contains the matrix Z of eigenvectors. If jobz = ‘N’, then Z is not referenced.

in
ldz

The leading dimension of Z. ldz >= 1, and if jobz = ‘V’, ldz >= n.

out
work

Complex array, dimension (max(1,lwork)). On exit, if info=0, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. If n <= 1, lwork >= 1. If jobz = ‘N’ and n > 1, lwork >= n. If jobz = ‘V’ and n > 1, lwork >= 2*n**2. If lwork = -1, then a workspace query is assumed.

out
rwork

Single precision array, dimension (max(1,lrwork)). On exit, if info=0, rwork[0] returns the optimal lrwork.

in
lrwork

The dimension of array rwork. If n <= 1, lrwork >= 1. If jobz = ‘N’ and n > 1, lrwork >= n. If jobz = ‘V’ and n > 1, lrwork >= 1 + 5*n + 2*n**2. If lrwork = -1, then a workspace query is assumed.

out
iwork

Integer array, dimension (max(1,liwork)). On exit, if info=0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of array iwork. If jobz = ‘N’ or n <= 1, liwork >= 1. If jobz = ‘V’ and n > 1, liwork >= 3 + 5*n. If liwork = -1, then a workspace query is assumed.

out
info

= 0: successful exit < 0: if info = -i, the i-th argument had an illegal value > 0: if info = i, and i is: <= n: the algorithm failed to converge > n: if info = n + i, for 1 <= i <= n, then CPBSTF returned info = i: B is not positive definite.

Functions

void zhbgvd(
    const char*          jobz,
    const char*          uplo,
    const INT            n,
    const INT            ka,
    const INT            kb,
          c128* restrict AB,
    const INT            ldab,
          c128* restrict BB,
    const INT            ldbb,
          f64*  restrict W,
          c128* restrict Z,
    const INT            ldz,
          c128* restrict work,
    const INT            lwork,
          f64*  restrict rwork,
    const INT            lrwork,
          INT*  restrict iwork,
    const INT            liwork,
          INT*           info
);
void zhbgvd(const char *jobz, const char *uplo, const INT n, const INT ka, const INT kb, c128 *restrict AB, const INT ldab, c128 *restrict BB, const INT ldbb, f64 *restrict W, c128 *restrict Z, const INT ldz, c128 *restrict work, const INT lwork, f64 *restrict rwork, const INT lrwork, INT *restrict iwork, const INT liwork, INT *info)#

ZHBGVD 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
n

The order of the matrices A and B. n >= 0.

in
ka

The number of superdiagonals of the matrix A if uplo = ‘U’, or the number of subdiagonals if uplo = ‘L’. ka >= 0.

in
kb

The number of superdiagonals of the matrix B if uplo = ‘U’, or the number of subdiagonals if uplo = ‘L’. kb >= 0.

inout
AB

Complex array, dimension (ldab, n). On entry, the upper or lower triangle of the Hermitian band matrix A, stored in the first ka+1 rows. On exit, the contents of AB are destroyed.

in
ldab

The leading dimension of AB. ldab >= ka+1.

inout
BB

Complex array, dimension (ldbb, n). On entry, the upper or lower triangle of the Hermitian band matrix B, stored in the first kb+1 rows. On exit, the factor S from the split Cholesky factorization B = S**H*S, as returned by ZPBSTF.

in
ldbb

The leading dimension of BB. ldbb >= kb+1.

out
W

Double precision array, dimension (n). If info = 0, the eigenvalues in ascending order.

out
Z

Complex array, dimension (ldz, n). If jobz = ‘V’, then if info = 0, Z contains the matrix Z of eigenvectors. If jobz = ‘N’, then Z is not referenced.

in
ldz

The leading dimension of Z. ldz >= 1, and if jobz = ‘V’, ldz >= n.

out
work

Complex array, dimension (max(1,lwork)). On exit, if info=0, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. If n <= 1, lwork >= 1. If jobz = ‘N’ and n > 1, lwork >= n. If jobz = ‘V’ and n > 1, lwork >= 2*n**2. If lwork = -1, then a workspace query is assumed.

out
rwork

Double precision array, dimension (max(1,lrwork)). On exit, if info=0, rwork[0] returns the optimal lrwork.

in
lrwork

The dimension of array rwork. If n <= 1, lrwork >= 1. If jobz = ‘N’ and n > 1, lrwork >= n. If jobz = ‘V’ and n > 1, lrwork >= 1 + 5*n + 2*n**2. If lrwork = -1, then a workspace query is assumed.

out
iwork

Integer array, dimension (max(1,liwork)). On exit, if info=0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of array iwork. If jobz = ‘N’ or n <= 1, liwork >= 1. If jobz = ‘V’ and n > 1, liwork >= 3 + 5*n. If liwork = -1, then a workspace query is assumed.

out
info

= 0: successful exit < 0: if info = -i, the i-th argument had an illegal value > 0: if info = i, and i is: <= n: the algorithm failed to converge > n: if info = n + i, for 1 <= i <= n, then ZPBSTF returned info = i: B is not positive definite.