?trexc
?trexc
Reorders the Schur factorization of a general matrix.
Syntax
lapack_int LAPACKE_strexc
(
int
matrix_layout
,
char
compq
,
lapack_int
n
,
float*
t
,
lapack_int
ldt
,
float*
q
,
lapack_int
ldq
,
lapack_int*
ifst
,
lapack_int*
ilst
);
lapack_int LAPACKE_dtrexc
(
int
matrix_layout
,
char
compq
,
lapack_int
n
,
double*
t
,
lapack_int
ldt
,
double*
q
,
lapack_int
ldq
,
lapack_int*
ifst
,
lapack_int*
ilst
);
lapack_int LAPACKE_ctrexc
(
int
matrix_layout
,
char
compq
,
lapack_int
n
,
lapack_complex_float*
t
,
lapack_int
ldt
,
lapack_complex_float*
q
,
lapack_int
ldq
,
lapack_int
ifst
,
lapack_int
ilst
);
lapack_int LAPACKE_ztrexc
(
int
matrix_layout
,
char
compq
,
lapack_int
n
,
lapack_complex_double*
t
,
lapack_int
ldt
,
lapack_complex_double*
q
,
lapack_int
ldq
,
lapack_int
ifst
,
lapack_int
ilst
);
Include Files
- mkl.h
Description
The routine reorders the Schur factorization of a general matrix , so that the diagonal element or block of
A
= Q*T*Q
H
T
with row index ifst
is moved to row ilst
.The reordered Schur form . Optionally the updated matrix , giving .
S
is computed by an unitary (or, for real flavors, orthogonal) similarity transformation: S
= Z
H
*T*Z
P
of Schur vectors is computed as P
= Q*Z
A
= P*S*P
H
Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- compq
- Must be'V'or'N'.If, then the Schur vectors (compq='V'Q) are updated.If, then no Schur vectors are updated.compq='N'
- n
- The order of the matrixT().n≥0
- t,q
- Arrays:t(size max(1,contains theldt*n))n-by-nmatrixT.q(size max(1,ldq*n))If, thencompq='V'qmust containQ(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)
- ifst,ilst
- 1.≤ifst≤n; 1≤ilst≤nMust specify the reordering of the diagonal elements (or blocks, which is possible for real flavors) of the matrixT. The element (or block) with row indexifstis moved to rowilstby a sequence of exchanges between adjacent elements (or blocks).
Output Parameters
- t
- Overwritten by the updated matrixS.
- q
- If,compq='V'qcontains the updated matrix of Schur vectors.
- ifst,ilst
- Overwritten for real flavors only.Ififstpointed to the second row of a 2 by 2 block on entry, it is changed to point to the first row;ilstalways points to the first row of the block in its final position (which may differ from its input value by±1).
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.Application Notes
The computed matrix , where
S
is exactly similar to a matrix T
+E
||
, and E
||2
= O
(ε
)*||T
||2
ε
is the machine precision.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.
The approximate number of floating-point operations is
- for real flavors:
- 6ifn(ifst-ilst);compq='N'12ifn(ifst-ilst);compq='V'
- for complex flavors:
- 20ifn(ifst-ilst);compq='N'40ifn(ifst-ilst).compq='V'