1CGGES(1) LAPACK driver routine (version 3.2) CGGES(1)
2
3
4
6 CGGES - 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 CGGES( 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 REAL RWORK( * )
22
23 COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ), BETA( * ), VSL(
24 LDVSL, * ), VSR( LDVSR, * ), WORK( * )
25
26 LOGICAL SELCTG
27
28 EXTERNAL SELCTG
29
31 CGGES 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 CGGEV 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 arguments
67 SELCTG must be declared EXTERNAL in the calling subroutine. If
68 SORT = 'N', SELCTG is not referenced. If SORT = 'S', SELCTG is
69 used to select eigenvalues to sort to the top left of the Schur
70 form. An eigenvalue ALPHA(j)/BETA(j) is selected if
71 SELCTG(ALPHA(j),BETA(j)) is true. Note that a selected complex
72 eigenvalue may no longer satisfy SELCTG(ALPHA(j),BETA(j)) =
73 .TRUE. after ordering, since ordering may change the value of
74 complex eigenvalues (especially if the eigenvalue is ill-condi‐
75 tioned), in this case INFO is set to N+2 (See INFO below).
76
77 N (input) INTEGER
78 The order of the matrices A, B, VSL, and VSR. N >= 0.
79
80 A (input/output) COMPLEX array, dimension (LDA, N)
81 On entry, the first of the pair of matrices. On exit, A has
82 been overwritten by its generalized Schur form S.
83
84 LDA (input) INTEGER
85 The leading dimension of A. LDA >= max(1,N).
86
87 B (input/output) COMPLEX array, dimension (LDB, N)
88 On entry, the second of the pair of matrices. On exit, B has
89 been overwritten by its generalized Schur form T.
90
91 LDB (input) INTEGER
92 The leading dimension of B. LDB >= max(1,N).
93
94 SDIM (output) INTEGER
95 If SORT = 'N', SDIM = 0. If SORT = 'S', SDIM = number of ei‐
96 genvalues (after sorting) for which SELCTG is true.
97
98 ALPHA (output) COMPLEX array, dimension (N)
99 BETA (output) COMPLEX array, dimension (N) On exit,
100 ALPHA(j)/BETA(j), j=1,...,N, will be the generalized eigenval‐
101 ues. ALPHA(j), j=1,...,N and BETA(j), j=1,...,N are the
102 diagonals of the complex Schur form (A,B) output by CGGES. The
103 BETA(j) will be non-negative real. Note: the quotients
104 ALPHA(j)/BETA(j) may easily over- or underflow, and BETA(j) may
105 even be zero. Thus, the user should avoid naively computing
106 the ratio alpha/beta. However, ALPHA will be always less than
107 and usually comparable with norm(A) in magnitude, and BETA
108 always less than and usually comparable with norm(B).
109
110 VSL (output) COMPLEX array, dimension (LDVSL,N)
111 If JOBVSL = 'V', VSL will contain the left Schur vectors. Not
112 referenced if JOBVSL = 'N'.
113
114 LDVSL (input) INTEGER
115 The leading dimension of the matrix VSL. LDVSL >= 1, and if
116 JOBVSL = 'V', LDVSL >= N.
117
118 VSR (output) COMPLEX array, dimension (LDVSR,N)
119 If JOBVSR = 'V', VSR will contain the right Schur vectors. Not
120 referenced if JOBVSR = 'N'.
121
122 LDVSR (input) INTEGER
123 The leading dimension of the matrix VSR. LDVSR >= 1, and if
124 JOBVSR = 'V', LDVSR >= N.
125
126 WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
127 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
128
129 LWORK (input) INTEGER
130 The dimension of the array WORK. LWORK >= max(1,2*N). For
131 good performance, LWORK must generally be larger. If LWORK =
132 -1, then a workspace query is assumed; the routine only calcu‐
133 lates the optimal size of the WORK array, returns this value as
134 the first entry of the WORK array, and no error message related
135 to LWORK is issued by XERBLA.
136
137 RWORK (workspace) REAL array, dimension (8*N)
138
139 BWORK (workspace) LOGICAL array, dimension (N)
140 Not referenced if SORT = 'N'.
141
142 INFO (output) INTEGER
143 = 0: successful exit
144 < 0: if INFO = -i, the i-th argument had an illegal value.
145 =1,...,N: The QZ iteration failed. (A,B) are not in Schur
146 form, but ALPHA(j) and BETA(j) should be correct for
147 j=INFO+1,...,N. > N: =N+1: other than QZ iteration failed in
148 CHGEQZ
149 =N+2: after reordering, roundoff changed values of some complex
150 eigenvalues so that leading eigenvalues in the Generalized
151 Schur form no longer satisfy SELCTG=.TRUE. This could also be
152 caused due to scaling. =N+3: reordering falied in CTGSEN.
153
154
155
156 LAPACK driver routine (version 3.N2o)vember 2008 CGGES(1)