NAG Library Routine Document
F08YFF (DTGEXC)
1 Purpose
F08YFF (DTGEXC) reorders the generalized Schur factorization of a matrix pair in real generalized Schur form.
2 Specification
SUBROUTINE F08YFF ( |
WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, LDZ, IFST, ILST, WORK, LWORK, INFO) |
INTEGER |
N, LDA, LDB, LDQ, LDZ, IFST, ILST, LWORK, INFO |
REAL (KIND=nag_wp) |
A(LDA,*), B(LDB,*), Q(LDQ,*), Z(LDZ,*), WORK(max(1,LWORK)) |
LOGICAL |
WANTQ, WANTZ |
|
The routine may be called by its
LAPACK
name dtgexc.
3 Description
F08YFF (DTGEXC) reorders the generalized real
by
matrix pair
in real generalized Schur form, so that the diagonal element or block of
with row index
is moved to row
, using an orthogonal equivalence transformation. That is,
and
are factorized as
where
are also in real generalized Schur form.
The pair
are in real generalized Schur form if
is block upper triangular with
by
and
by
diagonal blocks and
is upper triangular as returned, for example, by
F08XAF (DGGES), or
F08XEF (DHGEQZ) with
.
If
and
are the result of a generalized Schur factorization of a matrix pair
then, optionally, the matrices
and
can be updated as
and
.
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/lug
5 Parameters
- 1: – LOGICALInput
-
On entry: if
, update the left transformation matrix
.
If , do not update .
- 2: – LOGICALInput
-
On entry: if
, update the right transformation matrix
.
If , do not update .
- 3: – INTEGERInput
-
On entry: , the order of the matrices and .
Constraint:
.
- 4: – REAL (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 .
- 5: – INTEGERInput
-
On entry: the first dimension of the array
A as declared in the (sub)program from which F08YFF (DTGEXC) is called.
Constraint:
.
- 6: – REAL (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
- 7: – INTEGERInput
-
On entry: the first dimension of the array
B as declared in the (sub)program from which F08YFF (DTGEXC) is called.
Constraint:
.
- 8: – REAL (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 orthogonal matrix .
On exit: if
, the updated matrix
.
If
,
Q is not referenced.
- 9: – INTEGERInput
-
On entry: the first dimension of the array
Q as declared in the (sub)program from which F08YFF (DTGEXC) is called.
Constraints:
- if , ;
- otherwise .
- 10: – REAL (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 orthogonal matrix .
On exit: if
, the updated matrix
.
If
,
Z is not referenced.
- 11: – INTEGERInput
-
On entry: the first dimension of the array
Z as declared in the (sub)program from which F08YFF (DTGEXC) is called.
Constraints:
- if , ;
- otherwise .
- 12: – INTEGERInput/Output
- 13: – INTEGERInput/Output
-
On entry: the indices
and
that specify the reordering of the diagonal blocks of
. The block with row index
IFST is moved to row
ILST, by a sequence of swapping between adjacent blocks.
On exit: if
IFST pointed on entry to the second row of a
by
block, it is changed to point to the first row;
ILST always points to the first row of the block in its final position (which may differ from its input value by
or
).
Constraint:
and .
- 14: – REAL (KIND=nag_wp) arrayWorkspace
-
On exit: if
,
contains the minimum value of
LWORK required for optimal performance.
- 15: – INTEGERInput
-
On entry: the dimension of the array
WORK as declared in the (sub)program from which F08YFF (DTGEXC) is called.
If
, a workspace query is assumed; the routine only calculates the minimum size of the
WORK array, returns this value as the first entry of the
WORK array, and no error message related to
LWORK is issued.
Constraints:
if
,
- if , ;
- otherwise .
- 16: – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
-
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
-
The transformed matrix pair
would be too far from generalized Schur form; the problem is ill-conditioned.
may have been partially reordered, and
ILST points to the first row of the current position of the block being moved.
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.
8 Parallelism and Performance
F08YFF (DTGEXC) is not threaded by NAG in any implementation.
F08YFF (DTGEXC) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
The complex analogue of this routine is
F08YTF (ZTGEXC).
10 Example
This example exchanges blocks
and
of the matrix pair
, where
10.1 Program Text
Program Text (f08yffe.f90)
10.2 Program Data
Program Data (f08yffe.d)
10.3 Program Results
Program Results (f08yffe.r)