trsen#

Functions

void strsen(
    const char* job,
    const char* compq,
    const INT*  select,
    const INT   n,
          f32*  T,
    const INT   ldt,
          f32*  Q,
    const INT   ldq,
          f32*  wr,
          f32*  wi,
          INT*  m,
          f32*  s,
          f32*  sep,
          f32*  work,
    const INT   lwork,
          INT*  iwork,
    const INT   liwork,
          INT*  info
);
void strsen(const char *job, const char *compq, const INT *select, const INT n, f32 *T, const INT ldt, f32 *Q, const INT ldq, f32 *wr, f32 *wi, INT *m, f32 *s, f32 *sep, f32 *work, const INT lwork, INT *iwork, const INT liwork, INT *info)#

STRSEN reorders the real Schur factorization of a real matrix A = Q*T*Q**T, so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix T, and the leading columns of Q form an orthonormal basis of the corresponding right invariant subspace.

Optionally the routine computes the reciprocal condition numbers of the cluster of eigenvalues and/or the invariant subspace.

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
job

Specifies whether condition numbers are required: = ‘N’: none; = ‘E’: for eigenvalues only (S); = ‘V’: for invariant subspace only (SEP); = ‘B’: for both eigenvalues and invariant subspace.

in
compq

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

in
select

Array of length n. SELECT specifies the eigenvalues in the selected cluster. To select a real eigenvalue w(j), SELECT(j) must be nonzero. To select a complex conjugate pair, either SELECT(j) or SELECT(j+1) or both must be nonzero.

in
n

The order of the matrix T. n >= 0.

inout
T

On entry, the upper quasi-triangular matrix T, in Schur canonical form. On exit, T is overwritten by 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. Dimension (ldq, n). If compq = ‘N’, Q is not referenced.

in
ldq

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

out
wr

Array of length n. Real parts of the reordered eigenvalues.

out
wi

Array of length n. Imaginary parts of the reordered eigenvalues.

out
m

The dimension of the specified invariant subspace.

out
s

If job = ‘E’ or ‘B’, a lower bound on the reciprocal condition number for the selected cluster of eigenvalues. If job = ‘N’ or ‘V’, s is not referenced.

out
sep

If job = ‘V’ or ‘B’, the estimated reciprocal condition number of the specified invariant subspace. If job = ‘N’ or ‘E’, sep is not referenced.

out
work

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

in
lwork

The dimension of work. If job = ‘N’, lwork >= max(1, n); if job = ‘E’, lwork >= max(1, m*(n-m)); if job = ‘V’ or ‘B’, lwork >= max(1, 2*m*(n-m)). If lwork = -1, a workspace query is assumed.

out
iwork

