Developer Reference for Intel® oneAPI Math Kernel Library for C
?hegst
Reduces a complex Hermitian positive-definite generalized eigenvalue problem to the standard form.
Syntax
lapack_int LAPACKE_chegst(int matrix_layout, lapack_int itype, char uplo, lapack_int n,
lapack_complex_float *a, lapack_int lda,
const lapack_complex_float *b, lapack_int ldb);
lapack_int LAPACKE_zhegst(int matrix_layout, lapack_int itype, char uplo, lapack_int n,
lapack_complex_double *a, lapack_int lda,
const lapack_complex_double *b, lapack_int ldb);
Include Files
mkl.h
Description
The routine reduces a complex Hermitian positive-definite generalized eigenvalue problem to standard form.
itype |
Problem |
Result |
|---|---|---|
1 |
\(Ax = \lambda Bx\) |
\(A\) overwritten by \((U^H)^{-1} A U^{-1}\) or \(L^{-1} A (L^H)^{-1}\) |
2 |
\(ABx = \lambda x\) |
\(A\) overwritten by \(U A U^H\) or \(L^H A L\) |
3 |
\(BAx = \lambda x\) |
\(A\) overwritten by \(U A U^H\) or \(L^H A L\) |
Before calling this routine, you must call ?potrf to compute the Cholesky factorization: \(B = U^H U\) or \(B = L L^H\) .
Input Parameters
itype
Must be 1 or 2 or 3.
If itype = 1 , the generalized eigenproblem is \(Az = \lambda Bz\) for uplo = 'U' : \(C = (U^H)^{-1} A U^{-1}\) ; for uplo = 'L' : \(C = L^{-1} A (L^H)^{-1}\) . If itype = 2 , the generalized eigenproblem is \(ABz = \lambda z\) for uplo = 'U' : \(C = U A U^H\) ; for uplo = 'L' : \(C = L^H A L\) . If itype = 3 , the generalized eigenproblem is \(BAz = \lambda z\) for uplo = 'U' : \(C = U A U^H\) ; for uplo = 'L' : \(C = L^H A L\) .
uplo
Must be ‘U’ or ‘L’ .
If uplo = 'U' , the array a stores the upper triangle of \(A\) ; you must supply \(B\) in the factored form \(B = U^H U\) . If uplo = 'L' , the array a stores the lower triangle of \(A\) ; you must supply \(B\) in the factored form \(B = L L^H\) .
n
The order of the matrices \(A\) and \(B\) ( n≥ 0 ).
- a , b
-
COMPLEX for chegst DOUBLE COMPLEX for zhegst . Arrays:
a (size max(1, lda * n )) contains the upper or lower triangle of \(A\) .
The second dimension of a must be at least max(1, n ).
b (size max(1, ldb * n )) contains the Cholesky-factored matrix \(B\) :
\(B = U^H U\) or \(B = L L^H\) (as returned by ?potrf ). The second dimension of b must be at least max(1, n ).
lda
The leading dimension of a ; at least max(1, n ).
ldb
The leading dimension of b ; at least max(1, n ).
Output Parameters
- a
-
The upper or lower triangle of \(A\) is overwritten by the upper or lower triangle of C , as specified by the arguments itype and uplo .
Return Values
This function returns a value info .
If info=0 , the execution is successful.
If info = -i , the i -th parameter had an illegal value.
LAPACK 95 Interface Notes
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.
Application Notes
Forming the reduced matrix C is a stable procedure. However, it involves implicit multiplication by \(B^{-1}\) (if itype = 1 ) or \(B\) (if itype = 2 or 3). When the routine is used as a step in the computation of eigenvalues and eigenvectors of the original problem, there may be a significant loss of accuracy if \(B\) is ill-conditioned with respect to inversion.
The approximate number of floating-point operations is \(n^3\) .