gges3#

Functions

void sgges3(
    const char*               jobvsl,
    const char*               jobvsr,
    const char*               sort,
          sselect3_t          selctg,
    const INT                 n,
          f32*       restrict A,
    const INT                 lda,
          f32*       restrict B,
    const INT                 ldb,
          INT*                sdim,
          f32*       restrict alphar,
          f32*       restrict alphai,
          f32*       restrict beta,
          f32*       restrict VSL,
    const INT                 ldvsl,
          f32*       restrict VSR,
    const INT                 ldvsr,
          f32*       restrict work,
    const INT                 lwork,
          INT*       restrict bwork,
          INT*                info
);
void sgges3(const char *jobvsl, const char *jobvsr, const char *sort, sselect3_t selctg, const INT n, f32 *restrict A, const INT lda, f32 *restrict B, const INT ldb, INT *sdim, f32 *restrict alphar, f32 *restrict alphai, f32 *restrict beta, f32 *restrict VSL, const INT ldvsl, f32 *restrict VSR, const INT ldvsr, f32 *restrict work, const INT lwork, INT *restrict bwork, INT *info)#

SGGES3 computes for a pair of N-by-N real nonsymmetric matrices (A,B), the generalized eigenvalues, the generalized real Schur form (S,T), optionally, the left and/or right matrices of Schur vectors (VSL and VSR).

This gives the generalized Schur factorization

     (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T )
Optionally, it also orders the eigenvalues so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix S and the upper triangular matrix T.

Parameters

in
jobvsl

= ‘N’: do not compute the left Schur vectors; = ‘V’: compute the left Schur vectors.

in
jobvsr

= ‘N’: do not compute the right Schur vectors; = ‘V’: compute the right Schur vectors.

in
sort

= ‘N’: Eigenvalues are not ordered; = ‘S’: Eigenvalues are ordered (see selctg).

in
selctg

Selection function. If sort = ‘S’, selctg is used to select eigenvalues to sort to the top left of the Schur form. If sort = ‘N’, selctg is not referenced.

in
n

The order of the matrices A, B, VSL, and VSR. n >= 0.

inout
A

On entry, the first of the pair of matrices. On exit, A has been overwritten by its Schur form S.

in
lda

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

inout
B

On entry, the second of the pair of matrices. On exit, B has been overwritten by its Schur form T.

in
ldb

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

out
sdim

If sort = ‘N’, sdim = 0. If sort = ‘S’, sdim = number of eigenvalues for which selctg is true.

out
alphar

Real parts of generalized eigenvalues.

out
alphai

Imaginary parts of generalized eigenvalues.

out
beta

Beta values of generalized eigenvalues.

out
VSL

If jobvsl = ‘V’, the left Schur vectors.

in
ldvsl

The leading dimension of VSL.

out
VSR

If jobvsr = ‘V’, the right Schur vectors.

in
ldvsr

The leading dimension of VSR.

out
work

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

in
lwork

The dimension of work.

out
bwork

Integer array, dimension (n). Not referenced if sort = ‘N’.

out
info

  • = 0: successful exit

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

  • > 0: errors from QZ iteration or reordering

Functions

void dgges3(
    const char*               jobvsl,
    const char*               jobvsr,
    const char*               sort,
          dselect3_t          selctg,
    const INT                 n,
          f64*       restrict A,
    const INT                 lda,
          f64*       restrict B,
    const INT                 ldb,
          INT*                sdim,
          f64*       restrict alphar,
          f64*       restrict alphai,
          f64*       restrict beta,
          f64*       restrict VSL,
    const INT                 ldvsl,
          f64*       restrict VSR,
    const INT                 ldvsr,
          f64*       restrict work,
    const INT                 lwork,
          INT*       restrict bwork,
          INT*                info
);
void dgges3(const char *jobvsl, const char *jobvsr, const char *sort, dselect3_t selctg, const INT n, f64 *restrict A, const INT lda, f64 *restrict B, const INT ldb, INT *sdim, f64 *restrict alphar, f64 *restrict alphai, f64 *restrict beta, f64 *restrict VSL, const INT ldvsl, f64 *restrict VSR, const INT ldvsr, f64 *restrict work, const INT lwork, INT *restrict bwork, INT *info)#

