F08YFF (DTGEXC) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08YFF (DTGEXC)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

 Contents

    1  Purpose
    7  Accuracy

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 n by n matrix pair S,T in real generalized Schur form, so that the diagonal element or block of S,T with row index i1 is moved to row i2, using an orthogonal equivalence transformation. That is, S and T are factorized as
S = Q^ S^ Z^T ,   T= Q^ T^ Z^T ,  
where S^,T^ are also in real generalized Schur form.
The pair S,T are in real generalized Schur form if S is block upper triangular with 1 by 1 and 2 by 2 diagonal blocks and T is upper triangular as returned, for example, by F08XAF (DGGES), or F08XEF (DHGEQZ) with JOB='S'.
If S and T are the result of a generalized Schur factorization of a matrix pair A,B 
A = QSZT ,   B= QTZT  
then, optionally, the matrices Q and Z can be updated as QQ^ and ZZ^.

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:     WANTQ – LOGICALInput
On entry: if WANTQ=.TRUE., update the left transformation matrix Q.
If WANTQ=.FALSE., do not update Q.
2:     WANTZ – LOGICALInput
On entry: if WANTZ=.TRUE., update the right transformation matrix Z.
If WANTZ=.FALSE., do not update Z.
3:     N – INTEGERInput
On entry: n, the order of the matrices S and T.
Constraint: N0.
4:     ALDA* – REAL (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array A must be at least max1,N.
On entry: the matrix S in the pair S,T.
On exit: the updated matrix S^.
5:     LDA – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F08YFF (DTGEXC) is called.
Constraint: LDAmax1,N.
6:     BLDB* – REAL (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array B must be at least max1,N.
On entry: the matrix T, in the pair S,T.
On exit: the updated matrix T^ 
7:     LDB – INTEGERInput
On entry: the first dimension of the array B as declared in the (sub)program from which F08YFF (DTGEXC) is called.
Constraint: LDBmax1,N.
8:     QLDQ* – REAL (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array Q must be at least max1,N if WANTQ=.TRUE., and at least 1 otherwise.
On entry: if WANTQ=.TRUE., the orthogonal matrix Q.
On exit: if WANTQ=.TRUE., the updated matrix QQ^.
If WANTQ=.FALSE., Q is not referenced.
9:     LDQ – INTEGERInput
On entry: the first dimension of the array Q as declared in the (sub)program from which F08YFF (DTGEXC) is called.
Constraints:
  • if WANTQ=.TRUE., LDQ max1,N ;
  • otherwise LDQ1.
10:   ZLDZ* – REAL (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array Z must be at least max1,N if WANTZ=.TRUE., and at least 1 otherwise.
On entry: if WANTZ=.TRUE., the orthogonal matrix Z.
On exit: if WANTZ=.TRUE., the updated matrix ZZ^.
If WANTZ=.FALSE., Z is not referenced.
11:   LDZ – INTEGERInput
On entry: the first dimension of the array Z as declared in the (sub)program from which F08YFF (DTGEXC) is called.
Constraints:
  • if WANTZ=.TRUE., LDZ max1,N ;
  • otherwise LDZ1.
12:   IFST – INTEGERInput/Output
13:   ILST – INTEGERInput/Output
On entry: the indices i1 and i2 that specify the reordering of the diagonal blocks of S,T. 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 2 by 2 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 +1 or -1).
Constraint: 1IFSTN and 1ILSTN.
14:   WORKmax1,LWORK – REAL (KIND=nag_wp) arrayWorkspace
On exit: if INFO=0, WORK1 contains the minimum value of LWORK required for optimal performance.
15:   LWORK – INTEGERInput
On entry: the dimension of the array WORK as declared in the (sub)program from which F08YFF (DTGEXC) is called.
If LWORK=-1, 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 LWORK-1,
  • if N1, LWORK1;
  • otherwise LWORK4×N+16.
16:   INFO – INTEGEROutput
On exit: INFO=0 unless the routine detects an error (see Section 6).

6  Error Indicators and Warnings

INFO<0
If INFO=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.
INFO=1
The transformed matrix pair S^,T^ would be too far from generalized Schur form; the problem is ill-conditioned. S,T 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 S+E and T+F, where
E2 = Oε S2   and   F2= Oε T2 ,  
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.

9  Further Comments

The complex analogue of this routine is F08YTF (ZTGEXC).

10  Example

This example exchanges blocks 2 and 1 of the matrix pair S,T, where
S = 4.0 1.0 1.0 2.0 0.0 3.0 4.0 1.0 0.0 1.0 3.0 1.0 0.0 0.0 0.0 6.0   and   T= 2.0 1.0 1.0 3.0 0.0 1.0 2.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 0.0 2.0 .  

10.1  Program Text

Program Text (f08yffe.f90)

10.2  Program Data

Program Data (f08yffe.d)

10.3  Program Results

Program Results (f08yffe.r)


F08YFF (DTGEXC) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015