?trsen
?trsen
Reorders the Schur factorization of a matrix and (optionally) computes the reciprocal condition numbers for the selected cluster of eigenvalues and respective invariant subspace.
Syntax
lapack_int LAPACKE_strsen
(
int
matrix_layout
,
char
job
,
char
compq
,
const lapack_logical*
select
,
lapack_int
n
,
float*
t
,
lapack_int
ldt
,
float*
q
,
lapack_int
ldq
,
float*
wr
,
float*
wi
,
lapack_int*
m
,
float*
s
,
float*
sep
);
lapack_int LAPACKE_dtrsen
(
int
matrix_layout
,
char
job
,
char
compq
,
const lapack_logical*
select
,
lapack_int
n
,
double*
t
,
lapack_int
ldt
,
double*
q
,
lapack_int
ldq
,
double*
wr
,
double*
wi
,
lapack_int*
m
,
double*
s
,
double*
sep
);
lapack_int LAPACKE_ctrsen
(
int
matrix_layout
,
char
job
,
char
compq
,
const lapack_logical*
select
,
lapack_int
n
,
lapack_complex_float*
t
,
lapack_int
ldt
,
lapack_complex_float*
q
,
lapack_int
ldq
,
lapack_complex_float*
w
,
lapack_int*
m
,
float*
s
,
float*
sep
);
lapack_int LAPACKE_ztrsen
(
int
matrix_layout
,
char
job
,
char
compq
,
const lapack_logical*
select
,
lapack_int
n
,
lapack_complex_double*
t
,
lapack_int
ldt
,
lapack_complex_double*
q
,
lapack_int
ldq
,
lapack_complex_double*
w
,
lapack_int*
m
,
double*
s
,
double*
sep
);
Include Files
- mkl.h
Description
The routine reorders the Schur factorization of a general matrix (for real flavors) or (for complex flavors) so that a selected cluster of eigenvalues appears in the leading diagonal elements (or, for real flavors, diagonal blocks) of the Schur form. The reordered Schur form . Optionally the updated matrix , giving .
A
= Q*T*Q
T
A
= Q*T*Q
H
R
is computed by a unitary (orthogonal) similarity transformation: R
= Z
H
*T*Z
P
of Schur vectors is computed as P
= Q*Z
A
= P*R*P
H
Let

where the selected eigenvalues are precisely the eigenvalues of the leading , and so the
m
-by-m
submatrix T
11
. Let P
be correspondingly partitioned as (Q
1
Q
2
) where Q
1
consists of the first m
columns of Q
. Then A
*Q
1
= Q
1
*T
11
m
columns of Q
1
form an orthonormal basis for the invariant subspace corresponding to the selected cluster of eigenvalues.Optionally the routine also computes estimates of the reciprocal condition numbers of the average of the cluster of eigenvalues and of the invariant subspace.
Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- job
- Must be'N'or'E'or'V'or'B'.If, then no condition numbers are required.job='N'If, then only the condition number for the cluster of eigenvalues is computed.job='E'If, then only the condition number for the invariant subspace is computed.job='V'If, then condition numbers for both the cluster and the invariant subspace are computed.job='B'
- compq
- Must be'V'or'N'.If, thencompq='V'Qof the Schur vectors is updated.If, then no Schur vectors are updated.compq='N'
- select
- Array, size at least max (1,n).Specifies the eigenvalues in the selected cluster. To select an eigenvalue,λjselect[must bej]1For real flavors: to select a complex conjugate pair of eigenvaluesandλj(corresponding 2 by 2 diagonal block),λj+1select[and/orj- 1]select[must bej]1; the complex conjugateandλjmust be either both included in the cluster or both excluded.λj+ 1
- n
- The order of the matrixT().n≥0
- t,q
- Arrays:t(size max(1,Theupper quasi-triangularldt*n))n-by-nmatrixT, in Schur canonical form.q(size max(1,ldq*n))If, thencompq='V'qmust contain the matrixQof Schur vectors.If, thencompq='N'qis not referenced.
- ldt
- The leading dimension oft; at least max(1,n).
- ldq
- The leading dimension ofq;If, thencompq='N'.ldq≥1If, thencompq='V'.ldq≥max(1,n)
Output Parameters
- t
- Overwritten by the reordered matrixRin Schur canonical form with the selected eigenvalues in the leading diagonal blocks.
- q
- If,compq='V'qcontains the updated matrix of Schur vectors; the first m columns of theQform an orthogonal basis for the specified invariant subspace.
- w
- Array, size at least max(1,n). The recorded eigenvalues ofR. The eigenvalues are stored in the same order as on the diagonal ofR.
- wr,wi
- Arrays, size at least max(1,n). Contain the real and imaginary parts, respectively, of the reordered eigenvalues ofR. The eigenvalues are stored in the same order as on the diagonal ofR. Note that if a complex eigenvalue is sufficiently ill-conditioned, then its value may differ significantly from its value before reordering.
- m
- For complex flavors: the dimension of the specified invariant subspaces, which is the same as the number of selected eigenvalues (seeselect).For real flavors: the dimension of the specified invariant subspace. The value ofmis obtained by counting 1 for each selected real eigenvalue and 2 for each selected complex conjugate pair of eigenvalues (seeselect).Constraint:0.≤m≤n
- s
- Iforjob='E''B',sis a lower bound on the reciprocal condition number of the average of the selected cluster of eigenvalues.Iform= 0n, then.s= 1For real flavors: if, theninfo= 1sis set to zero.sis not referenced iforjob='N''V'.
- sep
- Iforjob='V''B',sepis the estimated reciprocal condition number of the specified invariant subspace.Iform= 0n, then.sep= |T|For real flavors: if, theninfo= 1sepis set to zero.sepis not referenced iforjob='N''E'.
Return Values
This function returns a value
info
.If , the execution is successful.
info
=0If , the
info
= -i
i
-th parameter had an illegal value.If , the reordering of
info
= 1T
failed because some eigenvalues are too close to separate (the problem is very ill-conditioned); T
may have been partially reordered, and wr
and wi
contain the eigenvalues in the same order as in T
; s
and sep
(if requested) are set to zero.Application Notes
The computed matrix , where . Note that if a 2-by-2 diagonal block is involved in the re-ordering, its off-diagonal elements are in general changed; the diagonal elements and the eigenvalues of the block are unchanged unless the block is sufficiently ill-conditioned, in which case they may be noticeably altered. It is possible for a 2-by-2 block to break into two 1-by-1 blocks, that is, for a pair of complex eigenvalues to become purely real.
R
is exactly similar to a matrix T
+E
||
, and E
||2
= O
(ε
)*||T
||2
ε
is the machine precision. The computed s
cannot underestimate the true reciprocal condition number by more than a factor of (min(m
, n
-m
))1/2
; sep
may differ from the true value by (m
*n
-m
2
)1/2
. The angle between the computed invariant subspace and the true subspace is O
(ε
)*||A
||2
/sep