?hegst

Reduces a complex Hermitian-definite generalized eigenvalue problem to the standard form.

Syntax

FORTRAN 77:

call chegst(itype, uplo, n, a, lda, b, ldb, info)

call zhegst(itype, uplo, n, a, lda, b, ldb, info)

FORTRAN 95:

call hegst(a, b [,itype] [,uplo] [,info])

C:

lapack_int LAPACKE_<?>hegst( int matrix_order, lapack_int itype, char uplo, lapack_int n, <datatype>* a, lapack_int lda, const <datatype>* b, lapack_int ldb );

Include Files

Description

The routine reduces complex Hermitian-definite generalized eigenvalue problems

A*x = λ*B*x, A*B*x = λ*x, or B*A*x = λ*x.

to the standard form Cy = λy. Here the matrix A is complex Hermitian, and B is complex Hermitian positive-definite. Before calling this routine, you must call ?potrf to compute the Cholesky factorization: B = UH*U or B = L*LH.

Input Parameters

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.

itype

INTEGER. Must be 1 or 2 or 3.

If itype = 1, the generalized eigenproblem is A*z = lambda*B*z

for uplo = 'U': C = (UH)-1*A*U-1, z = inv(U)*y;

for uplo = 'L': C = L-1*A*(LH)-1, z = (LH)-1*y.

If itype = 2, the generalized eigenproblem is A*B*z = lambda*z

for uplo = 'U': C = U*A*UH, z = U-1*y;

for uplo = 'L': C = LH*A*L, z = (LH)-1*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.

uplo

CHARACTER*1. 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 = UH*U.

If uplo = 'L', the array a stores the lower triangle of A; you must supply B in the factored form B = L*LH.

n

INTEGER. The order of the matrices A and B (n 0).

a, b

COMPLEX for chegstDOUBLE COMPLEX for zhegst.

Arrays:

a(lda,*) contains the upper or lower triangle of A.

The second dimension of a must be at least max(1, n).

b(ldb,*) contains the Cholesky-factored matrix B:

B = UH*U or B = L*LH (as returned by ?potrf).

The second dimension of b must be at least max(1, n).

lda

INTEGER. The leading dimension of a; at least max(1, n).

ldb

INTEGER. 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.

info

INTEGER.

If info = 0, the execution is successful.

If info = -i, the i-th parameter had an illegal value.

Fortran 95 Interface Notes

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 hegst interface are the following:

a

Holds the matrix A of size (n,n).

b

Holds the matrix B of size (n,n).

itype

Must be 1, 2, or 3. The default value is 1.

uplo

Must be 'U' or 'L'. The default value is 'U'.

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 n3.


Submit feedback on this help topic