hpgvd#
Functions
-
void chpgvd(const INT itype, const char *jobz, const char *uplo, const INT n, c64 *restrict AP, c64 *restrict BP, 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)#
CHPGVD computes all the eigenvalues and, optionally, the 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. If eigenvectors are desired, it uses a divide and conquer algorithm.
Parameters
initypeSpecifies the problem type to be solved: = 1: A*x = (lambda)*B*x = 2: A*B*x = (lambda)*x = 3: B*A*x = (lambda)*x
injobz= ‘N’: Compute eigenvalues only; = ‘V’: Compute eigenvalues and eigenvectors.
inuplo= ‘U’: Upper triangles of A and B are stored; = ‘L’: Lower triangles of A and B are stored.
innThe order of the matrices A and B. n >= 0.
inoutAPComplex 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.
inoutBPComplex array, dimension (n*(n+1)/2). On entry, the upper or lower triangle of the Hermitian positive definite matrix B, packed columnwise. On exit, the triangular factor U or L from the Cholesky factorization B = U**H*U or B = L*L**H.
outWSingle precision array, dimension (n). If info = 0, the eigenvalues in ascending order.
outZComplex array, dimension (ldz, n). If jobz = ‘V’, then if info = 0, Z contains the matrix Z of eigenvectors.
inldzThe leading dimension of the array Z. ldz >= 1, and if jobz = ‘V’, ldz >= max(1,n).
outworkComplex array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the required lwork.
inlworkThe 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. If lwork = -1, then a workspace query is assumed.
outrworkSingle precision array, dimension (max(1,lrwork)). On exit, if info = 0, rwork[0] returns the required lrwork.
inlrworkThe 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.
outiworkInteger array, dimension (max(1,liwork)). On exit, if info = 0, iwork[0] returns the required liwork.
inliworkThe 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.
outinfo= 0: successful exit < 0: if info = -i, the i-th argument had an illegal value > 0: CPPTRF or CHPEVD returned an error code: <= n: if info = i, CHPEVD failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero; > n: if info = n + i, for 1 <= i <= n, then the leading principal minor of order i of B is not positive.
void chpgvd(
const INT itype,
const char* jobz,
const char* uplo,
const INT n,
c64* restrict AP,
c64* restrict BP,
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
);
Functions
-
void zhpgvd(const INT itype, const char *jobz, const char *uplo, const INT n, c128 *restrict AP, c128 *restrict BP, 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)#
ZHPGVD computes all the eigenvalues and, optionally, the 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. If eigenvectors are desired, it uses a divide and conquer algorithm.
Parameters
initypeSpecifies the problem type to be solved: = 1: A*x = (lambda)*B*x = 2: A*B*x = (lambda)*x = 3: B*A*x = (lambda)*x
injobz= ‘N’: Compute eigenvalues only; = ‘V’: Compute eigenvalues and eigenvectors.
inuplo= ‘U’: Upper triangles of A and B are stored; = ‘L’: Lower triangles of A and B are stored.
innThe order of the matrices A and B. n >= 0.
inoutAPComplex 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.
inoutBPComplex array, dimension (n*(n+1)/2). On entry, the upper or lower triangle of the Hermitian positive definite matrix B, packed columnwise. On exit, the triangular factor U or L from the Cholesky factorization B = U**H*U or B = L*L**H.
outWDouble precision array, dimension (n). If info = 0, the eigenvalues in ascending order.
outZComplex array, dimension (ldz, n). If jobz = ‘V’, then if info = 0, Z contains the matrix Z of eigenvectors.
inldzThe leading dimension of the array Z. ldz >= 1, and if jobz = ‘V’, ldz >= max(1,n).
outworkComplex array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the required lwork.
inlworkThe 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. If lwork = -1, then a workspace query is assumed.
outrworkDouble precision array, dimension (max(1,lrwork)). On exit, if info = 0, rwork[0] returns the required lrwork.
inlrworkThe 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.
outiworkInteger array, dimension (max(1,liwork)). On exit, if info = 0, iwork[0] returns the required liwork.
inliworkThe 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.
outinfo= 0: successful exit < 0: if info = -i, the i-th argument had an illegal value > 0: ZPPTRF or ZHPEVD returned an error code: <= n: if info = i, ZHPEVD failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero; > n: if info = n + i, for 1 <= i <= n, then the leading principal minor of order i of B is not positive.
void zhpgvd(
const INT itype,
const char* jobz,
const char* uplo,
const INT n,
c128* restrict AP,
c128* restrict BP,
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
);