1CGEESX(1) LAPACK driver routine (version 3.1) CGEESX(1)
2
3
4
6 CGEESX - for an N-by-N complex nonsymmetric matrix A, the eigenvalues,
7 the Schur form T, and, optionally, the matrix of Schur vectors Z
8
10 SUBROUTINE CGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM, W, VS,
11 LDVS, RCONDE, RCONDV, WORK, LWORK, RWORK, BWORK,
12 INFO )
13
14 CHARACTER JOBVS, SENSE, SORT
15
16 INTEGER INFO, LDA, LDVS, LWORK, N, SDIM
17
18 REAL RCONDE, RCONDV
19
20 LOGICAL BWORK( * )
21
22 REAL RWORK( * )
23
24 COMPLEX A( LDA, * ), VS( LDVS, * ), W( * ), WORK( * )
25
26 LOGICAL SELECT
27
28 EXTERNAL SELECT
29
31 CGEESX computes for an N-by-N complex nonsymmetric matrix A, the eigen‐
32 values, the Schur form T, and, optionally, the matrix of Schur vectors
33 Z. This gives the Schur factorization A = Z*T*(Z**H).
34
35 Optionally, it also orders the eigenvalues on the diagonal of the Schur
36 form so that selected eigenvalues are at the top left; computes a
37 reciprocal condition number for the average of the selected eigenvalues
38 (RCONDE); and computes a reciprocal condition number for the right
39 invariant subspace corresponding to the selected eigenvalues (RCONDV).
40 The leading columns of Z form an orthonormal basis for this invariant
41 subspace.
42
43 For further explanation of the reciprocal condition numbers RCONDE and
44 RCONDV, see Section 4.10 of the LAPACK Users' Guide (where these quan‐
45 tities are called s and sep respectively).
46
47 A complex matrix is in Schur form if it is upper triangular.
48
49
51 JOBVS (input) CHARACTER*1
52 = 'N': Schur vectors are not computed;
53 = 'V': Schur vectors are computed.
54
55 SORT (input) CHARACTER*1
56 Specifies whether or not to order the eigenvalues on the diago‐
57 nal of the Schur form. = 'N': Eigenvalues are not ordered;
58 = 'S': Eigenvalues are ordered (see SELECT).
59
60 SELECT (external procedure) LOGICAL FUNCTION of one COMPLEX argument
61 SELECT must be declared EXTERNAL in the calling subroutine. If
62 SORT = 'S', SELECT is used to select eigenvalues to order to
63 the top left of the Schur form. If SORT = 'N', SELECT is not
64 referenced. An eigenvalue W(j) is selected if SELECT(W(j)) is
65 true.
66
67 SENSE (input) CHARACTER*1
68 Determines which reciprocal condition numbers are computed. =
69 'N': None are computed;
70 = 'E': Computed for average of selected eigenvalues only;
71 = 'V': Computed for selected right invariant subspace only;
72 = 'B': Computed for both. If SENSE = 'E', 'V' or 'B', SORT
73 must equal 'S'.
74
75 N (input) INTEGER
76 The order of the matrix A. N >= 0.
77
78 A (input/output) COMPLEX array, dimension (LDA, N)
79 On entry, the N-by-N matrix A. On exit, A is overwritten by
80 its Schur form T.
81
82 LDA (input) INTEGER
83 The leading dimension of the array A. LDA >= max(1,N).
84
85 SDIM (output) INTEGER
86 If SORT = 'N', SDIM = 0. If SORT = 'S', SDIM = number of ei‐
87 genvalues for which SELECT is true.
88
89 W (output) COMPLEX array, dimension (N)
90 W contains the computed eigenvalues, in the same order that
91 they appear on the diagonal of the output Schur form T.
92
93 VS (output) COMPLEX array, dimension (LDVS,N)
94 If JOBVS = 'V', VS contains the unitary matrix Z of Schur vec‐
95 tors. If JOBVS = 'N', VS is not referenced.
96
97 LDVS (input) INTEGER
98 The leading dimension of the array VS. LDVS >= 1, and if JOBVS
99 = 'V', LDVS >= N.
100
101 RCONDE (output) REAL
102 If SENSE = 'E' or 'B', RCONDE contains the reciprocal condition
103 number for the average of the selected eigenvalues. Not refer‐
104 enced if SENSE = 'N' or 'V'.
105
106 RCONDV (output) REAL
107 If SENSE = 'V' or 'B', RCONDV contains the reciprocal condition
108 number for the selected right invariant subspace. Not refer‐
109 enced if SENSE = 'N' or 'E'.
110
111 WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
112 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
113
114 LWORK (input) INTEGER
115 The dimension of the array WORK. LWORK >= max(1,2*N). Also,
116 if SENSE = 'E' or 'V' or 'B', LWORK >= 2*SDIM*(N-SDIM), where
117 SDIM is the number of selected eigenvalues computed by this
118 routine. Note that 2*SDIM*(N-SDIM) <= N*N/2. Note also that an
119 error is only returned if LWORK < max(1,2*N), but if SENSE =
120 'E' or 'V' or 'B' this may not be large enough. For good per‐
121 formance, LWORK must generally be larger.
122
123 If LWORK = -1, then a workspace query is assumed; the routine
124 only calculates upper bound on the optimal size of the array
125 WORK, returns this value as the first entry of the WORK array,
126 and no error message related to LWORK is issued by XERBLA.
127
128 RWORK (workspace) REAL array, dimension (N)
129
130 BWORK (workspace) LOGICAL array, dimension (N)
131 Not referenced if SORT = 'N'.
132
133 INFO (output) INTEGER
134 = 0: successful exit
135 < 0: if INFO = -i, the i-th argument had an illegal value.
136 > 0: if INFO = i, and i is
137 <= N: the QR algorithm failed to compute all the
138 eigenvalues; elements 1:ILO-1 and i+1:N of W contain those ei‐
139 genvalues which have converged; if JOBVS = 'V', VS contains the
140 transformation which reduces A to its partially converged Schur
141 form. = N+1: the eigenvalues could not be reordered because
142 some eigenvalues were too close to separate (the problem is
143 very ill-conditioned); = N+2: after reordering, roundoff
144 changed values of some complex eigenvalues so that leading ei‐
145 genvalues in the Schur form no longer satisfy SELECT=.TRUE.
146 This could also be caused by underflow due to scaling.
147
148
149
150 LAPACK driver routine (version 3.N1o)vember 2006 CGEESX(1)