tgsen#

Functions

void stgsen(
    const INT           ijob,
    const INT           wantq,
    const INT           wantz,
    const INT* restrict select,
    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 Q,
    const INT           ldq,
          f32* restrict Z,
    const INT           ldz,
          INT*          m,
          f32*          pl,
          f32*          pr,
          f32* restrict dif,
          f32* restrict work,
    const INT           lwork,
          INT* restrict iwork,
    const INT           liwork,
          INT*          info
);
void stgsen(const INT ijob, const INT wantq, const INT wantz, const INT *restrict select, 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 Q, const INT ldq, f32 *restrict Z, const INT ldz, INT *m, f32 *pl, f32 *pr, f32 *restrict dif, f32 *restrict work, const INT lwork, INT *restrict iwork, const INT liwork, INT *info)#

STGSEN reorders the generalized real Schur decomposition of a real matrix pair (A, B) (in terms of an orthonormal equivalence trans- formation Q**T * (A, B) * Z), so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix A and the upper triangular B.

Parameters

in
ijob

Specifies whether condition numbers are required. = 0: Only reorder w.r.t. SELECT. No extras. = 1: Reciprocal of norms of “projections” (PL and PR). = 2: Upper bounds on Difu and Difl. = 3: Estimate of Difu and Difl. = 4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above). = 5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above).

in
wantq

If nonzero, update the left transformation matrix Q.

in
wantz

If nonzero, update the right transformation matrix Z.

in
select

Integer array of dimension (n). Specifies the eigenvalues in the selected cluster.

in
n

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

inout
A

Array of dimension (lda, n). Upper quasi-triangular matrix.

in
lda

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

inout
B

Array of dimension (ldb, n). Upper triangular matrix.

in
ldb

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

out
alphar

Array of dimension (n). Real parts of eigenvalues.

out
alphai

Array of dimension (n). Imaginary parts of eigenvalues.

out
beta

Array of dimension (n). Scale factors for eigenvalues.

inout
Q

Array of dimension (ldq, n). The orthogonal matrix Q.

in
ldq

The leading dimension of Q. ldq >= 1; if wantq, ldq >= n.

inout
Z

Array of dimension (ldz, n). The orthogonal matrix Z.

in
ldz

The leading dimension of Z. ldz >= 1; if wantz, ldz >= n.

out
m

The dimension of the specified pair of deflating subspaces.

out
pl

Lower bound on reciprocal of projection onto left eigenspace.

out
pr

Lower bound on reciprocal of projection onto right eigenspace.

out
dif

Array of dimension (2). Estimates of Difu and Difl.

out
work

Array of dimension (lwork).

in
lwork

The dimension of work. lwork >= 4*n+16.

out
iwork

Integer array of dimension (liwork).

in
liwork

The dimension of iwork. liwork >= 1.

out
info

  • = 0: successful exit

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

  • = 1: reordering failed

Functions

void dtgsen(
    const INT           ijob,
    const INT           wantq,
    const INT           wantz,
    const INT* restrict select,
    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 Q,
    const INT           ldq,
          f64* restrict Z,
    const INT           ldz,
          INT*          m,
          f64*          pl,
          f64*          pr,
          f64* restrict dif,
          f64* restrict work,
    const INT           lwork,
          INT* restrict iwork,
    const INT           liwork,
          INT*          info
);
void dtgsen(const INT ijob, const INT wantq, const INT wantz, const INT *restrict select, 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 Q, const INT ldq, f64 *restrict Z, const INT ldz, INT *m, f64 *pl, f64 *pr, f64 *restrict dif, f64 *restrict work, const INT lwork, INT *restrict iwork, const INT liwork, INT *info)#

DTGSEN reorders the generalized real Schur decomposition of a real matrix pair (A, B) (in terms of an orthonormal equivalence trans- formation Q**T * (A, B) * Z), so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix A and the upper triangular B.

Parameters

in
ijob

Specifies whether condition numbers are required. = 0: Only reorder w.r.t. SELECT. No extras. = 1: Reciprocal of norms of “projections” (PL and PR). = 2: Upper bounds on Difu and Difl. = 3: Estimate of Difu and Difl. = 4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above). = 5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above).

in
wantq