Integer workspace array, dimension (max(1, liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of iwork. If job = ‘N’ or ‘E’, liwork >= 1; if job = ‘V’ or ‘B’, liwork >= max(1, m*(n-m)). If liwork = -1, a workspace query is assumed.

out
info

  • = 0: successful exit

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

  • = 1: reordering of T failed because some eigenvalues are too close to separate; T may have been partially reordered, and wr and wi contain the eigenvalues in the same order as in T; s and sep are set to zero.

Functions

void dtrsen(
    const char* job,
    const char* compq,
    const INT*  select,
    const INT   n,
          f64*  T,
    const INT   ldt,
          f64*  Q,
    const INT   ldq,
          f64*  wr,
          f64*  wi,
          INT*  m,
          f64*  s,
          f64*  sep,
          f64*  work,
    const INT   lwork,
          INT*  iwork,
    const INT   liwork,
          INT*  info
);
void dtrsen(const char *job, const char *compq, const INT *select, const INT n, f64 *T, const INT ldt, f64 *Q, const INT ldq, f64 *wr, f64 *wi, INT *m, f64 *s, f64 *sep, f64 *work, const INT lwork, INT *iwork, const INT liwork, INT *info)#

DTRSEN reorders the real Schur factorization of a real matrix A = Q*T*Q**T, so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix T, and the leading columns of Q form an orthonormal basis of the corresponding right invariant subspace.

Optionally the routine computes the reciprocal condition numbers of the cluster of eigenvalues and/or the invariant subspace.

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
job

Specifies whether condition numbers are required: = ‘N’: none; = ‘E’: for eigenvalues only (S); = ‘V’: for invariant subspace only (SEP); = ‘B’: for both eigenvalues and invariant subspace.

in
compq

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

in
select

Array of length n. SELECT specifies the eigenvalues in the selected cluster. To select a real eigenvalue w(j), SELECT(j) must be nonzero. To select a complex conjugate pair, either SELECT(j) or SELECT(j+1) or both must be nonzero.

in
n

The order of the matrix T. n >= 0.

inout
T

On entry, the upper quasi-triangular matrix T, in Schur canonical form. On exit, T is overwritten by 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. Dimension (ldq, n). If compq = ‘N’, Q is not referenced.

in
ldq

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

out
wr

Array of length n. Real parts of the reordered eigenvalues.

out
wi

Array of length n. Imaginary parts of the reordered eigenvalues.

out
m

The dimension of the specified invariant subspace.

out
s

If job = ‘E’ or ‘B’, a lower bound on the reciprocal condition number for the selected cluster of eigenvalues. If job = ‘N’ or ‘V’, s is not referenced.

out
sep

If job = ‘V’ or ‘B’, the estimated reciprocal condition number of the specified invariant subspace. If job = ‘N’ or ‘E’, sep is not referenced.

out
work

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

in
lwork

The dimension of work. If job = ‘N’, lwork >= max(1, n); if job = ‘E’, lwork >= max(1, m*(n-m)); if job = ‘V’ or ‘B’, lwork >= max(1, 2*m*(n-m)). If lwork = -1, a workspace query is assumed.

out
iwork

Integer workspace array, dimension (max(1, liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.

in
liwork

The dimension of iwork. If job = ‘N’ or ‘E’, liwork >= 1; if job = ‘V’ or ‘B’, liwork >= max(1, m*(n-m)). If liwork = -1, a workspace query is assumed.

out
info

  • = 0: successful exit

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

  • = 1: reordering of T failed because some eigenvalues are too close to separate; T may have been partially reordered, and wr and wi contain the eigenvalues in the same order as in T; s and sep are set to zero.

Functions

void ctrsen(
    const char* job,
    const char* compq,
    const INT*  select,
    const INT   n,
          c64*  T,
    const INT   ldt,
          c64*  Q,
    const INT   ldq,
          c64*  W,
          INT*  m,
          f32*  s,
          f32*  sep,
          c64*  work,
    const INT   lwork,
          INT*  info
);
void ctrsen(const char *job, const char *compq, const INT *select, const INT n, c64 *T, const INT ldt, c64 *Q, const INT ldq, c64 *W, INT *m, f32 *s, f32 *sep, c64 *work, const INT lwork, INT *info)#

CTRSEN reorders the Schur factorization of a complex matrix A = Q*T*Q**H, so that a selected cluster of eigenvalues appears in the leading positions on the diagonal of the upper triangular matrix T, and the leading columns of Q form an orthonormal basis of the corresponding right invariant subspace.

Optionally the routine computes the reciprocal condition numbers of the cluster of eigenvalues and/or the invariant subspace.

Parameters

in
job

Specifies whether condition numbers are required: = ‘N’: none; = ‘E’: for eigenvalues only (S); = ‘V’: for invariant subspace only (SEP); = ‘B’: for both eigenvalues and invariant subspace.

in
compq

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

in
select

Array of length n. SELECT specifies the eigenvalues in the selected cluster. To select the j-th eigenvalue, SELECT(j) must be set to nonzero.

in
n

The order of the matrix T. n >= 0.

inout
T

Complex array, dimension (ldt, n). On entry, the upper triangular matrix T. On exit, T is overwritten by the reordered matrix T, with the selected eigenvalues as the leading diagonal elements.

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 which reorders T. If compq = ‘N’, Q is not referenced.

in
ldq

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

out
W

Complex array, dimension (n). The reordered eigenvalues of T, in the same order as they appear on the diagonal of T.

out
m

The dimension of the specified invariant subspace. 0 <= m <= n.

out
s

If job = ‘E’ or ‘B’, a lower bound on the reciprocal condition number for the selected cluster of eigenvalues. If job = ‘N’ or ‘V’, s is not referenced.

out
sep

If job = ‘V’ or ‘B’, the estimated reciprocal condition number of the specified invariant subspace. If job = ‘N’ or ‘E’, sep is not referenced.

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. If job = ‘N’, lwork >= 1; if job = ‘E’, lwork >= max(1, m*(n-m)); if job = ‘V’ or ‘B’, lwork >= max(1, 2*m*(n-m)). 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

Functions

void ztrsen(
    const char* job,
    const char* compq,
    const INT*  select,
    const INT   n,
          c128* T,
    const INT   ldt,
          c128* Q,
    const INT   ldq,
          c128* W,
          INT*  m,
          f64*  s,
          f64*  sep,
          c128* work,
    const INT   lwork,
          INT*  info
);
void ztrsen(const char *job, const char *compq, const INT *select, const INT n, c128 *T, const INT ldt, c128 *Q, const INT ldq, c128 *W, INT *m, f64 *s, f64 *sep, c128 *work, const INT lwork, INT *info)#

ZTRSEN reorders the Schur factorization of a complex matrix A = Q*T*Q**H, so that a selected cluster of eigenvalues appears in the leading positions on the diagonal of the upper triangular matrix T, and the leading columns of Q form an orthonormal basis of the corresponding right invariant subspace.

Optionally the routine computes the reciprocal condition numbers of the cluster of eigenvalues and/or the invariant subspace.

Parameters

in
job

Specifies whether condition numbers are required: = ‘N’: none; = ‘E’: for eigenvalues only (S); = ‘V’: for invariant subspace only (SEP); = ‘B’: for both eigenvalues and invariant subspace.

in
compq

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

in
select

Array of length n. SELECT specifies the eigenvalues in the selected cluster. To select the j-th eigenvalue, SELECT(j) must be set to nonzero.

in
n

The order of the matrix T. n >= 0.

inout
T

Complex array, dimension (ldt, n). On entry, the upper triangular matrix T. On exit, T is overwritten by the reordered matrix T, with the selected eigenvalues as the leading diagonal elements.

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 which reorders T. If compq = ‘N’, Q is not referenced.

in
ldq

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

out
W

Complex array, dimension (n). The reordered eigenvalues of T, in the same order as they appear on the diagonal of T.

out
m

The dimension of the specified invariant subspace. 0 <= m <= n.

out
s

If job = ‘E’ or ‘B’, a lower bound on the reciprocal condition number for the selected cluster of eigenvalues. If job = ‘N’ or ‘V’, s is not referenced.

out
sep

If job = ‘V’ or ‘B’, the estimated reciprocal condition number of the specified invariant subspace. If job = ‘N’ or ‘E’, sep is not referenced.

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. If job = ‘N’, lwork >= 1; if job = ‘E’, lwork >= max(1, m*(n-m)); if job = ‘V’ or ‘B’, lwork >= max(1, 2*m*(n-m)). 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