ggev#

Functions

void sggev(
    const char*          jobvl,
    const char*          jobvr,
    const INT            n,
          f32*  restrict A,
    const INT            lda,
          f32*  restrict B,
    const INT            ldb,
          f32*  restrict alphar,
          f32*  restrict alphai,
          f32*  restrict beta,
          f32*  restrict VL,
    const INT            ldvl,
          f32*  restrict VR,
    const INT            ldvr,
          f32*  restrict work,
    const INT            lwork,
          INT*           info
);
void sggev(const char *jobvl, const char *jobvr, const INT n, f32 *restrict A, const INT lda, f32 *restrict B, const INT ldb, f32 *restrict alphar, f32 *restrict alphai, f32 *restrict beta, f32 *restrict VL, const INT ldvl, f32 *restrict VR, const INT ldvr, f32 *restrict work, const INT lwork, INT *info)#

SGGEV computes for a pair of N-by-N real nonsymmetric matrices (A,B) the generalized eigenvalues, and optionally, the left and/or right generalized eigenvectors.

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

Parameters

in
jobvl

= ‘N’: do not compute the left generalized eigenvectors; = ‘V’: compute the left generalized eigenvectors.

in
jobvr

= ‘N’: do not compute the right generalized eigenvectors; = ‘V’: compute the right generalized eigenvectors.

in
n

The order of the matrices A, B, VL, and VR. n >= 0.

inout
A

On entry, the matrix A in the pair (A,B). On exit, A has been overwritten.

in
lda

The leading dimension of A. lda >= max(1,n).

inout
B

On entry, the matrix B in the pair (A,B). On exit, B has been overwritten.

in
ldb

The leading dimension of B. ldb >= max(1,n).

out
alphar

Real parts of generalized eigenvalues.

out
alphai

Imaginary parts of generalized eigenvalues.

out
beta

Beta values of generalized eigenvalues.

out
VL

If jobvl = ‘V’, the left eigenvectors.

in
ldvl

The leading dimension of VL. ldvl >= 1, and if jobvl = ‘V’, ldvl >= n.

out
VR

If jobvr = ‘V’, the right eigenvectors.

in
ldvr

The leading dimension of VR. ldvr >= 1, and if jobvr = ‘V’, ldvr >= n.

out
work

Workspace array, dimension (max(1,lwork)).

in
lwork

The dimension of work. lwork >= max(1,8*n). If lwork = -1, a workspace query is assumed.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • = 1,…,n: the QZ iteration failed

  • > n: other errors

Functions

void dggev(
    const char*          jobvl,
    const char*          jobvr,
    const INT            n,
          f64*  restrict A,
    const INT            lda,
          f64*  restrict B,
    const INT            ldb,
          f64*  restrict alphar,
          f64*  restrict alphai,
          f64*  restrict beta,
          f64*  restrict VL,
    const INT            ldvl,
          f64*  restrict VR,
    const INT            ldvr,
          f64*  restrict work,
    const INT            lwork,
          INT*           info
);
void dggev(const char *jobvl, const char *jobvr, const INT n, f64 *restrict A, const INT lda, f64 *restrict B, const INT ldb, f64 *restrict alphar, f64 *restrict alphai, f64 *restrict beta, f64 *restrict VL, const INT ldvl, f64 *restrict VR, const INT ldvr, f64 *restrict work, const INT lwork, INT *info)#

DGGEV computes for a pair of N-by-N real nonsymmetric matrices (A,B) the generalized eigenvalues, and optionally, the left and/or right generalized eigenvectors.

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

Parameters

in
jobvl

= ‘N’: do not compute the left generalized eigenvectors; = ‘V’: compute the left generalized eigenvectors.

in
jobvr

= ‘N’: do not compute the right generalized eigenvectors; = ‘V’: compute the right generalized eigenvectors.

in
n

The order of the matrices A, B, VL, and VR. n >= 0.

inout
A

On entry, the matrix A in the pair (A,B). On exit, A has been overwritten.

in
lda

The leading dimension of A. lda >= max(1,n).

inout
B

On entry, the matrix B in the pair (A,B). On exit, B has been overwritten.

in
ldb

The leading dimension of B. ldb >= max(1,n).

out
alphar

Real parts of generalized eigenvalues.

out
alphai

Imaginary parts of generalized eigenvalues.

out
beta

Beta values of generalized eigenvalues.

out
VL

If jobvl = ‘V’, the left eigenvectors.

in
ldvl

The leading dimension of VL. ldvl >= 1, and if jobvl = ‘V’, ldvl >= n.

out
VR

If jobvr = ‘V’, the right eigenvectors.

in
ldvr

The leading dimension of VR. ldvr >= 1, and if jobvr = ‘V’, ldvr >= n.

out
work

Workspace array, dimension (max(1,lwork)).

in
lwork

The dimension of work. lwork >= max(1,8*n). If lwork = -1, a workspace query is assumed.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • = 1,…,n: the QZ iteration failed

  • > n: other errors

Functions

