1ZGGESX(1) LAPACK driver routine (version 3.2) ZGGESX(1)
2
3
4
6 ZGGESX - computes for a pair of N-by-N complex nonsymmetric matrices
7 (A,B), the generalized eigenvalues, the complex Schur form (S,T),
8
10 SUBROUTINE ZGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA, B,
11 LDB, SDIM, ALPHA, BETA, VSL, LDVSL, VSR, LDVSR,
12 RCONDE, RCONDV, WORK, LWORK, RWORK, 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 RCONDE( 2 ), RCONDV( 2 ), RWORK( * )
24
25 COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ), BETA( * ),
26 VSL( LDVSL, * ), VSR( LDVSR, * ), WORK( * )
27
28 LOGICAL SELCTG
29
30 EXTERNAL SELCTG
31
33 ZGGESX computes for a pair of N-by-N complex nonsymmetric matrices
34 (A,B), the generalized eigenvalues, the complex Schur form (S,T), and,
35 optionally, the left and/or right matrices of Schur vectors (VSL and
36 VSR). This gives the generalized Schur factorization
37 (A,B) = ( (VSL) S (VSR)**H, (VSL) T (VSR)**H )
38 where (VSR)**H is the conjugate-transpose of VSR.
39 Optionally, it also orders the eigenvalues so that a selected cluster
40 of eigenvalues appears in the leading diagonal blocks of the upper tri‐
41 angular matrix S and the upper triangular matrix T; computes a recipro‐
42 cal 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 A generalized eigenvalue for a pair of matrices (A,B) is a scalar w or
49 a ratio alpha/beta = w, such that A - w*B is singular. It is usually
50 represented as the pair (alpha,beta), as there is a reasonable inter‐
51 pretation for beta=0 or for both being zero. A pair of matrices (S,T)
52 is in generalized complex Schur form if T is upper triangular with non-
53 negative diagonal and S is upper triangular.
54
56 JOBVSL (input) CHARACTER*1
57 = 'N': do not compute the left Schur vectors;
58 = 'V': compute the left Schur vectors.
59
60 JOBVSR (input) CHARACTER*1
61 = 'N': do not compute the right Schur vectors;
62 = 'V': compute the right Schur vectors.
63
64 SORT (input) CHARACTER*1
65 Specifies whether or not to order the eigenvalues on the diago‐
66 nal of the generalized Schur form. = 'N': Eigenvalues are not
67 ordered;
68 = 'S': Eigenvalues are ordered (see SELCTG).
69
70 SELCTG (external procedure) LOGICAL FUNCTION of two COMPLEX*16 argu‐
71 ments
72 SELCTG must be declared EXTERNAL in the calling subroutine. If
73 SORT = 'N', SELCTG is not referenced. If SORT = 'S', SELCTG is
74 used to select eigenvalues to sort to the top left of the Schur
75 form. Note that a selected complex eigenvalue may no longer
76 satisfy SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
77 ordering may change the value of complex eigenvalues (espe‐
78 cially if the eigenvalue is ill-conditioned), in this case INFO
79 is set to N+3 see INFO below).
80
81 SENSE (input) CHARACTER*1
82 Determines which reciprocal condition numbers are computed. =
83 'N' : None are computed;
84 = 'E' : Computed for average of selected eigenvalues only;
85 = 'V' : Computed for selected deflating subspaces only;
86 = 'B' : Computed for both. If SENSE = 'E', 'V', or 'B', SORT
87 must equal 'S'.
88
89 N (input) INTEGER
90 The order of the matrices A, B, VSL, and VSR. N >= 0.
91
92 A (input/output) COMPLEX*16 array, dimension (LDA, N)
93 On entry, the first of the pair of matrices. On exit, A has
94 been overwritten by its generalized Schur form S.
95
96 LDA (input) INTEGER
97 The leading dimension of A. LDA >= max(1,N).
98
99 B (input/output) COMPLEX*16 array, dimension (LDB, N)
100 On entry, the second of the pair of matrices. On exit, B has
101 been overwritten by its generalized Schur form T.
102
103 LDB (input) INTEGER
104 The leading dimension of B. LDB >= max(1,N).
105
106 SDIM (output) INTEGER
107 If SORT = 'N', SDIM = 0. If SORT = 'S', SDIM = number of ei‐
108 genvalues (after sorting) for which SELCTG is true.
109
110 ALPHA (output) COMPLEX*16 array, dimension (N)
111 BETA (output) COMPLEX*16 array, dimension (N) On exit,
112 ALPHA(j)/BETA(j), j=1,...,N, will be the generalized eigenval‐
113 ues. ALPHA(j) and BETA(j),j=1,...,N are the diagonals of the
114 complex Schur form (S,T). BETA(j) will be non-negative real.
115 Note: the quotients ALPHA(j)/BETA(j) may easily over- or under‐
116 flow, and BETA(j) may even be zero. Thus, the user should
117 avoid naively computing the ratio alpha/beta. However, ALPHA
118 will be always less than and usually comparable with norm(A) in
119 magnitude, and BETA always less than and usually comparable
120 with norm(B).
121
122 VSL (output) COMPLEX*16 array, dimension (LDVSL,N)
123 If JOBVSL = 'V', VSL will contain the left Schur vectors. Not
124 referenced if JOBVSL = 'N'.
125
126 LDVSL (input) INTEGER
127 The leading dimension of the matrix VSL. LDVSL >=1, and if JOB‐
128 VSL = 'V', LDVSL >= N.
129
130 VSR (output) COMPLEX*16 array, dimension (LDVSR,N)
131 If JOBVSR = 'V', VSR will contain the right Schur vectors. Not
132 referenced if JOBVSR = 'N'.
133
134 LDVSR (input) INTEGER
135 The leading dimension of the matrix VSR. LDVSR >= 1, and if
136 JOBVSR = 'V', LDVSR >= N.
137
138 RCONDE (output) DOUBLE PRECISION array, dimension ( 2 )
139 If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
140 reciprocal condition numbers for the average of the selected
141 eigenvalues. Not referenced if SENSE = 'N' or 'V'.
142
143 RCONDV (output) DOUBLE PRECISION array, dimension ( 2 )
144 If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
145 reciprocal condition number for the selected deflating sub‐
146 spaces. Not referenced if SENSE = 'N' or 'E'.
147
148 WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
149 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
150
151 LWORK (input) INTEGER
152 The dimension of the array WORK. If N = 0, LWORK >= 1, else if
153 SENSE = 'E', 'V', or 'B', LWORK >= MAX(1,2*N,2*SDIM*(N-SDIM)),
154 else LWORK >= MAX(1,2*N). Note that 2*SDIM*(N-SDIM) <= N*N/2.
155 Note also that an error is only returned if LWORK < MAX(1,2*N),
156 but if SENSE = 'E' or 'V' or 'B' this may not be large enough.
157 If LWORK = -1, then a workspace query is assumed; the routine
158 only calculates the bound on the optimal size of the WORK array
159 and the minimum size of the IWORK array, returns these values
160 as the first entries of the WORK and IWORK arrays, and no error
161 message related to LWORK or LIWORK is issued by XERBLA.
162
163 RWORK (workspace) DOUBLE PRECISION array, dimension ( 8*N )
164 Real workspace.
165
166 IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
167 On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
168
169 LIWORK (input) INTEGER
170 The dimension of the array IWORK. If SENSE = 'N' or N = 0,
171 LIWORK >= 1, otherwise LIWORK >= N+2. If LIWORK = -1, then a
172 workspace query is assumed; the routine only calculates the
173 bound on the optimal size of the WORK array and the minimum
174 size of the IWORK array, returns these values as the first
175 entries of the WORK and IWORK arrays, and no error message
176 related to LWORK or LIWORK is issued by XERBLA.
177
178 BWORK (workspace) LOGICAL array, dimension (N)
179 Not referenced if SORT = 'N'.
180
181 INFO (output) INTEGER
182 = 0: successful exit
183 < 0: if INFO = -i, the i-th argument had an illegal value.
184 = 1,...,N: The QZ iteration failed. (A,B) are not in Schur
185 form, but ALPHA(j) and BETA(j) should be correct for
186 j=INFO+1,...,N. > N: =N+1: other than QZ iteration failed in
187 ZHGEQZ
188 =N+2: after reordering, roundoff changed values of some complex
189 eigenvalues so that leading eigenvalues in the Generalized
190 Schur form no longer satisfy SELCTG=.TRUE. This could also be
191 caused due to scaling. =N+3: reordering failed in ZTGSEN.
192
193
194
195 LAPACK driver routine (version 3.N2o)vember 2008 ZGGESX(1)