Reduces a complex Hermitian-definite generalized eigenvalue problem to the standard form using packed storage.
FORTRAN 77:
call chpgst(itype, uplo, n, ap, bp, info)
call zhpgst(itype, uplo, n, ap, bp, info)
FORTRAN 95:
call hpgst(ap, bp [,itype] [,uplo] [,info])
C:
lapack_int LAPACKE_<?>hpgst( int matrix_order, lapack_int itype, char uplo, lapack_int n, <datatype>* ap, const <datatype>* bp );
The routine reduces real symmetric-definite generalized eigenproblems
A*z = λ*B*z, A*B*z = λ*z, or B*A*z = λ*z.
to the standard form C*y = λ*y, using packed matrix storage. Here A is a real symmetric matrix, and B is a real symmetric positive-definite matrix. Before calling this routine, you must call ?pptrf to compute the Cholesky factorization: B = UH*U or B = L*LH.
The data types are given for the Fortran interface. A <datatype> placeholder, if present, is used for the C interface data types in the C interface section above. See C Interface Conventions for the C interface principal conventions and type definitions.
INTEGER. Must be 1 or 2 or 3.
If itype = 1, the generalized eigenproblem is A*z = lambda*B*z
for uplo = 'U': C = inv(UH)*A*inv(U), z = inv(U)*y;
for uplo = 'L': C = inv(L)*A*inv(LH), z = inv(LH)*y.
If itype = 2, the generalized eigenproblem is A*B*z = lambda*z
for uplo = 'U': C = U*A*UH, z = inv(U)*y;
for uplo = 'L': C = LH*A*L, z = inv(LH)*y.
If itype = 3, the generalized eigenproblem is B*A*z = lambda*z
for uplo = 'U': C = U*A*UH, z = UH*y;
for uplo = 'L': C = LH*A*L, z = L*y.
CHARACTER*1. Must be 'U' or 'L'.
If uplo = 'U', ap stores the packed upper triangle of A; you must supply B in the factored form B = UH*U.
If uplo = 'L', ap stores the packed lower triangle of A; you must supply B in the factored form B = L*LH.
INTEGER. The order of the matrices A and B (n ≥ 0).
COMPLEX for chpgstDOUBLE COMPLEX for zhpgst.
Arrays:
ap(*) contains the packed upper or lower triangle of A.
The dimension of a must be at least max(1, n*(n+1)/2).
bp(*) contains the packed Cholesky factor of B (as returned by ?pptrf with the same uplo value).
The dimension of b must be at least max(1, n*(n+1)/2).
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.
INTEGER.
If info = 0, the execution is successful.
If info = -i, the i-th parameter had an illegal value.
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or restorable arguments, see Fortran 95 Interface Conventions.
Specific details for the routine hpgst interface are the following:
Holds the array A of size (n*(n+1)/2).
Holds the array B of size (n*(n+1)/2).
Must be 1, 2, or 3. The default value is 1.
Must be 'U' or 'L'. The default value is 'U'.
Forming the reduced matrix C is a stable procedure. However, it involves implicit multiplication by inv(B) (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 n3.