void cggev(
    const char* jobvl,
    const char* jobvr,
    const INT   n,
          c64*  A,
    const INT   lda,
          c64*  B,
    const INT   ldb,
          c64*  alpha,
          c64*  beta,
          c64*  VL,
    const INT   ldvl,
          c64*  VR,
    const INT   ldvr,
          c64*  work,
    const INT   lwork,
          f32*  rwork,
          INT*  info
);
void cggev(const char *jobvl, const char *jobvr, const INT n, c64 *A, const INT lda, c64 *B, const INT ldb, c64 *alpha, c64 *beta, c64 *VL, const INT ldvl, c64 *VR, const INT ldvr, c64 *work, const INT lwork, f32 *rwork, INT *info)#

CGGEV computes for a pair of N-by-N complex nonsymmetric matrices (A,B), the generalized eigenvalues, and optionally, the left and/or right generalized eigenvectors.

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 generalized eigenvector v(j) corresponding to the generalized eigenvalue lambda(j) of (A,B) satisfies

         A * v(j) = lambda(j) * B * v(j).
The left generalized eigenvector u(j) corresponding to the generalized eigenvalues 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).

Parameters

in
jobvl

= ‘N’: do not compute the left generalized eigenvectors; = ‘V’: compute the left generalized eigenvectors.

in
jobvr

= ‘N’: do not compute the right generalized eigenvectors; = ‘V’: compute the right generalized eigenvectors.

in
n

The order of the matrices A, B, VL, and VR. n >= 0.

inout
A

On entry, the matrix A in the pair (A,B). On exit, A has been overwritten.

in
lda

The leading dimension of A. lda >= max(1,n).

inout
B

On entry, the matrix B in the pair (A,B). On exit, B has been overwritten.

in
ldb

The leading dimension of B. ldb >= max(1,n).

out
alpha

Complex array, dimension (n).

out
beta

Complex array, dimension (n). On exit, ALPHA(j)/BETA(j), j=1,…,N, will be the generalized eigenvalues.

out
VL

If jobvl = ‘V’, the left eigenvectors.

in
ldvl

The leading dimension of VL. ldvl >= 1, and if jobvl = ‘V’, ldvl >= n.

out
VR

If jobvr = ‘V’, the right eigenvectors.

in
ldvr

The leading dimension of VR. ldvr >= 1, and if jobvr = ‘V’, ldvr >= n.

out
work

Complex workspace array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of work. lwork >= max(1,2*n). If lwork = -1, a workspace query is assumed.

out
rwork

Single precision array, dimension (8*n).

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • = 1,…,n: the QZ iteration failed

  • > n: other errors

Functions

void zggev(
    const char* jobvl,
    const char* jobvr,
    const INT   n,
          c128* A,
    const INT   lda,
          c128* B,
    const INT   ldb,
          c128* alpha,
          c128* beta,
          c128* VL,
    const INT   ldvl,
          c128* VR,
    const INT   ldvr,
          c128* work,
    const INT   lwork,
          f64*  rwork,
          INT*  info
);
void zggev(const char *jobvl, const char *jobvr, const INT n, c128 *A, const INT lda, c128 *B, const INT ldb, c128 *alpha, c128 *beta, c128 *VL, const INT ldvl, c128 *VR, const INT ldvr, c128 *work, const INT lwork, f64 *rwork, INT *info)#

ZGGEV computes for a pair of N-by-N complex nonsymmetric matrices (A,B), the generalized eigenvalues, and optionally, the left and/or right generalized eigenvectors.

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 generalized eigenvector v(j) corresponding to the generalized eigenvalue lambda(j) of (A,B) satisfies

         A * v(j) = lambda(j) * B * v(j).
The left generalized eigenvector u(j) corresponding to the generalized eigenvalues 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).

Parameters

in
jobvl

= ‘N’: do not compute the left generalized eigenvectors; = ‘V’: compute the left generalized eigenvectors.

in
jobvr

= ‘N’: do not compute the right generalized eigenvectors; = ‘V’: compute the right generalized eigenvectors.

in
n

The order of the matrices A, B, VL, and VR. n >= 0.

inout
A

On entry, the matrix A in the pair (A,B). On exit, A has been overwritten.

in
lda

The leading dimension of A. lda >= max(1,n).

inout
B

On entry, the matrix B in the pair (A,B). On exit, B has been overwritten.

in
ldb

The leading dimension of B. ldb >= max(1,n).

out
alpha

Complex array, dimension (n).

out
beta

Complex array, dimension (n). On exit, ALPHA(j)/BETA(j), j=1,…,N, will be the generalized eigenvalues.

out
VL

If jobvl = ‘V’, the left eigenvectors.

in
ldvl

The leading dimension of VL. ldvl >= 1, and if jobvl = ‘V’, ldvl >= n.

out
VR

If jobvr = ‘V’, the right eigenvectors.

in
ldvr

The leading dimension of VR. ldvr >= 1, and if jobvr = ‘V’, ldvr >= n.

out
work

Complex workspace array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The dimension of work. lwork >= max(1,2*n). If lwork = -1, a workspace query is assumed.

out
rwork

Double precision array, dimension (8*n).

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • = 1,…,n: the QZ iteration failed

  • > n: other errors