1DGEGV(1) LAPACK driver routine (version 3.2) DGEGV(1)
2
3
4
6 DGEGV - routine i deprecated and has been replaced by routine DGGEV
7
9 SUBROUTINE DGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
10 BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
11
12 CHARACTER JOBVL, JOBVR
13
14 INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
15
16 DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ), B(
17 LDB, * ), BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
18 WORK( * )
19
21 This routine is deprecated and has been replaced by routine DGGEV.
22 DGEGV computes the eigenvalues and, optionally, the left and/or right
23 eigenvectors of a real matrix pair (A,B).
24 Given two square matrices A and B,
25 the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
26 eigenvalues lambda and corresponding (non-zero) eigenvectors x such
27 that
28 A*x = lambda*B*x.
29 An alternate form is to find the eigenvalues mu and corresponding
30 eigenvectors y such that
31 mu*A*y = B*y.
32 These two forms are equivalent with mu = 1/lambda and x = y if neither
33 lambda nor mu is zero. In order to deal with the case that lambda or
34 mu is zero or small, two values alpha and beta are returned for each
35 eigenvalue, such that lambda = alpha/beta and
36 mu = beta/alpha.
37 The vectors x and y in the above equations are right eigenvectors of
38 the matrix pair (A,B). Vectors u and v satisfying
39 u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
40 are left eigenvectors of (A,B).
41 Note: this routine performs "full balancing" on A and B -- see "Further
42 Details", below.
43
45 JOBVL (input) CHARACTER*1
46 = 'N': do not compute the left generalized eigenvectors;
47 = 'V': compute the left generalized eigenvectors (returned in
48 VL).
49
50 JOBVR (input) CHARACTER*1
51 = 'N': do not compute the right generalized eigenvectors;
52 = 'V': compute the right generalized eigenvectors (returned in
53 VR).
54
55 N (input) INTEGER
56 The order of the matrices A, B, VL, and VR. N >= 0.
57
58 A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
59 On entry, the matrix A. If JOBVL = 'V' or JOBVR = 'V', then on
60 exit A contains the real Schur form of A from the generalized
61 Schur factorization of the pair (A,B) after balancing. If no
62 eigenvectors were computed, then only the diagonal blocks from
63 the Schur form will be correct. See DGGHRD and DHGEQZ for
64 details.
65
66 LDA (input) INTEGER
67 The leading dimension of A. LDA >= max(1,N).
68
69 B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
70 On entry, the matrix B. If JOBVL = 'V' or JOBVR = 'V', then on
71 exit B contains the upper triangular matrix obtained from B in
72 the generalized Schur factorization of the pair (A,B) after
73 balancing. If no eigenvectors were computed, then only those
74 elements of B corresponding to the diagonal blocks from the
75 Schur form of A will be correct. See DGGHRD and DHGEQZ for
76 details.
77
78 LDB (input) INTEGER
79 The leading dimension of B. LDB >= max(1,N).
80
81 ALPHAR (output) DOUBLE PRECISION array, dimension (N)
82 The real parts of each scalar alpha defining an eigenvalue of
83 GNEP.
84
85 ALPHAI (output) DOUBLE PRECISION array, dimension (N)
86 The imaginary parts of each scalar alpha defining an eigenvalue
87 of GNEP. If ALPHAI(j) is zero, then the j-th eigenvalue is
88 real; if positive, then the j-th and (j+1)-st eigenvalues are a
89 complex conjugate pair, with ALPHAI(j+1) = -ALPHAI(j).
90
91 BETA (output) DOUBLE PRECISION array, dimension (N)
92 The scalars beta that define the eigenvalues of GNEP.
93 Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and beta
94 = BETA(j) represent the j-th eigenvalue of the matrix pair
95 (A,B), in one of the forms lambda = alpha/beta or mu =
96 beta/alpha. Since either lambda or mu may overflow, they
97 should not, in general, be computed.
98
99 VL (output) DOUBLE PRECISION array, dimension (LDVL,N)
100 If JOBVL = 'V', the left eigenvectors u(j) are stored in the
101 columns of VL, in the same order as their eigenvalues. If the
102 j-th eigenvalue is real, then u(j) = VL(:,j). If the j-th and
103 (j+1)-st eigenvalues form a complex conjugate pair, then u(j) =
104 VL(:,j) + i*VL(:,j+1) and u(j+1) = VL(:,j) - i*VL(:,j+1). Each
105 eigenvector is scaled so that its largest component has
106 abs(real part) + abs(imag. part) = 1, except for eigenvectors
107 corresponding to an eigenvalue with alpha = beta = 0, which are
108 set to zero. Not referenced if JOBVL = 'N'.
109
110 LDVL (input) INTEGER
111 The leading dimension of the matrix VL. LDVL >= 1, and if JOBVL
112 = 'V', LDVL >= N.
113
114 VR (output) DOUBLE PRECISION array, dimension (LDVR,N)
115 If JOBVR = 'V', the right eigenvectors x(j) are stored in the
116 columns of VR, in the same order as their eigenvalues. If the
117 j-th eigenvalue is real, then x(j) = VR(:,j). If the j-th and
118 (j+1)-st eigenvalues form a complex conjugate pair, then x(j) =
119 VR(:,j) + i*VR(:,j+1) and x(j+1) = VR(:,j) - i*VR(:,j+1). Each
120 eigenvector is scaled so that its largest component has
121 abs(real part) + abs(imag. part) = 1, except for eigenvalues
122 corresponding to an eigenvalue with alpha = beta = 0, which are
123 set to zero. Not referenced if JOBVR = 'N'.
124
125 LDVR (input) INTEGER
126 The leading dimension of the matrix VR. LDVR >= 1, and if JOBVR
127 = 'V', LDVR >= N.
128
129 WORK (workspace/output) DOUBLE PRECISION array, dimension
130 (MAX(1,LWORK))
131 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
132
133 LWORK (input) INTEGER
134 The dimension of the array WORK. LWORK >= max(1,8*N). For
135 good performance, LWORK must generally be larger. To compute
136 the optimal value of LWORK, call ILAENV to get blocksizes (for
137 DGEQRF, DORMQR, and DORGQR.) Then compute: NB -- MAX of the
138 blocksizes for DGEQRF, DORMQR, and DORGQR; The optimal LWORK
139 is: 2*N + MAX( 6*N, N*(NB+1) ). If LWORK = -1, then a
140 workspace query is assumed; the routine only calculates the
141 optimal size of the WORK array, returns this value as the first
142 entry of the WORK array, and no error message related to LWORK
143 is issued by XERBLA.
144
145 INFO (output) INTEGER
146 = 0: successful exit
147 < 0: if INFO = -i, the i-th argument had an illegal value.
148 = 1,...,N: The QZ iteration failed. No eigenvectors have been
149 calculated, but ALPHAR(j), ALPHAI(j), and BETA(j) should be
150 correct for j=INFO+1,...,N. > N: errors that usually indicate
151 LAPACK problems:
152 =N+1: error return from DGGBAL
153 =N+2: error return from DGEQRF
154 =N+3: error return from DORMQR
155 =N+4: error return from DORGQR
156 =N+5: error return from DGGHRD
157 =N+6: error return from DHGEQZ (other than failed iteration)
158 =N+7: error return from DTGEVC
159 =N+8: error return from DGGBAK (computing VL)
160 =N+9: error return from DGGBAK (computing VR)
161 =N+10: error return from DLASCL (various calls)
162
164 Balancing
165 ---------
166 This driver calls DGGBAL to both permute and scale rows and columns of
167 A and B. The permutations PL and PR are chosen so that PL*A*PR and
168 PL*B*R will be upper triangular except for the diagonal blocks
169 A(i:j,i:j) and B(i:j,i:j), with i and j as close together as possible.
170 The diagonal scaling matrices DL and DR are chosen so that the pair
171 DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to one (except for the
172 elements that start out zero.)
173 After the eigenvalues and eigenvectors of the balanced matrices have
174 been computed, DGGBAK transforms the eigenvectors back to what they
175 would have been (in perfect arithmetic) if they had not been balanced.
176 Contents of A and B on Exit
177 -------- -- - --- - -- ----
178 If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or
179 both), then on exit the arrays A and B will contain the real Schur
180 form[*] of the "balanced" versions of A and B. If no eigenvectors are
181 computed, then only the diagonal blocks will be correct. [*] See
182 DHGEQZ, DGEGS, or read the book "Matrix Computations",
183 by Golub & van Loan, pub. by Johns Hopkins U. Press.
184
185
186
187 LAPACK driver routine (version 3.N2o)vember 2008 DGEGV(1)