hpgvx#

Functions

void chpgvx(
    const INT            itype,
    const char*          jobz,
    const char*          range,
    const char*          uplo,
    const INT            n,
          c64*  restrict AP,
          c64*  restrict BP,
    const f32            vl,
    const f32            vu,
    const INT            il,
    const INT            iu,
    const f32            abstol,
          INT*           m,
          f32*  restrict W,
          c64*  restrict Z,
    const INT            ldz,
          c64*  restrict work,
          f32*  restrict rwork,
          INT*  restrict iwork,
          INT*  restrict ifail,
          INT*           info
);
void chpgvx(const INT itype, const char *jobz, const char *range, const char *uplo, const INT n, c64 *restrict AP, c64 *restrict BP, const f32 vl, const f32 vu, const INT il, const INT iu, const f32 abstol, INT *m, f32 *restrict W, c64 *restrict Z, const INT ldz, c64 *restrict work, f32 *restrict rwork, INT *restrict iwork, INT *restrict ifail, INT *info)#

CHPGVX computes selected eigenvalues and, optionally, eigenvectors of a complex generalized Hermitian-definite eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.

Here A and B are assumed to be Hermitian, stored in packed format, and B is also positive definite. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.

Parameters

in
itype

Specifies the problem type to be solved: = 1: A*x = (lambda)*B*x = 2: A*B*x = (lambda)*x = 3: B*A*x = (lambda)*x

in
jobz

= ‘N’: Compute eigenvalues only; = ‘V’: Compute eigenvalues and eigenvectors.

in
range

= ‘A’: all eigenvalues will be found; = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found; = ‘I’: the IL-th through IU-th eigenvalues will be found.

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.

inout
AP

Complex array, dimension (n*(n+1)/2). On entry, the upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array. On exit, the contents of AP are destroyed.

inout
BP

Complex array, dimension (n*(n+1)/2). On entry, the upper or lower triangle of the Hermitian matrix B, packed columnwise in a linear array. On exit, the triangular factor U or L from the Cholesky factorization B = U**H*U or B = L*L**H.

in
vl

If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. vl < vu. Not referenced if RANGE = ‘A’ or ‘I’.

in
vu

If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. vl < vu. Not referenced if RANGE = ‘A’ or ‘I’.

in
il

If RANGE=’I’, the index of the smallest eigenvalue to be returned. 0 <= il <= iu <= n-1, if n > 0. Not referenced if RANGE = ‘A’ or ‘V’.

in
iu

If RANGE=’I’, the index of the largest eigenvalue to be returned. 0 <= il <= iu <= n-1, if n > 0. Not referenced if RANGE = ‘A’ or ‘V’.

in
abstol

The absolute error tolerance for the eigenvalues.

out
m

The total number of eigenvalues found. 0 <= m <= n.

out
W

Single precision array, dimension (n). On normal exit, the first m elements contain the selected eigenvalues in ascending order.

out
Z

Complex array, dimension (ldz, n). If JOBZ = ‘V’, the first m columns of Z contain the orthonormal eigenvectors.

in
ldz

The leading dimension of the array Z. ldz >= 1, and if JOBZ = ‘V’, ldz >= max(1,n).

out
work

Complex array, dimension (2*n).

out
rwork

Single precision array, dimension (7*n).

out
iwork

Integer array, dimension (5*n).

out
ifail

Integer array, dimension (n). If JOBZ = ‘V’, then if info = 0, the first m elements of IFAIL are zero. If info > 0, then IFAIL contains the indices of the eigenvectors that failed to converge.

out
info

= 0: successful exit < 0: if info = -i, the i-th argument had an illegal value > 0: CPPTRF or CHPEVX returned an error code.

Functions

void zhpgvx(
    const INT            itype,
    const char*          jobz,
    const char*          range,
    const char*          uplo,
    const INT            n,
          c128* restrict AP,
          c128* restrict BP,
    const f64            vl,
    const f64            vu,
    const INT            il,
    const INT            iu,
    const f64            abstol,
          INT*           m,
          f64*  restrict W,
          c128* restrict Z,
    const INT            ldz,
          c128* restrict work,
          f64*  restrict rwork,
          INT*  restrict iwork,
          INT*  restrict ifail,
          INT*           info
);
void zhpgvx(const INT itype, const char *jobz, const char *range, const char *uplo, const INT n, c128 *restrict AP, c128 *restrict BP, const f64 vl, const f64 vu, const INT il, const INT iu, const f64 abstol, INT *m, f64 *restrict W, c128 *restrict Z, const INT ldz, c128 *restrict work, f64 *restrict rwork, INT *restrict iwork, INT *restrict ifail, INT *info)#

ZHPGVX computes selected eigenvalues and, optionally, eigenvectors of a complex generalized Hermitian-definite eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.

Here A and B are assumed to be Hermitian, stored in packed format, and B is also positive definite. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.

Parameters

in
itype

Specifies the problem type to be solved: = 1: A*x = (lambda)*B*x = 2: A*B*x = (lambda)*x = 3: B*A*x = (lambda)*x

in
jobz

= ‘N’: Compute eigenvalues only; = ‘V’: Compute eigenvalues and eigenvectors.

in
range

= ‘A’: all eigenvalues will be found; = ‘V’: all eigenvalues in the half-open interval (VL,VU] will be found; = ‘I’: the IL-th through IU-th eigenvalues will be found.

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.

inout
AP

Complex array, dimension (n*(n+1)/2). On entry, the upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array. On exit, the contents of AP are destroyed.

inout
BP

Complex array, dimension (n*(n+1)/2). On entry, the upper or lower triangle of the Hermitian matrix B, packed columnwise in a linear array. On exit, the triangular factor U or L from the Cholesky factorization B = U**H*U or B = L*L**H.

in
vl

If RANGE=’V’, the lower bound of the interval to be searched for eigenvalues. vl < vu. Not referenced if RANGE = ‘A’ or ‘I’.

in
vu

If RANGE=’V’, the upper bound of the interval to be searched for eigenvalues. vl < vu. Not referenced if RANGE = ‘A’ or ‘I’.

in
il

If RANGE=’I’, the index of the smallest eigenvalue to be returned. 0 <= il <= iu <= n-1, if n > 0. Not referenced if RANGE = ‘A’ or ‘V’.

in
iu

If RANGE=’I’, the index of the largest eigenvalue to be returned. 0 <= il <= iu <= n-1, if n > 0. Not referenced if RANGE = ‘A’ or ‘V’.

in
abstol

The absolute error tolerance for the eigenvalues.

out
m

The total number of eigenvalues found. 0 <= m <= n.

out
W

Double precision array, dimension (n). On normal exit, the first m elements contain the selected eigenvalues in ascending order.

out
Z

Complex array, dimension (ldz, n). If JOBZ = ‘V’, the first m columns of Z contain the orthonormal eigenvectors.

in
ldz

The leading dimension of the array Z. ldz >= 1, and if JOBZ = ‘V’, ldz >= max(1,n).

out
work

Complex array, dimension (2*n).

out
rwork

Double precision array, dimension (7*n).

out
iwork

Integer array, dimension (5*n).

out
ifail

Integer array, dimension (n). If JOBZ = ‘V’, then if info = 0, the first m elements of IFAIL are zero. If info > 0, then IFAIL contains the indices of the eigenvectors that failed to converge.

out
info

= 0: successful exit < 0: if info = -i, the i-th argument had an illegal value > 0: ZPPTRF or ZHPEVX returned an error code.