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