1DGGESX(1) LAPACK driver routine (version 3.1) DGGESX(1)
2
3
4
6 DGGESX - for a pair of N-by-N real nonsymmetric matrices (A,B), the
7 generalized eigenvalues, the real Schur form (S,T), and,
8
10 SUBROUTINE DGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA, B,
11 LDB, SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR,
12 LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK, LIWORK,
13 BWORK, INFO )
14
15 CHARACTER JOBVSL, JOBVSR, SENSE, SORT
16
17 INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LIWORK, LWORK, N, SDIM
18
19 LOGICAL BWORK( * )
20
21 INTEGER IWORK( * )
22
23 DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ), B(
24 LDB, * ), BETA( * ), RCONDE( 2 ), RCONDV( 2 ), VSL(
25 LDVSL, * ), VSR( LDVSR, * ), WORK( * )
26
27 LOGICAL SELCTG
28
29 EXTERNAL SELCTG
30
32 DGGESX computes for a pair of N-by-N real nonsymmetric matrices (A,B),
33 the generalized eigenvalues, the real Schur form (S,T), and, option‐
34 ally, the left and/or right matrices of Schur vectors (VSL and VSR).
35 This gives the generalized Schur factorization
36
37 (A,B) = ( (VSL) S (VSR)**T, (VSL) T (VSR)**T )
38
39 Optionally, it also orders the eigenvalues so that a selected cluster
40 of eigenvalues appears in the leading diagonal blocks of the upper
41 quasi-triangular matrix S and the upper triangular matrix T; computes a
42 reciprocal condition number for the average of the selected eigenvalues
43 (RCONDE); and computes a reciprocal condition number for the right and
44 left deflating subspaces corresponding to the selected eigenvalues
45 (RCONDV). The leading columns of VSL and VSR then form an orthonormal
46 basis for the corresponding left and right eigenspaces (deflating sub‐
47 spaces).
48
49 A generalized eigenvalue for a pair of matrices (A,B) is a scalar w or
50 a ratio alpha/beta = w, such that A - w*B is singular. It is usually
51 represented as the pair (alpha,beta), as there is a reasonable inter‐
52 pretation for beta=0 or for both being zero.
53
54 A pair of matrices (S,T) is in generalized real Schur form if T is
55 upper triangular with non-negative diagonal and S is block upper trian‐
56 gular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond to real
57 generalized eigenvalues, while 2-by-2 blocks of S will be "standard‐
58 ized" by making the corresponding elements of T have the form:
59 [ a 0 ]
60 [ 0 b ]
61
62 and the pair of corresponding 2-by-2 blocks in S and T will have a com‐
63 plex conjugate pair of generalized eigenvalues.
64
65
66
68 JOBVSL (input) CHARACTER*1
69 = 'N': do not compute the left Schur vectors;
70 = 'V': compute the left Schur vectors.
71
72 JOBVSR (input) CHARACTER*1
73 = 'N': do not compute the right Schur vectors;
74 = 'V': compute the right Schur vectors.
75
76 SORT (input) CHARACTER*1
77 Specifies whether or not to order the eigenvalues on the diago‐
78 nal of the generalized Schur form. = 'N': Eigenvalues are not
79 ordered;
80 = 'S': Eigenvalues are ordered (see SELCTG).
81
82 SELCTG (external procedure) LOGICAL FUNCTION of three DOUBLE PRECISION
83 arguments
84 SELCTG must be declared EXTERNAL in the calling subroutine. If
85 SORT = 'N', SELCTG is not referenced. If SORT = 'S', SELCTG is
86 used to select eigenvalues to sort to the top left of the Schur
87 form. An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected
88 if SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
89 one of a complex conjugate pair of eigenvalues is selected,
90 then both complex eigenvalues are selected. Note that a
91 selected complex eigenvalue may no longer satisfy
92 SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) = .TRUE. after ordering,
93 since ordering may change the value of complex eigenvalues
94 (especially if the eigenvalue is ill-conditioned), in this case
95 INFO is set to N+3.
96
97 SENSE (input) CHARACTER*1
98 Determines which reciprocal condition numbers are computed. =
99 'N' : None are computed;
100 = 'E' : Computed for average of selected eigenvalues only;
101 = 'V' : Computed for selected deflating subspaces only;
102 = 'B' : Computed for both. If SENSE = 'E', 'V', or 'B', SORT
103 must equal 'S'.
104
105 N (input) INTEGER
106 The order of the matrices A, B, VSL, and VSR. N >= 0.
107
108 A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
109 On entry, the first of the pair of matrices. On exit, A has
110 been overwritten by its generalized Schur form S.
111
112 LDA (input) INTEGER
113 The leading dimension of A. LDA >= max(1,N).
114
115 B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
116 On entry, the second of the pair of matrices. On exit, B has
117 been overwritten by its generalized Schur form T.
118
119 LDB (input) INTEGER
120 The leading dimension of B. LDB >= max(1,N).
121
122 SDIM (output) INTEGER
123 If SORT = 'N', SDIM = 0. If SORT = 'S', SDIM = number of ei‐
124 genvalues (after sorting) for which SELCTG is true. (Complex
125 conjugate pairs for which SELCTG is true for either eigenvalue
126 count as 2.)
127
128 ALPHAR (output) DOUBLE PRECISION array, dimension (N)
129 ALPHAI (output) DOUBLE PRECISION array, dimension (N) BETA
130 (output) DOUBLE PRECISION array, dimension (N) On exit,
131 (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will be the gen‐
132 eralized eigenvalues. ALPHAR(j) + ALPHAI(j)*i and
133 BETA(j),j=1,...,N are the diagonals of the complex Schur form
134 (S,T) that would result if the 2-by-2 diagonal blocks of the
135 real Schur form of (A,B) were further reduced to triangular
136 form using 2-by-2 complex unitary transformations. If
137 ALPHAI(j) is zero, then the j-th eigenvalue is real; if posi‐
138 tive, then the j-th and (j+1)-st eigenvalues are a complex con‐
139 jugate pair, with ALPHAI(j+1) negative.
140
141 Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j) may
142 easily over- or underflow, and BETA(j) may even be zero. Thus,
143 the user should avoid naively computing the ratio. However,
144 ALPHAR and ALPHAI will be always less than and usually compara‐
145 ble with norm(A) in magnitude, and BETA always less than and
146 usually comparable with norm(B).
147
148 VSL (output) DOUBLE PRECISION array, dimension (LDVSL,N)
149 If JOBVSL = 'V', VSL will contain the left Schur vectors. Not
150 referenced if JOBVSL = 'N'.
151
152 LDVSL (input) INTEGER
153 The leading dimension of the matrix VSL. LDVSL >=1, and if JOB‐
154 VSL = 'V', LDVSL >= N.
155
156 VSR (output) DOUBLE PRECISION array, dimension (LDVSR,N)
157 If JOBVSR = 'V', VSR will contain the right Schur vectors. Not
158 referenced if JOBVSR = 'N'.
159
160 LDVSR (input) INTEGER
161 The leading dimension of the matrix VSR. LDVSR >= 1, and if
162 JOBVSR = 'V', LDVSR >= N.
163
164 RCONDE (output) DOUBLE PRECISION array, dimension ( 2 )
165 If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
166 reciprocal condition numbers for the average of the selected
167 eigenvalues. Not referenced if SENSE = 'N' or 'V'.
168
169 RCONDV (output) DOUBLE PRECISION array, dimension ( 2 )
170 If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
171 reciprocal condition numbers for the selected deflating sub‐
172 spaces. Not referenced if SENSE = 'N' or 'E'.
173
174 WORK (workspace/output) DOUBLE PRECISION array, dimension
175 (MAX(1,LWORK))
176 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
177
178 LWORK (input) INTEGER
179 The dimension of the array WORK. If N = 0, LWORK >= 1, else if
180 SENSE = 'E', 'V', or 'B', LWORK >= max( 8*N, 6*N+16, 2*SDIM*(N-
181 SDIM) ), else LWORK >= max( 8*N, 6*N+16 ). Note that
182 2*SDIM*(N-SDIM) <= N*N/2. Note also that an error is only
183 returned if LWORK < max( 8*N, 6*N+16), but if SENSE = 'E' or
184 'V' or 'B' this may not be large enough.
185
186 If LWORK = -1, then a workspace query is assumed; the routine
187 only calculates the bound on the optimal size of the WORK array
188 and the minimum size of the IWORK array, returns these values
189 as the first entries of the WORK and IWORK arrays, and no error
190 message related to LWORK or LIWORK is issued by XERBLA.
191
192 IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))
193 On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
194
195 LIWORK (input) INTEGER
196 The dimension of the array IWORK. If SENSE = 'N' or N = 0,
197 LIWORK >= 1, otherwise LIWORK >= N+6.
198
199 If LIWORK = -1, then a workspace query is assumed; the routine
200 only calculates the bound on the optimal size of the WORK array
201 and the minimum size of the IWORK array, returns these values
202 as the first entries of the WORK and IWORK arrays, and no error
203 message related to LWORK or LIWORK is issued by XERBLA.
204
205 BWORK (workspace) LOGICAL array, dimension (N)
206 Not referenced if SORT = 'N'.
207
208 INFO (output) INTEGER
209 = 0: successful exit
210 < 0: if INFO = -i, the i-th argument had an illegal value.
211 = 1,...,N: The QZ iteration failed. (A,B) are not in Schur
212 form, but ALPHAR(j), ALPHAI(j), and BETA(j) should be correct
213 for j=INFO+1,...,N. > N: =N+1: other than QZ iteration failed
214 in DHGEQZ
215 =N+2: after reordering, roundoff changed values of some complex
216 eigenvalues so that leading eigenvalues in the Generalized
217 Schur form no longer satisfy SELCTG=.TRUE. This could also be
218 caused due to scaling. =N+3: reordering failed in DTGSEN.
219
220 Further details ===============
221
222 An approximate (asymptotic) bound on the average absolute error
223 of the selected eigenvalues is
224
225 EPS * norm((A, B)) / RCONDE( 1 ).
226
227 An approximate (asymptotic) bound on the maximum angular error
228 in the computed deflating subspaces is
229
230 EPS * norm((A, B)) / RCONDV( 2 ).
231
232 See LAPACK User's Guide, section 4.11 for more information.
233
234
235
236 LAPACK driver routine (version 3.N1o)vember 2006 DGGESX(1)