(S|D|C|Z)GGES¶
Single, double, single complex, and double complex GGES.
Description¶
Computes the generalized eigenvalues, Schur form, and (optionally) Schur vectors of a general matrix.
Given two N by N matrices A and B, computes the generalized Schur factorization:

The output matrix S will be upper block triangular with blocks of size 1x1 or 2x2. Blocks of size 2x2 will only occur in SGGES and DGGES and represent a complex conjugate pair of generalized eigenvalues. The output matrix T will be upper triangular with non-negative diagonal.
A generalized eigenvalue is a solution to the equation:

Generalized eigenvalues are represented as a ratio ALPHA / BETA with separate storage for ALPHA and BETA for increased numerical flexibility.
LAPACK Interface¶
void sgges(const char *JOBVSL, const char *JOBVSR, const char *SORT,
void *SELCTG, const qml_long *N, float *A, const qml_long *LDA,
float *B, const qml_long *LDB, qml_long *SDIM, float *ALPHAR,
float *ALPHAI, float *BETA, float *VSL, const qml_long *LDVSL,
float *VSR, const qml_long *LDVSR, float *WORK, const qml_long *LWORK,
qml_int *BWORK, qml_long *INFO);
void dgges(const char *JOBVSL, const char *JOBVSR, const char *SORT,
void *SELCTG, const qml_long *N, double *A, const qml_long *LDA,
double *B, const qml_long *LDB, qml_long *SDIM, double *ALPHAR,
double *ALPHAI, double *BETA, double *VSL, const qml_long *LDVSL,
double *VSR, const qml_long *LDVSR, double *WORK, const qml_long *LWORK,
qml_int *BWORK, qml_long *INFO);
void cgges(const char *JOBVSL, const char *JOBVSR, const char *SORT,
void *SELCTG, const qml_long *N, qml_single_complex *A,
const qml_long *LDA, qml_single_complex *B, const qml_long *LDB,
qml_long *SDIM, qml_single_complex *ALPHA, qml_single_complex *BETA,
qml_single_complex *VSL, const qml_long *LDVSL, qml_single_complex *VSR,
const qml_long *LDVSR, qml_single_complex *WORK, const qml_long *LWORK,
float *RWORK, qml_int *BWORK, qml_long *INFO);
void zgges(const char *JOBVSL, const char *JOBVSR, const char *SORT,
void *SELCTG, const qml_long *N, qml_double_complex *A,
const qml_long *LDA, qml_double_complex *B, const qml_long *LDB,
qml_long *SDIM, qml_double_complex *ALPHA, qml_double_complex *BETA,
qml_double_complex *VSL, const qml_long *LDVSL, qml_double_complex *VSR,
const qml_long *LDVSR, qml_double_complex *WORK, const qml_long *LWORK,
double *RWORK, qml_int *BWORK, qml_long *INFO);
Arguments¶
| JOBVSL | Compute VSL if ‘V’, otherwise do not compute |
| JOBVSR | Compute VSR if ‘V’, otherwise do not compute |
| SORT | Sort eigenvalues, only ‘N’ supported |
| SELCTG | Function pointers, not supported (pass NULL) |
| N | Number of rows and columns of A, B, VSL, and VSR |
| A | Matrix of size N x N, overwritten with S on output |
| LDA | Leading dimension of A |
| B | Matrix of size N x N, overwritten with T on output |
| LDB | Leading dimension of B |
| SDIM | Not used |
| ALPHA | On exit contains generalized eigenvalues |
| ALPHAR | Real part of ALPHA for real versions |
| ALPHAI | Complex part of ALPHA for real version |
| VSL | On exit contains left Schur vectors if JOBVSL is ‘V’ |
| LDVSL | Leading dimension of VSL |
| VSR | On exit contains right Schur vectors if JOBVSR is ‘V’ |
| LDVSR | Leading dimension of VSR |
| WORK | Work space of size at least LWORK |
| LWORK | Size of work space, at least 2N but optimally a larger multiple of N (-1 to query) |
| RWORK | Work space of size 8N |
| BWORK | Not used |
| INFO | 0 on success |