trexc#

Functions

void strexc(
    const char* compq,
    const INT   n,
          f32*  T,
    const INT   ldt,
          f32*  Q,
    const INT   ldq,
          INT*  ifst,
          INT*  ilst,
          f32*  work,
          INT*  info
);
void strexc(const char *compq, const INT n, f32 *T, const INT ldt, f32 *Q, const INT ldq, INT *ifst, INT *ilst, f32 *work, INT *info)#

STREXC reorders the real Schur factorization of a real matrix A = Q*T*Q**T, so that the diagonal block of T with row index IFST is moved to row ILST.

The real Schur form T is reordered by an orthogonal similarity transformation Z**T*T*Z, and optionally the matrix Q of Schur vectors is updated by postmultiplying it with Z.

T must be in Schur canonical form (as returned by SHSEQR), that is, block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each 2-by-2 diagonal block has its diagonal elements equal and its off-diagonal elements of opposite sign.

Parameters

in
compq

‘V’: update the matrix Q of Schur vectors. ‘N’: do not update Q.

in
n

The order of the matrix T. n >= 0. If n == 0, arguments ilst and ifst may be any value.

inout
T

On entry, the upper quasi-triangular matrix T, in Schur canonical form. On exit, the reordered matrix. Dimension (ldt, n).

in
ldt

The leading dimension of T. ldt >= max(1, n).

inout
Q

On entry, if compq = ‘V’, the matrix Q of Schur vectors. On exit, if compq = ‘V’, Q has been postmultiplied by the orthogonal transformation matrix Z. If compq = ‘N’, Q is not referenced. Dimension (ldq, n).

in
ldq

The leading dimension of Q. ldq >= 1, and if compq = ‘V’, ldq >= max(1, n).

inout
ifst

On entry, the row index of the block to move (0-based). On exit, if ifst pointed to the second row of a 2-by-2 block, it is changed to point to the first row.

inout
ilst

On entry, the target row index for the block (0-based). On exit, points to the first row of the block in its final position.

out
work

Workspace array, dimension (n).

out
info

  • = 0: successful exit.

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

  • = 1: two adjacent blocks were too close to swap; T may have been partially reordered, and ilst points to the first row of the current position of the block being moved.

Functions

void dtrexc(
    const char* compq,
    const INT   n,
          f64*  T,
    const INT   ldt,
          f64*  Q,
    const INT   ldq,
          INT*  ifst,
          INT*  ilst,
          f64*  work,
          INT*  info
);
void dtrexc(const char *compq, const INT n, f64 *T, const INT ldt, f64 *Q, const INT ldq, INT *ifst, INT *ilst, f64 *work, INT *info)#

DTREXC reorders the real Schur factorization of a real matrix A = Q*T*Q**T, so that the diagonal block of T with row index IFST is moved to row ILST.

The real Schur form T is reordered by an orthogonal similarity transformation Z**T*T*Z, and optionally the matrix Q of Schur vectors is updated by postmultiplying it with Z.

T must be in Schur canonical form (as returned by DHSEQR), that is, block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each 2-by-2 diagonal block has its diagonal elements equal and its off-diagonal elements of opposite sign.

Parameters

in
compq

‘V’: update the matrix Q of Schur vectors. ‘N’: do not update Q.

in
n

The order of the matrix T. n >= 0. If n == 0, arguments ilst and ifst may be any value.

inout
T

On entry, the upper quasi-triangular matrix T, in Schur canonical form. On exit, the reordered matrix. Dimension (ldt, n).

in
ldt

The leading dimension of T. ldt >= max(1, n).

inout
Q

On entry, if compq = ‘V’, the matrix Q of Schur vectors. On exit, if compq = ‘V’, Q has been postmultiplied by the orthogonal transformation matrix Z. If compq = ‘N’, Q is not referenced. Dimension (ldq, n).

in
ldq

The leading dimension of Q. ldq >= 1, and if compq = ‘V’, ldq >= max(1, n).

