hegv#
Functions
-
void chegv(const INT itype, const char *jobz, const char *uplo, const INT n, c64 *restrict A, const INT lda, c64 *restrict B, const INT ldb, f32 *restrict W, c64 *restrict work, const INT lwork, f32 *restrict rwork, INT *info)#
CHEGV 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 and B is also positive definite.
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.
inoutAComplex*16 array, dimension (lda, n). On entry, the Hermitian matrix A. On exit, if jobz = ‘V’, then if info = 0, A contains the matrix Z of eigenvectors.
inldaThe leading dimension of the array A. lda >= max(1,n).
inoutBComplex*16 array, dimension (ldb, n). On entry, the Hermitian positive definite matrix B. On exit, if info <= n, the part of B containing the matrix is overwritten by the triangular factor U or L from the Cholesky factorization B = U**H*U or B = L*L**H.
inldbThe leading dimension of the array B. ldb >= max(1,n).
outWSingle precision array, dimension (n). If info = 0, the eigenvalues in ascending order.
outworkComplex*16 array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.
inlworkThe length of the array work. lwork >= max(1,2*n-1). For optimal efficiency, lwork >= (nb+1)*n, where nb is the blocksize for CHETRD. If lwork = -1, then a workspace query is assumed.
outrworkSingle precision array, dimension (max(1, 3*n-2)).
outinfo= 0: successful exit < 0: if info = -i, the i-th argument had an illegal value > 0: CPOTRF or CHEEV returned an error code: <= n: if info = i, CHEEV failed to converge; > n: if info = n + i, for 1 <= i <= n, then the leading principal minor of order i of B is not positive.
void chegv(
const INT itype,
const char* jobz,
const char* uplo,
const INT n,
c64* restrict A,
const INT lda,
c64* restrict B,
const INT ldb,
f32* restrict W,
c64* restrict work,
const INT lwork,
f32* restrict rwork,
INT* info
);
Functions
-
void zhegv(const INT itype, const char *jobz, const char *uplo, const INT n, c128 *restrict A, const INT lda, c128 *restrict B, const INT ldb, f64 *restrict W, c128 *restrict work, const INT lwork, f64 *restrict rwork, INT *info)#
ZHEGV 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 and B is also positive definite.
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.
inoutAComplex*16 array, dimension (lda, n). On entry, the Hermitian matrix A. On exit, if jobz = ‘V’, then if info = 0, A contains the matrix Z of eigenvectors.
inldaThe leading dimension of the array A. lda >= max(1,n).
inoutBComplex*16 array, dimension (ldb, n). On entry, the Hermitian positive definite matrix B. On exit, if info <= n, the part of B containing the matrix is overwritten by the triangular factor U or L from the Cholesky factorization B = U**H*U or B = L*L**H.
inldbThe leading dimension of the array B. ldb >= max(1,n).
outWDouble precision array, dimension (n). If info = 0, the eigenvalues in ascending order.
outworkComplex*16 array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.
inlworkThe length of the array work. lwork >= max(1,2*n-1). For optimal efficiency, lwork >= (nb+1)*n, where nb is the blocksize for ZHETRD. If lwork = -1, then a workspace query is assumed.
outrworkDouble precision array, dimension (max(1, 3*n-2)).
outinfo= 0: successful exit < 0: if info = -i, the i-th argument had an illegal value > 0: ZPOTRF or ZHEEV returned an error code: <= n: if info = i, ZHEEV failed to converge; > n: if info = n + i, for 1 <= i <= n, then the leading principal minor of order i of B is not positive.
void zhegv(
const INT itype,
const char* jobz,
const char* uplo,
const INT n,
c128* restrict A,
const INT lda,
c128* restrict B,
const INT ldb,
f64* restrict W,
c128* restrict work,
const INT lwork,
f64* restrict rwork,
INT* info
);