This function call 'dtgsend' in Fortran to reorder 'double' matrices (S,T,Q,Z).
qz.dtgsen(S, T, Q, Z, select, ijob = 4L,
want.Q = TRUE, want.Z = TRUE, LWORK = NULL, LIWORK = NULL)
Return a list contains next:
S's reorded generalized Schur form.
T's reorded generalized Schur form.
original returns from 'dtgsen.f'.
original returns from 'dtgsen.f'.
original returns from 'dtgsen.f'.
original returns from 'dtgsen.f'.
original returns from 'dtgsen.f'.
original returns from 'dtgsen.f'.
original returns from 'dtgsen.f'.
optimal LWORK (for dtgsen.f only)
optimal LIWORK (for dtgsen.f only)
= 0: successful. < 0: if INFO = -i, the i-th argument had an illegal value. =1: reordering of (S,T) failed.
Extra returns in the list:
ALPHAR + ALPHAI * i.
the reorded left Schur vectors.
the reorded right Schur vectors.
a 'double' generalized Schur form, dim = c(N, N).
a 'double' generalized Schur form, dim = c(N, N).
a 'double' left Schur vectors, dim = c(N, N).
a 'double' right Schur vectors, dim = c(N, N).
specifies the eigenvalues in the selected cluster.
specifies whether condition numbers are required for the cluster of eigenvalues (PL and PR) or the deflating subspaces (Difu and Difl).
if update Q.
if update Z.
optional, dimension of array WORK for workspace. (>= max(4N+16, N(N+1)))
optional, dimension of array IWORK for workspace. (>= max(N+6, N(N+1)/2))
There is no format checking for S
, T
, Q
, and Z
which are usually returned by qz.dgges
.
There is also no checking for select
which is usually according to
the returns of qz.dggev
.
Wei-Chen Chen wccsnow@gmail.com
See 'dtgsen.f' for all details.
DTGSEN reorders the generalized real Schur decomposition of a real matrix pair (S,T) (in terms of an orthonormal equivalence transformation Q**T * (S,T) * Z), so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix S and the upper triangular T. The leading columns of Q and Z form orthonormal bases of the corresponding left and right eigenspaces (deflating subspaces). (S,T) must be in generalized real Schur canonical form (as returned by DGGES), i.e. S is block upper triangular with 1-by-1 and 2-by-2 diagonal blocks. T is upper triangular.
Note for 'ijob':
=0: Only reorder w.r.t. SELECT. No extras.
=1: Reciprocal of norms of "projections" onto left and right
eigenspaces w.r.t. the selected cluster (PL and PR).
=2: Upper bounds on Difu and Difl. F-norm-based estimate (DIF(1:2)).
=3: Estimate of Difu and Difl. 1-norm-based estimate (DIF(1:2)).
About 5 times as expensive as ijob = 2.
=4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
version to get it all.
=5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above).
In short, if (A,B) = Q * (S,T) * Z**T from qz.zgges
and input
(S,T,Q,Z) to qz.ztgsen
with appropriate select
option,
then it yields
(A,B) = Q_n * (S_n,T_n) * Z_n**T
where (S_n,T_n,Q_n,Z_n) is a new set of generalized Schur decomposition
of (A,B) according to the select
.
Anderson, E., et al. (1999) LAPACK User's Guide, 3rd edition, SIAM, Philadelphia.
qz.zgges
, qz.dgges
, qz.ztgsen
.
library(QZ, quiet = TRUE)
### https://www.nag.com/numeric/fl/nagdoc_fl23/xhtml/f08/f08ygf.xml
S <- exAB4$S
T <- exAB4$T
Q <- exAB4$Q
Z <- exAB4$Z
select <- c(FALSE, TRUE, TRUE, FALSE)
ret <- qz.dtgsen(S, T, Q, Z, select)
# Verify 1
S.new <- ret$Q %*% ret$S %*% t(ret$Z)
T.new <- ret$Q %*% ret$T %*% t(ret$Z)
round(S - S.new)
round(T - T.new)
# verify 2
round(ret$Q %*% t(ret$Q))
round(ret$Z %*% t(ret$Z))
Run the code above in your browser using DataLab