inout
ifst

On entry, the row index of the block to move (0-based). On exit, if ifst pointed to the second row of a 2-by-2 block, it is changed to point to the first row.

inout
ilst

On entry, the target row index for the block (0-based). On exit, points to the first row of the block in its final position.

out
work

Workspace array, dimension (n).

out
info

  • = 0: successful exit.

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

  • = 1: two adjacent blocks were too close to swap; T may have been partially reordered, and ilst points to the first row of the current position of the block being moved.

Functions

void ctrexc(
    const char* compq,
    const INT   n,
          c64*  T,
    const INT   ldt,
          c64*  Q,
    const INT   ldq,
    const INT   ifst,
    const INT   ilst,
          INT*  info
);
void ctrexc(const char *compq, const INT n, c64 *T, const INT ldt, c64 *Q, const INT ldq, const INT ifst, const INT ilst, INT *info)#

CTREXC reorders the Schur factorization of a complex matrix A = Q*T*Q**H, so that the diagonal element of T with row index IFST is moved to row ILST.

The Schur form T is reordered by a unitary similarity transformation Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by postmultiplying it with Z.

Parameters

in
compq

‘V’: update the matrix Q of Schur vectors. ‘N’: do not update Q.

in
n

The order of the matrix T. n >= 0. If n == 0, arguments ilst and ifst may be any value.

inout
T

Complex array, dimension (ldt, n). On entry, the upper triangular matrix T. On exit, the reordered upper triangular matrix.

in
ldt

The leading dimension of T. ldt >= max(1, n).

inout
Q

Complex array, dimension (ldq, n). On entry, if compq = ‘V’, the matrix Q of Schur vectors. On exit, if compq = ‘V’, Q has been postmultiplied by the unitary transformation matrix Z which reorders T. If compq = ‘N’, Q is not referenced.

in
ldq

The leading dimension of Q. ldq >= 1, and if compq = ‘V’, ldq >= max(1, n).

in
ifst

Specify the reordering of the diagonal elements of T: The element with row index IFST is moved to row ILST by a sequence of transpositions between adjacent elements. 0 <= ifst < n (0-based).

in
ilst

0 <= ilst < n (0-based).

out
info

  • = 0: successful exit.

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

Functions

void ztrexc(
    const char* compq,
    const INT   n,
          c128* T,
    const INT   ldt,
          c128* Q,
    const INT   ldq,
    const INT   ifst,
    const INT   ilst,
          INT*  info
);
void ztrexc(const char *compq, const INT n, c128 *T, const INT ldt, c128 *Q, const INT ldq, const INT ifst, const INT ilst, INT *info)#

ZTREXC reorders the Schur factorization of a complex matrix A = Q*T*Q**H, so that the diagonal element of T with row index IFST is moved to row ILST.

The Schur form T is reordered by a unitary similarity transformation Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by postmultiplying it with Z.

Parameters

in
compq

‘V’: update the matrix Q of Schur vectors. ‘N’: do not update Q.

in
n

The order of the matrix T. n >= 0. If n == 0, arguments ilst and ifst may be any value.

inout
T

Complex array, dimension (ldt, n). On entry, the upper triangular matrix T. On exit, the reordered upper triangular matrix.

in
ldt

The leading dimension of T. ldt >= max(1, n).

inout
Q

Complex array, dimension (ldq, n). On entry, if compq = ‘V’, the matrix Q of Schur vectors. On exit, if compq = ‘V’, Q has been postmultiplied by the unitary transformation matrix Z which reorders T. If compq = ‘N’, Q is not referenced.

in
ldq

The leading dimension of Q. ldq >= 1, and if compq = ‘V’, ldq >= max(1, n).

in
ifst

Specify the reordering of the diagonal elements of T: The element with row index IFST is moved to row ILST by a sequence of transpositions between adjacent elements. 0 <= ifst < n (0-based).

in
ilst

0 <= ilst < n (0-based).

out
info

  • = 0: successful exit.

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