qz.dtrsen {QZ} | R Documentation |
Reordered QZ Decomposition for a Real Matrix
Description
This function call 'dtrsend' in Fortran to reorder 'double' matrices (T,Q).
Usage
qz.dtrsen(T, Q, select, job = c("B", "V", "E", "N"),
want.Q = TRUE, LWORK = NULL, LIWORK = NULL)
Arguments
T |
a 'double' generalized Schur form, dim = c(N, N). |
Q |
a 'double' Schur vectors, dim = c(N, N). |
select |
specifies the eigenvalues in the selected cluster. |
job |
Specifies whether condition numbers are required for the cluster of eigenvalues (S) or the invariant subspace (SEP). |
want.Q |
if update Q. |
LWORK |
optional, dimension of array WORK for workspace. (>= N(N+1)/2) |
LIWORK |
optional, dimension of array IWORK for workspace. (>= N(N+1)/4) |
Details
See 'dtrsen.f' for all details.
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.
Value
Return a list contains next:
'T' |
T's reorded generalized Schur form. |
'WR' |
original returns from 'dtrsen.f'. |
'WI' |
original returns from 'dtrsen.f'. |
'M' |
original returns from 'dtrsen.f'. |
'S' |
original returns from 'dtrsen.f'. |
'SEP' |
original returns from 'dtrsen.f'. |
'WORK' |
optimal LWORK (for dtrsen.f only) |
'IWORK' |
optimal LIWORK (for dtrsen.f only) |
'INFO' |
= 0: successful. < 0: if INFO = -i, the i-th argument had an illegal value. =1: reordering of T failed. |
Extra returns in the list:
'W' |
WR + WI * i. |
'Q' |
the reorded Schur vectors. |
Warning(s)
There is no format checking for T
and Q
which are usually returned by qz.dgees
.
There is also no checking for select
which is usually according to
the returns of qz.dgeev
.
Author(s)
Wei-Chen Chen wccsnow@gmail.com
References
Anderson, E., et al. (1999) LAPACK User's Guide, 3rd edition, SIAM, Philadelphia.
https://www.netlib.org/lapack/double/dtrsen.f
https://en.wikipedia.org/wiki/Schur_decomposition
See Also
qz.zgees
, qz.dgees
, qz.ztrsen
.
Examples
library(QZ, quiet = TRUE)
### https://www.nag.com/numeric/fl/nagdoc_fl22/xhtml/f08/f08qgf.xml
T <- exA4$T
Q <- exA4$Q
select <- c(TRUE, FALSE, FALSE, TRUE)
ret <- qz.dtrsen(T, Q, select)
# Verify 1
A <- Q %*% T %*% solve(Q)
A.new <- ret$Q %*% ret$T %*% solve(ret$Q)
round(A - A.new)
# verify 2
round(ret$Q %*% t(ret$Q))