If nonzero, update the left transformation matrix Q.

in
wantz

If nonzero, update the right transformation matrix Z.

in
select

Integer array of dimension (n). Specifies the eigenvalues in the selected cluster.

in
n

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

inout
A

Array of dimension (lda, n). Upper quasi-triangular matrix.

in
lda

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

inout
B

Array of dimension (ldb, n). Upper triangular matrix.

in
ldb

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

out
alphar

Array of dimension (n). Real parts of eigenvalues.

out
alphai

Array of dimension (n). Imaginary parts of eigenvalues.

out
beta

Array of dimension (n). Scale factors for eigenvalues.

inout
Q

Array of dimension (ldq, n). The orthogonal matrix Q.

in
ldq

The leading dimension of Q. ldq >= 1; if wantq, ldq >= n.

inout
Z

Array of dimension (ldz, n). The orthogonal matrix Z.

in
ldz

The leading dimension of Z. ldz >= 1; if wantz, ldz >= n.

out
m

The dimension of the specified pair of deflating subspaces.

out
pl

Lower bound on reciprocal of projection onto left eigenspace.

out
pr

Lower bound on reciprocal of projection onto right eigenspace.

out
dif

Array of dimension (2). Estimates of Difu and Difl.

out
work

Array of dimension (lwork).

in
lwork

The dimension of work. lwork >= 4*n+16.

out
iwork

Integer array of dimension (liwork).

in
liwork

The dimension of iwork. liwork >= 1.

out
info

  • = 0: successful exit

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

  • = 1: reordering failed

Functions

void ctgsen(
    const INT           ijob,
    const INT           wantq,
    const INT           wantz,
    const INT* restrict select,
    const INT           n,
          c64*          A,
    const INT           lda,
          c64*          B,
    const INT           ldb,
          c64*          alpha,
          c64*          beta,
          c64*          Q,
    const INT           ldq,
          c64*          Z,
    const INT           ldz,
          INT*          m,
          f32*          pl,
          f32*          pr,
          f32*          dif,
          c64*          work,
    const INT           lwork,
          INT*          iwork,
    const INT           liwork,
          INT*          info
);
void ctgsen(const INT ijob, const INT wantq, const INT wantz, const INT *restrict select, const INT n, c64 *A, const INT lda, c64 *B, const INT ldb, c64 *alpha, c64 *beta, c64 *Q, const INT ldq, c64 *Z, const INT ldz, INT *m, f32 *pl, f32 *pr, f32 *dif, c64 *work, const INT lwork, INT *iwork, const INT liwork, INT *info)#

CTGSEN reorders the generalized Schur decomposition of a complex matrix pair (A, B) (in terms of an unitary equivalence trans- formation Q**H * (A, B) * Z), so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the pair (A,B).

The leading columns of Q and Z form unitary bases of the corresponding left and right eigenspaces (deflating subspaces). (A, B) must be in generalized Schur canonical form, that is, A and B are both upper triangular.

CTGSEN also computes the generalized eigenvalues

     w(j)= ALPHA(j) / BETA(j)
of the reordered matrix pair (A, B).

Optionally, the routine computes estimates of reciprocal condition numbers for eigenvalues and eigenspaces.

Parameters

in
ijob

Specifies whether condition numbers are required. = 0: Only reorder w.r.t. SELECT. No extras. = 1: Reciprocal of norms of “projections” (PL and PR). = 2: Upper bounds on Difu and Difl (F-norm-based). = 3: Estimate of Difu and Difl (1-norm-based). = 4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above). = 5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above).

in
wantq

If nonzero, update the left transformation matrix Q.

in
wantz

If nonzero, update the right transformation matrix Z.

in
select

Integer array of dimension (n). Specifies the eigenvalues in the selected cluster.

in
n

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

inout
A

Complex array of dimension (lda, n). Upper triangular matrix.

in
lda

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

inout
B

Complex array of dimension (ldb, n). Upper triangular matrix.

in
ldb

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

out
alpha

Complex array of dimension (n). Diagonal elements of A.

out
beta

Complex array of dimension (n). Diagonal elements of B.

inout
Q

Complex array of dimension (ldq, n). The unitary matrix Q.

in
ldq

