QZ (version 0.1-7)

qz.dtgsen: Reordered QZ Decomposition for Real Paired Matrices

Description

This function call 'dtgsend' in Fortran to reorder 'double' matrices (S,T,Q,Z).

Usage

qz.dtgsen(S, T, Q, Z, select, ijob = 4L,
            want.Q = TRUE, want.Z = TRUE, LWORK = NULL, LIWORK = NULL)

Arguments

S

a 'double' generalized Schur form, dim = c(N, N).

T

a 'double' generalized Schur form, dim = c(N, N).

Q

a 'double' left Schur vectors, dim = c(N, N).

Z

a 'double' right Schur vectors, dim = c(N, N).

select

specifies the eigenvalues in the selected cluster.

ijob

specifies whether condition numbers are required for the cluster of eigenvalues (PL and PR) or the deflating subspaces (Difu and Difl).

want.Q

if update Q.

want.Z

if update Z.

LWORK

optional, dimension of array WORK for workspace. (>= max(4N+16, N(N+1)))

LIWORK

optional, dimension of array IWORK for workspace. (>= max(N+6, N(N+1)/2))

Value

Return a list contains next:

'S'

S's reorded generalized Schur form.

'T'

T's reorded generalized Schur form.

'ALPHAR'

original returns from 'dtgsen.f'.

'ALPHAI'

original returns from 'dtgsen.f'.

'BETA'

original returns from 'dtgsen.f'.

'M'

original returns from 'dtgsen.f'.

'PL'

original returns from 'dtgsen.f'.

'PR'

original returns from 'dtgsen.f'.

'DIF'

original returns from 'dtgsen.f'.

'WORK'

optimal LWORK (for dtgsen.f only)

'IWORK'

optimal LIWORK (for dtgsen.f only)

'INFO'

= 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:

'ALPHA'

ALPHAR + ALPHAI * i.

'Q'

the reorded left Schur vectors.

'Z'

the reorded right Schur vectors.

Warning(s)

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.

Details

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.

References

Anderson, E., et al. (1999) LAPACK User's Guide, 3rd edition, SIAM, Philadelphia.

http://www.netlib.org/lapack/double/dtgsen.f

http://en.wikipedia.org/wiki/Schur_decomposition

See Also

qz.zgges, qz.dgges, qz.ztgsen.

Examples

Run this code
# NOT RUN {
<!-- % \dontrun{ -->
# }
# NOT RUN {
library(QZ, quiet = TRUE)

### http://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))
# }
# NOT RUN {
<!-- % } -->
# }

Run the code above in your browser using DataCamp Workspace