SUBROUTINE CGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB, * ALPHA, BETA, VL, LDVL, VR, LDVR, ILO, IHI, LSCALE, RSCALE, ABNRM, * BBNRM, RCONDE, RCONDV, WORK, LWORK, RWORK, IWORK, BWORK, INFO) CHARACTER * 1 BALANC, JOBVL, JOBVR, SENSE COMPLEX A(LDA,*), B(LDB,*), ALPHA(*), BETA(*), VL(LDVL,*), VR(LDVR,*), WORK(*) INTEGER N, LDA, LDB, LDVL, LDVR, ILO, IHI, LWORK, INFO INTEGER IWORK(*) LOGICAL BWORK(*) REAL ABNRM, BBNRM REAL LSCALE(*), RSCALE(*), RCONDE(*), RCONDV(*), RWORK(*) SUBROUTINE CGGEVX_64( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, * LDB, ALPHA, BETA, VL, LDVL, VR, LDVR, ILO, IHI, LSCALE, RSCALE, * ABNRM, BBNRM, RCONDE, RCONDV, WORK, LWORK, RWORK, IWORK, BWORK, * INFO) CHARACTER * 1 BALANC, JOBVL, JOBVR, SENSE COMPLEX A(LDA,*), B(LDB,*), ALPHA(*), BETA(*), VL(LDVL,*), VR(LDVR,*), WORK(*) INTEGER*8 N, LDA, LDB, LDVL, LDVR, ILO, IHI, LWORK, INFO INTEGER*8 IWORK(*) LOGICAL*8 BWORK(*) REAL ABNRM, BBNRM REAL LSCALE(*), RSCALE(*), RCONDE(*), RCONDV(*), RWORK(*)
SUBROUTINE GGEVX( BALANC, JOBVL, JOBVR, SENSE, [N], A, [LDA], B, * [LDB], ALPHA, BETA, VL, [LDVL], VR, [LDVR], ILO, IHI, LSCALE, * RSCALE, ABNRM, BBNRM, RCONDE, RCONDV, [WORK], [LWORK], [RWORK], * [IWORK], [BWORK], [INFO]) CHARACTER(LEN=1) :: BALANC, JOBVL, JOBVR, SENSE COMPLEX, DIMENSION(:) :: ALPHA, BETA, WORK COMPLEX, DIMENSION(:,:) :: A, B, VL, VR INTEGER :: N, LDA, LDB, LDVL, LDVR, ILO, IHI, LWORK, INFO INTEGER, DIMENSION(:) :: IWORK LOGICAL, DIMENSION(:) :: BWORK REAL :: ABNRM, BBNRM REAL, DIMENSION(:) :: LSCALE, RSCALE, RCONDE, RCONDV, RWORK SUBROUTINE GGEVX_64( BALANC, JOBVL, JOBVR, SENSE, [N], A, [LDA], B, * [LDB], ALPHA, BETA, VL, [LDVL], VR, [LDVR], ILO, IHI, LSCALE, * RSCALE, ABNRM, BBNRM, RCONDE, RCONDV, [WORK], [LWORK], [RWORK], * [IWORK], [BWORK], [INFO]) CHARACTER(LEN=1) :: BALANC, JOBVL, JOBVR, SENSE COMPLEX, DIMENSION(:) :: ALPHA, BETA, WORK COMPLEX, DIMENSION(:,:) :: A, B, VL, VR INTEGER(8) :: N, LDA, LDB, LDVL, LDVR, ILO, IHI, LWORK, INFO INTEGER(8), DIMENSION(:) :: IWORK LOGICAL(8), DIMENSION(:) :: BWORK REAL :: ABNRM, BBNRM REAL, DIMENSION(:) :: LSCALE, RSCALE, RCONDE, RCONDV, RWORK
void cggevx(char balanc, char jobvl, char jobvr, char sense, int n, complex *a, int lda, complex *b, int ldb, complex *alpha, complex *beta, complex *vl, int ldvl, complex *vr, int ldvr, int *ilo, int *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, int *info);
void cggevx_64(char balanc, char jobvl, char jobvr, char sense, long n, complex *a, long lda, complex *b, long ldb, complex *alpha, complex *beta, complex *vl, long ldvl, complex *vr, long ldvr, long *ilo, long *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, long *info);
Optionally, it also computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors (ILO, IHI, LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for the eigenvalues (RCONDE), and reciprocal condition numbers for the right eigenvectors (RCONDV).
A generalized eigenvalue for a pair of matrices (A,B) is a scalar lambda or a ratio alpha/beta = lambda, such that A - lambda*B is singular. It is usually represented as the pair (alpha,beta), as there is a reasonable interpretation for beta=0, and even for both being zero.
The right eigenvector v(j) corresponding to the eigenvalue lambda(j) of (A,B) satisfies
A * v(j) = lambda(j) * B * v(j) .
The left eigenvector u(j) corresponding to the eigenvalue lambda(j) of (A,B) satisfies
u(j)**H * A = lambda(j) * u(j)**H * B.
where u(j)**H is the conjugate-transpose of u(j).
Note: the quotient ALPHA(j)/BETA(j) ) may easily over- or underflow, and BETA(j) may even be zero. Thus, the user should avoid naively computing the ratio ALPHA/BETA. However, ALPHA will be always less than and usually comparable with norm(A) in magnitude, and BETA always less than and usually comparable with norm(B).
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.