1DTGEX2(1) LAPACK auxiliary routine (version 3.1) DTGEX2(1)
2
3
4
6 DTGEX2 - adjacent diagonal blocks (A11, B11) and (A22, B22) of size
7 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair (A, B) by
8 an orthogonal equivalence transformation
9
11 SUBROUTINE DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, LDZ, J1,
12 N1, N2, WORK, LWORK, INFO )
13
14 LOGICAL WANTQ, WANTZ
15
16 INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2
17
18 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
19 WORK( * ), Z( LDZ, * )
20
22 DTGEX2 swaps adjacent diagonal blocks (A11, B11) and (A22, B22) of size
23 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair (A, B) by
24 an orthogonal equivalence transformation.
25
26 (A, B) must be in generalized real Schur canonical form (as returned by
27 DGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2 diago‐
28 nal blocks. B is upper triangular.
29
30 Optionally, the matrices Q and Z of generalized Schur vectors are
31 updated.
32
33 Q(in) * A(in) * Z(in)' = Q(out) * A(out) * Z(out)'
34 Q(in) * B(in) * Z(in)' = Q(out) * B(out) * Z(out)'
35
36
37
39 WANTQ (input) LOGICAL
40
41 WANTZ (input) LOGICAL
42
43 N (input) INTEGER
44 The order of the matrices A and B. N >= 0.
45
46 A (input/output) DOUBLE PRECISION arrays, dimensions (LDA,N)
47 On entry, the matrix A in the pair (A, B). On exit, the updated
48 matrix A.
49
50 LDA (input) INTEGER
51 The leading dimension of the array A. LDA >= max(1,N).
52
53 B (input/output) DOUBLE PRECISION arrays, dimensions (LDB,N)
54 On entry, the matrix B in the pair (A, B). On exit, the updated
55 matrix B.
56
57 LDB (input) INTEGER
58 The leading dimension of the array B. LDB >= max(1,N).
59
60 Q (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
61 On entry, if WANTQ = .TRUE., the orthogonal matrix Q. On exit,
62 the updated matrix Q. Not referenced if WANTQ = .FALSE..
63
64 LDQ (input) INTEGER
65 The leading dimension of the array Q. LDQ >= 1. If WANTQ =
66 .TRUE., LDQ >= N.
67
68 Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
69 On entry, if WANTZ =.TRUE., the orthogonal matrix Z. On exit,
70 the updated matrix Z. Not referenced if WANTZ = .FALSE..
71
72 LDZ (input) INTEGER
73 The leading dimension of the array Z. LDZ >= 1. If WANTZ =
74 .TRUE., LDZ >= N.
75
76 J1 (input) INTEGER
77 The index to the first block (A11, B11). 1 <= J1 <= N.
78
79 N1 (input) INTEGER
80 The order of the first block (A11, B11). N1 = 0, 1 or 2.
81
82 N2 (input) INTEGER
83 The order of the second block (A22, B22). N2 = 0, 1 or 2.
84
85 WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)).
86
87 LWORK (input) INTEGER
88 The dimension of the array WORK. LWORK >= MAX( 1, N*(N2+N1),
89 (N2+N1)*(N2+N1)*2 )
90
91 INFO (output) INTEGER
92 =0: Successful exit
93 >0: If INFO = 1, the transformed matrix (A, B) would be too far
94 from generalized Schur form; the blocks are not swapped and (A,
95 B) and (Q, Z) are unchanged. The problem of swapping is too
96 ill-conditioned. <0: If INFO = -16: LWORK is too small. Appro‐
97 priate value for LWORK is returned in WORK(1).
98
100 Based on contributions by
101 Bo Kagstrom and Peter Poromaa, Department of Computing Science,
102 Umea University, S-901 87 Umea, Sweden.
103
104 In the current code both weak and strong stability tests are performed.
105 The user can omit the strong stability test by changing the internal
106 logical parameter WANDS to .FALSE.. See ref. [2] for details.
107
108 [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
109 Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
110 M.S. Moonen et al (eds), Linear Algebra for Large Scale and
111 Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
112
113 [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
114 Eigenvalues of a Regular Matrix Pair (A, B) and Condition
115 Estimation: Theory, Algorithms and Software,
116 Report UMINF - 94.04, Department of Computing Science, Umea
117 University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
118 Note 87. To appear in Numerical Algorithms, 1996.
119
120
121
122
123 LAPACK auxiliary routine (versionNo3v.e1m)ber 2006 DTGEX2(1)