1ZGGES(1) LAPACK driver routine (version 3.1) ZGGES(1)
2
3
4
6 ZGGES - for a pair of N-by-N complex nonsymmetric matrices (A,B), the
7 generalized eigenvalues, the generalized complex Schur form (S, T), and
8 optionally left and/or right Schur vectors (VSL and VSR)
9
11 SUBROUTINE ZGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
12 SDIM, ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
13 LWORK, RWORK, BWORK, INFO )
14
15 CHARACTER JOBVSL, JOBVSR, SORT
16
17 INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM
18
19 LOGICAL BWORK( * )
20
21 DOUBLE PRECISION RWORK( * )
22
23 COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ), BETA( * ), VSL(
24 LDVSL, * ), VSR( LDVSR, * ), WORK( * )
25
26 LOGICAL SELCTG
27
28 EXTERNAL SELCTG
29
31 ZGGES computes for a pair of N-by-N complex nonsymmetric matrices
32 (A,B), the generalized eigenvalues, the generalized complex Schur form
33 (S, T), and optionally left and/or right Schur vectors (VSL and VSR).
34 This gives the generalized Schur factorization
35
36 (A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H )
37
38 where (VSR)**H is the conjugate-transpose of VSR.
39
40 Optionally, it also orders the eigenvalues so that a selected cluster
41 of eigenvalues appears in the leading diagonal blocks of the upper tri‐
42 angular matrix S and the upper triangular matrix T. The leading columns
43 of VSL and VSR then form an unitary basis for the corresponding left
44 and right eigenspaces (deflating subspaces).
45
46 (If only the generalized eigenvalues are needed, use the driver ZGGEV
47 instead, which is faster.)
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, and even for both being zero.
53
54 A pair of matrices (S,T) is in generalized complex Schur form if S and
55 T are upper triangular and, in addition, the diagonal elements of T are
56 non-negative real numbers.
57
58
60 JOBVSL (input) CHARACTER*1
61 = 'N': do not compute the left Schur vectors;
62 = 'V': compute the left Schur vectors.
63
64 JOBVSR (input) CHARACTER*1
65 = 'N': do not compute the right Schur vectors;
66 = 'V': compute the right Schur vectors.
67
68 SORT (input) CHARACTER*1
69 Specifies whether or not to order the eigenvalues on the diago‐
70 nal of the generalized Schur form. = 'N': Eigenvalues are not
71 ordered;
72 = 'S': Eigenvalues are ordered (see SELCTG).
73
74 SELCTG (external procedure) LOGICAL FUNCTION of two COMPLEX*16 argu‐
75 ments
76 SELCTG must be declared EXTERNAL in the calling subroutine. If
77 SORT = 'N', SELCTG is not referenced. If SORT = 'S', SELCTG is
78 used to select eigenvalues to sort to the top left of the Schur
79 form. An eigenvalue ALPHA(j)/BETA(j) is selected if
80 SELCTG(ALPHA(j),BETA(j)) is true.
81
82 Note that a selected complex eigenvalue may no longer satisfy
83 SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since order‐
84 ing may change the value of complex eigenvalues (especially if
85 the eigenvalue is ill-conditioned), in this case INFO is set to
86 N+2 (See INFO below).
87
88 N (input) INTEGER
89 The order of the matrices A, B, VSL, and VSR. N >= 0.
90
91 A (input/output) COMPLEX*16 array, dimension (LDA, N)
92 On entry, the first of the pair of matrices. On exit, A has
93 been overwritten by its generalized Schur form S.
94
95 LDA (input) INTEGER
96 The leading dimension of A. LDA >= max(1,N).
97
98 B (input/output) COMPLEX*16 array, dimension (LDB, N)
99 On entry, the second of the pair of matrices. On exit, B has
100 been overwritten by its generalized Schur form T.
101
102 LDB (input) INTEGER
103 The leading dimension of B. LDB >= max(1,N).
104
105 SDIM (output) INTEGER
106 If SORT = 'N', SDIM = 0. If SORT = 'S', SDIM = number of ei‐
107 genvalues (after sorting) for which SELCTG is true.
108
109 ALPHA (output) COMPLEX*16 array, dimension (N)
110 BETA (output) COMPLEX*16 array, dimension (N) On exit,
111 ALPHA(j)/BETA(j), j=1,...,N, will be the generalized eigenval‐
112 ues. ALPHA(j), j=1,...,N and BETA(j), j=1,...,N are the
113 diagonals of the complex Schur form (A,B) output by ZGGES. The
114 BETA(j) will be non-negative real.
115
116 Note: the quotients ALPHA(j)/BETA(j) may easily over- or under‐
117 flow, and BETA(j) may even be zero. Thus, the user should
118 avoid naively computing the ratio alpha/beta. However, ALPHA
119 will be always less than and usually comparable with norm(A) in
120 magnitude, and BETA always less than and usually comparable
121 with norm(B).
122
123 VSL (output) COMPLEX*16 array, dimension (LDVSL,N)
124 If JOBVSL = 'V', VSL will contain the left Schur vectors. Not
125 referenced if JOBVSL = 'N'.
126
127 LDVSL (input) INTEGER
128 The leading dimension of the matrix VSL. LDVSL >= 1, and if
129 JOBVSL = 'V', LDVSL >= N.
130
131 VSR (output) COMPLEX*16 array, dimension (LDVSR,N)
132 If JOBVSR = 'V', VSR will contain the right Schur vectors. Not
133 referenced if JOBVSR = 'N'.
134
135 LDVSR (input) INTEGER
136 The leading dimension of the matrix VSR. LDVSR >= 1, and if
137 JOBVSR = 'V', LDVSR >= N.
138
139 WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
140 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
141
142 LWORK (input) INTEGER
143 The dimension of the array WORK. LWORK >= max(1,2*N). For
144 good performance, LWORK must generally be larger.
145
146 If LWORK = -1, then a workspace query is assumed; the routine
147 only calculates the optimal size of the WORK array, returns
148 this value as the first entry of the WORK array, and no error
149 message related to LWORK is issued by XERBLA.
150
151 RWORK (workspace) DOUBLE PRECISION array, dimension (8*N)
152
153 BWORK (workspace) LOGICAL array, dimension (N)
154 Not referenced if SORT = 'N'.
155
156 INFO (output) INTEGER
157 = 0: successful exit
158 < 0: if INFO = -i, the i-th argument had an illegal value.
159 =1,...,N: The QZ iteration failed. (A,B) are not in Schur
160 form, but ALPHA(j) and BETA(j) should be correct for
161 j=INFO+1,...,N. > N: =N+1: other than QZ iteration failed in
162 ZHGEQZ
163 =N+2: after reordering, roundoff changed values of some complex
164 eigenvalues so that leading eigenvalues in the Generalized
165 Schur form no longer satisfy SELCTG=.TRUE. This could also be
166 caused due to scaling. =N+3: reordering falied in ZTGSEN.
167
168
169
170 LAPACK driver routine (version 3.N1o)vember 2006 ZGGES(1)