The leading dimension of Q. ldq >= 1; if wantq, ldq >= n.

inout
Z

Complex array of dimension (ldz, n). The unitary matrix Z.

in
ldz

The leading dimension of Z. ldz >= 1; if wantz, ldz >= n.

out
m

The dimension of the specified pair of deflating subspaces.

out
pl

Lower bound on reciprocal of projection onto left eigenspace.

out
pr

Lower bound on reciprocal of projection onto right eigenspace.

out
dif

Array of dimension (2). Estimates of Difu and Difl.

out
work

Complex array of dimension (max(1, lwork)).

in
lwork

The dimension of work.

out
iwork

Integer array of dimension (max(1, liwork)).

in
liwork

The dimension of iwork.

out
info

  • = 0: successful exit

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

  • = 1: reordering failed

Functions

void ztgsen(
    const INT            ijob,
    const INT            wantq,
    const INT            wantz,
    const INT*  restrict select,
    const INT            n,
          c128*          A,
    const INT            lda,
          c128*          B,
    const INT            ldb,
          c128*          alpha,
          c128*          beta,
          c128*          Q,
    const INT            ldq,
          c128*          Z,
    const INT            ldz,
          INT*           m,
          f64*           pl,
          f64*           pr,
          f64*           dif,
          c128*          work,
    const INT            lwork,
          INT*           iwork,
    const INT            liwork,
          INT*           info
);
void ztgsen(const INT ijob, const INT wantq, const INT wantz, const INT *restrict select, const INT n, c128 *A, const INT lda, c128 *B, const INT ldb, c128 *alpha, c128 *beta, c128 *Q, const INT ldq, c128 *Z, const INT ldz, INT *m, f64 *pl, f64 *pr, f64 *dif, c128 *work, const INT lwork, INT *iwork, const INT liwork, INT *info)#

ZTGSEN reorders the generalized Schur decomposition of a complex matrix pair (A, B) (in terms of an unitary equivalence trans- formation Q**H * (A, B) * Z), so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the pair (A,B).

The leading columns of Q and Z form unitary bases of the corresponding left and right eigenspaces (deflating subspaces). (A, B) must be in generalized Schur canonical form, that is, A and B are both upper triangular.

ZTGSEN also computes the generalized eigenvalues

     w(j)= ALPHA(j) / BETA(j)
of the reordered matrix pair (A, B).

Optionally, the routine computes estimates of reciprocal condition numbers for eigenvalues and eigenspaces.

Parameters

in
ijob

Specifies whether condition numbers are required. = 0: Only reorder w.r.t. SELECT. No extras. = 1: Reciprocal of norms of “projections” (PL and PR). = 2: Upper bounds on Difu and Difl (F-norm-based). = 3: Estimate of Difu and Difl (1-norm-based). = 4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above). = 5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above).

in
wantq

If nonzero, update the left transformation matrix Q.

in
wantz

If nonzero, update the right transformation matrix Z.

in
select

Integer array of dimension (n). Specifies the eigenvalues in the selected cluster.

in
n

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

inout
A

Complex array of dimension (lda, n). Upper triangular matrix.

in
lda

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

inout
B

Complex array of dimension (ldb, n). Upper triangular matrix.

in
ldb

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

out
alpha

Complex array of dimension (n). Diagonal elements of A.

out
beta

Complex array of dimension (n). Diagonal elements of B.

inout
Q

Complex array of dimension (ldq, n). The unitary matrix Q.

in
ldq

The leading dimension of Q. ldq >= 1; if wantq, ldq >= n.

inout
Z

Complex array of dimension (ldz, n). The unitary matrix Z.

in
ldz

The leading dimension of Z. ldz >= 1; if wantz, ldz >= n.

out
m

The dimension of the specified pair of deflating subspaces.

out
pl

Lower bound on reciprocal of projection onto left eigenspace.

out
pr

Lower bound on reciprocal of projection onto right eigenspace.

out
dif

Array of dimension (2). Estimates of Difu and Difl.

out
work

Complex array of dimension (max(1, lwork)).

in
lwork

The dimension of work.

out
iwork

Integer array of dimension (max(1, liwork)).

in
liwork

The dimension of iwork.

out
info

  • = 0: successful exit

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

  • = 1: reordering failed