SUBROUTINE SGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI, * BETA, VL, LDVL, VR, LDVR, WORK, LDWORK, INFO) CHARACTER * 1 JOBVL, JOBVR INTEGER N, LDA, LDB, LDVL, LDVR, LDWORK, INFO REAL A(LDA,*), B(LDB,*), ALPHAR(*), ALPHAI(*), BETA(*), VL(LDVL,*), VR(LDVR,*), WORK(*) SUBROUTINE SGEGV_64( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, * ALPHAI, BETA, VL, LDVL, VR, LDVR, WORK, LDWORK, INFO) CHARACTER * 1 JOBVL, JOBVR INTEGER*8 N, LDA, LDB, LDVL, LDVR, LDWORK, INFO REAL A(LDA,*), B(LDB,*), ALPHAR(*), ALPHAI(*), BETA(*), VL(LDVL,*), VR(LDVR,*), WORK(*)
SUBROUTINE GEGV( JOBVL, JOBVR, [N], A, [LDA], B, [LDB], ALPHAR, * ALPHAI, BETA, VL, [LDVL], VR, [LDVR], [WORK], [LDWORK], [INFO]) CHARACTER(LEN=1) :: JOBVL, JOBVR INTEGER :: N, LDA, LDB, LDVL, LDVR, LDWORK, INFO REAL, DIMENSION(:) :: ALPHAR, ALPHAI, BETA, WORK REAL, DIMENSION(:,:) :: A, B, VL, VR SUBROUTINE GEGV_64( JOBVL, JOBVR, [N], A, [LDA], B, [LDB], ALPHAR, * ALPHAI, BETA, VL, [LDVL], VR, [LDVR], [WORK], [LDWORK], [INFO]) CHARACTER(LEN=1) :: JOBVL, JOBVR INTEGER(8) :: N, LDA, LDB, LDVL, LDVR, LDWORK, INFO REAL, DIMENSION(:) :: ALPHAR, ALPHAI, BETA, WORK REAL, DIMENSION(:,:) :: A, B, VL, VR
void sgegv(char jobvl, char jobvr, int n, float *a, int lda, float *b, int ldb, float *alphar, float *alphai, float *beta, float *vl, int ldvl, float *vr, int ldvr, int *info);
void sgegv_64(char jobvl, char jobvr, long n, float *a, long lda, float *b, long ldb, float *alphar, float *alphai, float *beta, float *vl, long ldvl, float *vr, long ldvr, long *info);
SGEGV computes for a pair of n-by-n real nonsymmetric matrices A and B, the generalized eigenvalues (alphar +/- alphai*i, beta), and optionally, the left and/or right generalized eigenvectors (VL and VR).
A generalized eigenvalue for a pair of matrices (A,B) is, roughly speaking, a scalar w or a ratio alpha/beta = w, such that A - w*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. A good beginning reference is the book, "Matrix Computations", by G. Golub & C. van Loan (Johns Hopkins U. Press)
A right generalized eigenvector corresponding to a generalized eigenvalue w for a pair of matrices (A,B) is a vector r such that (A - w B) r = 0 . A left generalized eigenvector is a vector l such that l**H * (A - w B) = 0, where l**H is the
conjugate-transpose of l.
Note: this routine performs ``full balancing'' on A and B -- see ``Further Details'', below.
Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(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, ALPHAR and ALPHAI 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 LDWORK = -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 LDWORK is issued by XERBLA.