NAG Library Routine Document
F08YUF (ZTGSEN)
1 Purpose
F08YUF (ZTGSEN) reorders the generalized Schur factorization of a complex matrix pair in generalized Schur form, so that a selected cluster of eigenvalues appears in the leading elements on the diagonal of the generalized Schur form. The routine also, optionally, computes the reciprocal condition numbers of the cluster of eigenvalues and/or corresponding deflating subspaces.
2 Specification
SUBROUTINE F08YUF ( |
IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB, ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO) |
INTEGER |
IJOB, N, LDA, LDB, LDQ, LDZ, M, LWORK, IWORK(max(1,LIWORK)), LIWORK, INFO |
REAL (KIND=nag_wp) |
PL, PR, DIF(*) |
COMPLEX (KIND=nag_wp) |
A(LDA,*), B(LDB,*), ALPHA(N), BETA(N), Q(LDQ,*), Z(LDZ,*), WORK(max(1,LWORK)) |
LOGICAL |
WANTQ, WANTZ, SELECT(N) |
|
The routine may be called by its
LAPACK
name ztgsen.
3 Description
F08YUF (ZTGSEN) factorizes the generalized complex
by
matrix pair
in generalized Schur form, using a unitary equivalence transformation as
where
are also in generalized Schur form and have the selected eigenvalues as the leading diagonal elements. The leading columns of
and
are the generalized Schur vectors corresponding to the selected eigenvalues and form orthonormal subspaces for the left and right eigenspaces (deflating subspaces) of the pair
.
The pair
are in generalized Schur form if
and
are upper triangular as returned, for example, by
F08XNF (ZGGES), or
F08XSF (ZHGEQZ) with
. The diagonal elements define the generalized eigenvalues
, for
, of the pair
. The eigenvalues are given by
but are returned as the pair
in order to avoid possible overflow in computing
. Optionally, the routine returns reciprocals of condition number estimates for the selected eigenvalue cluster,
and
, the right and left projection norms, and of deflating subspaces,
and
. For more information see Sections 2.4.8 and 4.11 of
Anderson et al. (1999).
If
and
are the result of a generalized Schur factorization of a matrix pair
then, optionally, the matrices
and
can be updated as
and
. Note that the condition numbers of the pair
are the same as those of the pair
.
4 References
Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999)
LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia
http://www.netlib.org/lapack/lug5 Parameters
- 1: IJOB – INTEGERInput
On entry: specifies whether condition numbers are required for the cluster of eigenvalues (
and
) or the deflating subspaces (
and
).
- Only reorder with respect to SELECT. No extras.
- Reciprocal of norms of ‘projections’ onto left and right eigenspaces with respect to the selected cluster ( and ).
- The upper bounds on and . -norm-based estimate ().
- Estimate of and . -norm-based estimate (). About five times as expensive as .
- Compute PL, PR and DIF as in , and . Economic version to get it all.
- Compute PL, PR and DIF as in , and .
Constraint:
.
- 2: WANTQ – LOGICALInput
On entry: if
, update the left transformation matrix
.
If , do not update .
- 3: WANTZ – LOGICALInput
On entry: if
, update the right transformation matrix
.
If , do not update .
- 4: SELECT(N) – LOGICAL arrayInput
On entry: specifies the eigenvalues in the selected cluster. To select an eigenvalue , must be set to .TRUE..
- 5: N – INTEGERInput
On entry: , the order of the matrices and .
Constraint:
.
- 6: A(LDA,) – COMPLEX (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
A
must be at least
.
On entry: the matrix in the pair .
On exit: the updated matrix .
- 7: LDA – INTEGERInput
On entry: the first dimension of the array
A as declared in the (sub)program from which F08YUF (ZTGSEN) is called.
Constraint:
.
- 8: B(LDB,) – COMPLEX (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
B
must be at least
.
On entry: the matrix , in the pair .
On exit: the updated matrix
- 9: LDB – INTEGERInput
On entry: the first dimension of the array
B as declared in the (sub)program from which F08YUF (ZTGSEN) is called.
Constraint:
.
- 10: ALPHA(N) – COMPLEX (KIND=nag_wp) arrayOutput
- 11: BETA(N) – COMPLEX (KIND=nag_wp) arrayOutput
On exit:
ALPHA and
BETA contain diagonal elements of
and
, respectively, when the pair
has been reduced to generalized Schur form.
, for
, are the eigenvalues.
- 12: Q(LDQ,) – COMPLEX (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
Q
must be at least
if
, and at least
otherwise.
On entry: if , the by matrix .
On exit: if
, the updated matrix
.
If
,
Q is not referenced.
- 13: LDQ – INTEGERInput
On entry: the first dimension of the array
Q as declared in the (sub)program from which F08YUF (ZTGSEN) is called.
Constraints:
- if , ;
- otherwise .
- 14: Z(LDZ,) – COMPLEX (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
Z
must be at least
if
, and at least
otherwise.
On entry: if , the by matrix .
On exit: if
, the updated matrix
.
If
,
Z is not referenced.
- 15: LDZ – INTEGERInput
On entry: the first dimension of the array
Z as declared in the (sub)program from which F08YUF (ZTGSEN) is called.
Constraints:
- if , ;
- otherwise .
- 16: M – INTEGEROutput
On exit: the dimension of the specified pair of left and right eigenspaces (deflating subspaces).
Constraint:
.
- 17: PL – REAL (KIND=nag_wp)Output
- 18: PR – REAL (KIND=nag_wp)Output
On exit: if
,
or
,
PL and
PR are lower bounds on the reciprocal of the norm of ‘projections’
and
onto left and right eigenspace with respect to the selected cluster.
,
.
If or , .
If
,
or
,
PL and
PR are not referenced.
- 19: DIF() – REAL (KIND=nag_wp) arrayOutput
-
Note: the dimension of the array
DIF
must be at least
.
On exit: if
,
store the estimates of
and
.
If or , are -norm-based upper bounds on and .
If or , are -norm-based estimates of and .
If or , .
If
or
,
DIF is not referenced.
- 20: WORK() – COMPLEX (KIND=nag_wp) arrayWorkspace
On exit: if
, the real part of
contains the minimum value of
LWORK required for optimal performance.
- 21: LWORK – INTEGERInput
On entry: the dimension of the array
WORK as declared in the (sub)program from which F08YUF (ZTGSEN) is called.
If
, a workspace query is assumed; the routine only calculates the minimum sizes of the
WORK and
IWORK arrays, returns these values as the first entries of the
WORK and
IWORK arrays, and no error message related to
LWORK or
LIWORK is issued.
Constraints:
if
,
- if , or , ;
- if or , ;
- otherwise .
- 22: IWORK() – INTEGER arrayWorkspace
On exit: if
,
returns the minimum
LIWORK.
- 23: LIWORK – INTEGERInput
On entry: the dimension of the array
IWORK as declared in the (sub)program from which F08YUF (ZTGSEN) is called.
If
, a workspace query is assumed; the routine only calculates the minimum sizes of the
WORK and
IWORK arrays, returns these values as the first entries of the
WORK and
IWORK arrays, and no error message related to
LWORK or
LIWORK is issued.
Constraints:
if
,
- if , or , ;
- if or , ;
- otherwise .
- 24: INFO – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
Errors or warnings detected by the routine:
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
Reordering of
failed because the transformed matrix pair
would be too far from generalized Schur form; the problem is very ill-conditioned.
may have been partially reordered. If requested,
is returned in
,
PL and
PR.
7 Accuracy
The computed generalized Schur form is nearly the exact generalized Schur form for nearby matrices
and
, where
and
is the
machine precision. See Section 4.11 of
Anderson et al. (1999) for further details of error bounds for the generalized nonsymmetric eigenproblem, and for information on the condition numbers returned.
The real analogue of this routine is
F08YGF (DTGSEN).
9 Example
This example reorders the generalized Schur factors
and
and update the matrices
and
given by
selecting the second and third generalized eigenvalues to be moved to the leading positions. Bases for the left and right deflating subspaces, and estimates of the condition numbers for the eigenvalues and Frobenius norm based bounds on the condition numbers for the deflating subspaces are also output.
9.1 Program Text
Program Text (f08yufe.f90)
9.2 Program Data
Program Data (f08yufe.d)
9.3 Program Results
Program Results (f08yufe.r)