DGGES3 computes for a pair of N-by-N real nonsymmetric matrices (A,B), the generalized eigenvalues, the generalized real Schur form (S,T), optionally, the left and/or right matrices of Schur vectors (VSL and VSR).

This gives the generalized Schur factorization

     (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T )
Optionally, it also orders the eigenvalues so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix S and the upper triangular matrix T.

Parameters

in
jobvsl

= ‘N’: do not compute the left Schur vectors; = ‘V’: compute the left Schur vectors.

in
jobvsr

= ‘N’: do not compute the right Schur vectors; = ‘V’: compute the right Schur vectors.

in
sort

= ‘N’: Eigenvalues are not ordered; = ‘S’: Eigenvalues are ordered (see selctg).

in
selctg

Selection function. If sort = ‘S’, selctg is used to select eigenvalues to sort to the top left of the Schur form. If sort = ‘N’, selctg is not referenced.

in
n

The order of the matrices A, B, VSL, and VSR. n >= 0.

inout
A

On entry, the first of the pair of matrices. On exit, A has been overwritten by its Schur form S.

in
lda

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

inout
B

On entry, the second of the pair of matrices. On exit, B has been overwritten by its Schur form T.

in
ldb

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

out
sdim

If sort = ‘N’, sdim = 0. If sort = ‘S’, sdim = number of eigenvalues for which selctg is true.

out
alphar

Real parts of generalized eigenvalues.

out
alphai

Imaginary parts of generalized eigenvalues.

out
beta

Beta values of generalized eigenvalues.

out
VSL

If jobvsl = ‘V’, the left Schur vectors.

in
ldvsl

The leading dimension of VSL.

out
VSR

If jobvsr = ‘V’, the right Schur vectors.

in
ldvsr

The leading dimension of VSR.

out
work

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

in
lwork

The dimension of work.

out
bwork

Integer array, dimension (n). Not referenced if sort = ‘N’.

out
info

  • = 0: successful exit

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

  • > 0: errors from QZ iteration or reordering

Functions

void cgges3(
    const char*      jobvsl,
    const char*      jobvsr,
    const char*      sort,
          cselect2_t selctg,
    const INT        n,
          c64*       A,
    const INT        lda,
          c64*       B,
    const INT        ldb,
          INT*       sdim,
          c64*       alpha,
          c64*       beta,
          c64*       VSL,
    const INT        ldvsl,
          c64*       VSR,
    const INT        ldvsr,
          c64*       work,
    const INT        lwork,
          f32*       rwork,
          INT*       bwork,
          INT*       info
);
void cgges3(const char *jobvsl, const char *jobvsr, const char *sort, cselect2_t selctg, const INT n, c64 *A, const INT lda, c64 *B, const INT ldb, INT *sdim, c64 *alpha, c64 *beta, c64 *VSL, const INT ldvsl, c64 *VSR, const INT ldvsr, c64 *work, const INT lwork, f32 *rwork, INT *bwork, INT *info)#

CGGES3 computes for a pair of N-by-N complex nonsymmetric matrices (A,B), the generalized eigenvalues, the generalized complex Schur form (S, T), and optionally left and/or right Schur vectors (VSL and VSR).

This gives the generalized Schur factorization

 (A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H )
where (VSR)**H is the conjugate-transpose of VSR.

Optionally, it also orders the eigenvalues so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper triangular matrix S and the upper triangular matrix T. The leading columns of VSL and VSR then form an unitary basis for the corresponding left and right eigenspaces (deflating subspaces).

(If only the generalized eigenvalues are needed, use the driver CGGEV instead, which is faster.)

A generalized eigenvalue for a pair of matrices (A,B) is 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 pair of matrices (S,T) is in generalized complex Schur form if S and T are upper triangular and, in addition, the diagonal elements of T are non-negative real numbers.

Parameters

in
jobvsl

= ‘N’: do not compute the left Schur vectors; = ‘V’: compute the left Schur vectors.

in
jobvsr

= ‘N’: do not compute the right Schur vectors; = ‘V’: compute the right Schur vectors.

in
sort

= ‘N’: Eigenvalues are not ordered; = ‘S’: Eigenvalues are ordered (see selctg).

in
selctg

Selection function. If sort = ‘S’, selctg is used to select eigenvalues to sort to the top left of the Schur form. If sort = ‘N’, selctg is not referenced.

in
n

