tgexc#

Functions

void stgexc(
    const INT           wantq,
    const INT           wantz,
    const INT           n,
          f32* restrict A,
    const INT           lda,
          f32* restrict B,
    const INT           ldb,
          f32* restrict Q,
    const INT           ldq,
          f32* restrict Z,
    const INT           ldz,
          INT*          ifst,
          INT*          ilst,
          f32* restrict work,
    const INT           lwork,
          INT*          info
);
void stgexc(const INT wantq, const INT wantz, const INT n, f32 *restrict A, const INT lda, f32 *restrict B, const INT ldb, f32 *restrict Q, const INT ldq, f32 *restrict Z, const INT ldz, INT *ifst, INT *ilst, f32 *restrict work, const INT lwork, INT *info)#

STGEXC reorders the generalized real Schur decomposition of a real matrix pair (A,B) using an orthogonal equivalence transformation.

           (A, B) = Q * (A, B) * Z**T,
so that the diagonal block of (A, B) with row index IFST is moved to row ILST.

Parameters

in
wantq

If nonzero, update the left transformation matrix Q.

in
wantz

If nonzero, update the right transformation matrix Z.

in
n

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

inout
A

Array of dimension (lda, n). Generalized real Schur form.

in
lda

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

inout
B

Array of dimension (ldb, n). Upper triangular part of Schur form.

in
ldb

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

inout
Q

Array of dimension (ldq, n). The orthogonal matrix Q. Not referenced if wantq = 0.

in
ldq

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

inout
Z

Array of dimension (ldz, n). The orthogonal matrix Z. Not referenced if wantz = 0.

in
ldz

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

inout
ifst

On entry, index of block to move (0-based). On exit, adjusted to point to first row if it pointed to second row of 2x2 block.

inout
ilst

On entry, target index (0-based). On exit, actual position of the block.

out
work

Array of dimension (lwork).

in
lwork

The dimension of work. lwork >= 4*n+16 for n > 1, else >= 1. If lwork = -1, workspace query.

out
info

  • = 0: successful exit

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

  • = 1: swap failed, matrices partially reordered

Functions

void dtgexc(
    const INT           wantq,
    const INT           wantz,
    const INT           n,
          f64* restrict A,
    const INT           lda,
          f64* restrict B,
    const INT           ldb,
          f64* restrict Q,
    const INT           ldq,
          f64* restrict Z,
    const INT           ldz,
          INT*          ifst,
          INT*          ilst,
          f64* restrict work,
    const INT           lwork,
          INT*          info
);
void dtgexc(const INT wantq, const INT wantz, const INT n, f64 *restrict A, const INT lda, f64 *restrict B, const INT ldb, f64 *restrict Q, const INT ldq, f64 *restrict Z, const INT ldz, INT *ifst, INT *ilst, f64 *restrict work, const INT lwork, INT *info)#

DTGEXC reorders the generalized real Schur decomposition of a real matrix pair (A,B) using an orthogonal equivalence transformation.

           (A, B) = Q * (A, B) * Z**T,
so that the diagonal block of (A, B) with row index IFST is moved to row ILST.

Parameters

in
wantq

If nonzero, update the left transformation matrix Q.

in
wantz

If nonzero, update the right transformation matrix Z.

in
n

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

inout
A

Array of dimension (lda, n). Generalized real Schur form.

in
lda

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

inout
B

Array of dimension (ldb, n). Upper triangular part of Schur form.

in
ldb

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

inout
Q

Array of dimension (ldq, n). The orthogonal matrix Q. Not referenced if wantq = 0.

in
ldq

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

inout
Z

Array of dimension (ldz, n). The orthogonal matrix Z. Not referenced if wantz = 0.

in
ldz

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

inout
ifst

On entry, index of block to move (0-based). On exit, adjusted to point to first row if it pointed to second row of 2x2 block.

inout
ilst

On entry, target index (0-based). On exit, actual position of the block.

out
work

Array of dimension (lwork).

in
lwork

The dimension of work. lwork >= 4*n+16 for n > 1, else >= 1. If lwork = -1, workspace query.

out
info

  • = 0: successful exit

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

  • = 1: swap failed, matrices partially reordered

Functions

void ctgexc(
    const INT           wantq,
    const INT           wantz,
    const INT           n,
          c64* restrict A,
    const INT           lda,
          c64* restrict B,
    const INT           ldb,
          c64* restrict Q,
    const INT           ldq,
          c64* restrict Z,
    const INT           ldz,
    const INT           ifst,
          INT*          ilst,
          INT*          info
);
void ctgexc(const INT wantq, const INT wantz, const INT n, c64 *restrict A, const INT lda, c64 *restrict B, const INT ldb, c64 *restrict Q, const INT ldq, c64 *restrict Z, const INT ldz, const INT ifst, INT *ilst, INT *info)#

CTGEXC reorders the generalized Schur decomposition of a complex matrix pair (A,B), using an unitary equivalence transformation (A, B) := Q * (A, B) * Z**H, so that the diagonal block of (A, B) with row index IFST is moved to row ILST.

(A, B) must be in generalized Schur canonical form, that is, A and B are both upper triangular.

Optionally, the matrices Q and Z of generalized Schur vectors are updated.

   Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
   Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H

Parameters

in
wantq

If nonzero, update the left transformation matrix Q.

in
wantz

If nonzero, update the right transformation matrix Z.

in
n

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

inout
A

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

in
lda

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

inout
B

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

in
ldb

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

inout
Q

Complex array of dimension (ldq, n). The unitary matrix Q. Not referenced if wantq = 0.

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. Not referenced if wantz = 0.

in
ldz

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

in
ifst

Index of block to move (0-based).

inout
ilst

On entry, target index (0-based). On exit, actual position.

out
info

  • = 0: successful exit

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

  • = 1: swap failed, matrices partially reordered, ilst points to current position of block.

Functions

void ztgexc(
    const INT            wantq,
    const INT            wantz,
    const INT            n,
          c128* restrict A,
    const INT            lda,
          c128* restrict B,
    const INT            ldb,
          c128* restrict Q,
    const INT            ldq,
          c128* restrict Z,
    const INT            ldz,
    const INT            ifst,
          INT*           ilst,
          INT*           info
);
void ztgexc(const INT wantq, const INT wantz, const INT n, c128 *restrict A, const INT lda, c128 *restrict B, const INT ldb, c128 *restrict Q, const INT ldq, c128 *restrict Z, const INT ldz, const INT ifst, INT *ilst, INT *info)#

ZTGEXC reorders the generalized Schur decomposition of a complex matrix pair (A,B), using an unitary equivalence transformation (A, B) := Q * (A, B) * Z**H, so that the diagonal block of (A, B) with row index IFST is moved to row ILST.

(A, B) must be in generalized Schur canonical form, that is, A and B are both upper triangular.

Optionally, the matrices Q and Z of generalized Schur vectors are updated.

   Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
   Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H

Parameters

in
wantq

If nonzero, update the left transformation matrix Q.

in
wantz

If nonzero, update the right transformation matrix Z.

in
n

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

inout
A

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

in
lda

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

inout
B

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

in
ldb

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

inout
Q

Complex array of dimension (ldq, n). The unitary matrix Q. Not referenced if wantq = 0.

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. Not referenced if wantz = 0.

in
ldz

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

in
ifst

Index of block to move (0-based).

inout
ilst

On entry, target index (0-based). On exit, actual position.

out
info

  • = 0: successful exit

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

  • = 1: swap failed, matrices partially reordered, ilst points to current position of block.