The order of the matrices A, B, VSL, and VSR. n >= 0.

inout
A

On entry, the first of the pair of matrices. On exit, A has been overwritten by its generalized Schur form S.

in
lda

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

inout
B

On entry, the second of the pair of matrices. On exit, B has been overwritten by its generalized Schur form T.

in
ldb

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

out
sdim

If sort = ‘N’, sdim = 0. If sort = ‘S’, sdim = number of eigenvalues for which selctg is true.

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
VSL

If jobvsl = ‘V’, the left Schur vectors.

in
ldvsl

The leading dimension of VSL.

out
VSR

If jobvsr = ‘V’, the right Schur vectors.

in
ldvsr

The leading dimension of VSR.

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
bwork

Integer array, dimension (n). Not referenced if sort = ‘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+1: other than QZ iteration failed in CLAQZ0

  • = n+2: after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Generalized Schur form no longer satisfy SELCTG=.TRUE.

  • = n+3: reordering failed in CTGSEN

Functions

void zgges3(
    const char*      jobvsl,
    const char*      jobvsr,
    const char*      sort,
          zselect2_t selctg,
    const INT        n,
          c128*      A,
    const INT        lda,
          c128*      B,
    const INT        ldb,
          INT*       sdim,
          c128*      alpha,
          c128*      beta,
          c128*      VSL,
    const INT        ldvsl,
          c128*      VSR,
    const INT        ldvsr,
          c128*      work,
    const INT        lwork,
          f64*       rwork,
          INT*       bwork,
          INT*       info
);
void zgges3(const char *jobvsl, const char *jobvsr, const char *sort, zselect2_t selctg, const INT n, c128 *A, const INT lda, c128 *B, const INT ldb, INT *sdim, c128 *alpha, c128 *beta, c128 *VSL, const INT ldvsl, c128 *VSR, const INT ldvsr, c128 *work, const INT lwork, f64 *rwork, INT *bwork, INT *info)#

ZGGES3 computes for a pair of N-by-N complex nonsymmetric matrices (A,B), the generalized eigenvalues, the generalized complex Schur form (S, T), and optionally left and/or right Schur vectors (VSL and VSR).

This gives the generalized Schur factorization

 (A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H )
where (VSR)**H is the conjugate-transpose of VSR.

Optionally, it also orders the eigenvalues so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper triangular matrix S and the upper triangular matrix T. The leading columns of VSL and VSR then form an unitary basis for the corresponding left and right eigenspaces (deflating subspaces).

(If only the generalized eigenvalues are needed, use the driver ZGGEV instead, which is faster.)

A generalized eigenvalue for a pair of matrices (A,B) is 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 pair of matrices (S,T) is in generalized complex Schur form if S and T are upper triangular and, in addition, the diagonal elements of T are non-negative real numbers.

Parameters

in
jobvsl

= ‘N’: do not compute the left Schur vectors; = ‘V’: compute the left Schur vectors.

in
jobvsr

= ‘N’: do not compute the right Schur vectors; = ‘V’: compute the right Schur vectors.

in
sort

= ‘N’: Eigenvalues are not ordered; = ‘S’: Eigenvalues are ordered (see selctg).

in
selctg

Selection function. If sort = ‘S’, selctg is used to select eigenvalues to sort to the top left of the Schur form. If sort = ‘N’, selctg is not referenced.

in
n

The order of the matrices A, B, VSL, and VSR. n >= 0.

inout
A

On entry, the first of the pair of matrices. On exit, A has been overwritten by its generalized Schur form S.

in
lda

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

inout
B

On entry, the second of the pair of matrices. On exit, B has been overwritten by its generalized Schur form T.

in
ldb

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

out
sdim

If sort = ‘N’, sdim = 0. If sort = ‘S’, sdim = number of eigenvalues for which selctg is true.

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
VSL

If jobvsl = ‘V’, the left Schur vectors.

in
ldvsl

The leading dimension of VSL.

out
VSR

If jobvsr = ‘V’, the right Schur vectors.

in
ldvsr

The leading dimension of VSR.

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
bwork

Integer array, dimension (n). Not referenced if sort = ‘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+1: other than QZ iteration failed in ZLAQZ0

  • = n+2: after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Generalized Schur form no longer satisfy SELCTG=.TRUE.

  • = n+3: reordering failed in ZTGSEN