1ZHEGVX(1) LAPACK driver routine (version 3.1) ZHEGVX(1)
2
3
4
6 ZHEGVX - selected eigenvalues, and optionally, eigenvectors of a com‐
7 plex generalized Hermitian-definite eigenproblem, of the form
8 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x
9
11 SUBROUTINE ZHEGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB, VL, VU,
12 IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, RWORK,
13 IWORK, IFAIL, INFO )
14
15 CHARACTER JOBZ, RANGE, UPLO
16
17 INTEGER IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
18
19 DOUBLE PRECISION ABSTOL, VL, VU
20
21 INTEGER IFAIL( * ), IWORK( * )
22
23 DOUBLE PRECISION RWORK( * ), W( * )
24
25 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ), Z( LDZ, * )
26
28 ZHEGVX computes selected eigenvalues, and optionally, eigenvectors of a
29 complex generalized Hermitian-definite eigenproblem, of the form
30 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and B
31 are assumed to be Hermitian and B is also positive definite. Eigenval‐
32 ues and eigenvectors can be selected by specifying either a range of
33 values or a range of indices for the desired eigenvalues.
34
35
37 ITYPE (input) INTEGER
38 Specifies the problem type to be solved:
39 = 1: A*x = (lambda)*B*x
40 = 2: A*B*x = (lambda)*x
41 = 3: B*A*x = (lambda)*x
42
43 JOBZ (input) CHARACTER*1
44 = 'N': Compute eigenvalues only;
45 = 'V': Compute eigenvalues and eigenvectors.
46
47 RANGE (input) CHARACTER*1
48 = 'A': all eigenvalues will be found.
49 = 'V': all eigenvalues in the half-open interval (VL,VU] will
50 be found. = 'I': the IL-th through IU-th eigenvalues will be
51 found.
52
53 UPLO (input) CHARACTER*1
54 = 'U': Upper triangles of A and B are stored;
55 = 'L': Lower triangles of A and B are stored.
56
57 N (input) INTEGER
58 The order of the matrices A and B. N >= 0.
59
60 A (input/output) COMPLEX*16 array, dimension (LDA, N)
61 On entry, the Hermitian matrix A. If UPLO = 'U', the leading
62 N-by-N upper triangular part of A contains the upper triangular
63 part of the matrix A. If UPLO = 'L', the leading N-by-N lower
64 triangular part of A contains the lower triangular part of the
65 matrix A.
66
67 On exit, the lower triangle (if UPLO='L') or the upper trian‐
68 gle (if UPLO='U') of A, including the diagonal, is destroyed.
69
70 LDA (input) INTEGER
71 The leading dimension of the array A. LDA >= max(1,N).
72
73 B (input/output) COMPLEX*16 array, dimension (LDB, N)
74 On entry, the Hermitian matrix B. If UPLO = 'U', the leading
75 N-by-N upper triangular part of B contains the upper triangular
76 part of the matrix B. If UPLO = 'L', the leading N-by-N lower
77 triangular part of B contains the lower triangular part of the
78 matrix B.
79
80 On exit, if INFO <= N, the part of B containing the matrix is
81 overwritten by the triangular factor U or L from the Cholesky
82 factorization B = U**H*U or B = L*L**H.
83
84 LDB (input) INTEGER
85 The leading dimension of the array B. LDB >= max(1,N).
86
87 VL (input) DOUBLE PRECISION
88 VU (input) DOUBLE PRECISION If RANGE='V', the lower and
89 upper bounds of the interval to be searched for eigenvalues. VL
90 < VU. Not referenced if RANGE = 'A' or 'I'.
91
92 IL (input) INTEGER
93 IU (input) INTEGER If RANGE='I', the indices (in ascending
94 order) of the smallest and largest eigenvalues to be returned.
95 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not
96 referenced if RANGE = 'A' or 'V'.
97
98 ABSTOL (input) DOUBLE PRECISION
99 The absolute error tolerance for the eigenvalues. An approxi‐
100 mate eigenvalue is accepted as converged when it is determined
101 to lie in an interval [a,b] of width less than or equal to
102
103 ABSTOL + EPS * max( |a|,|b| ) ,
104
105 where EPS is the machine precision. If ABSTOL is less than or
106 equal to zero, then EPS*|T| will be used in its place, where
107 |T| is the 1-norm of the tridiagonal matrix obtained by reduc‐
108 ing A to tridiagonal form.
109
110 Eigenvalues will be computed most accurately when ABSTOL is set
111 to twice the underflow threshold 2*DLAMCH('S'), not zero. If
112 this routine returns with INFO>0, indicating that some eigen‐
113 vectors did not converge, try setting ABSTOL to 2*DLAMCH('S').
114
115 M (output) INTEGER
116 The total number of eigenvalues found. 0 <= M <= N. If RANGE
117 = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
118
119 W (output) DOUBLE PRECISION array, dimension (N)
120 The first M elements contain the selected eigenvalues in
121 ascending order.
122
123 Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M))
124 If JOBZ = 'N', then Z is not referenced. If JOBZ = 'V', then
125 if INFO = 0, the first M columns of Z contain the orthonormal
126 eigenvectors of the matrix A corresponding to the selected ei‐
127 genvalues, with the i-th column of Z holding the eigenvector
128 associated with W(i). The eigenvectors are normalized as fol‐
129 lows: if ITYPE = 1 or 2, Z**T*B*Z = I; if ITYPE = 3,
130 Z**T*inv(B)*Z = I.
131
132 If an eigenvector fails to converge, then that column of Z con‐
133 tains the latest approximation to the eigenvector, and the
134 index of the eigenvector is returned in IFAIL. Note: the user
135 must ensure that at least max(1,M) columns are supplied in the
136 array Z; if RANGE = 'V', the exact value of M is not known in
137 advance and an upper bound must be used.
138
139 LDZ (input) INTEGER
140 The leading dimension of the array Z. LDZ >= 1, and if JOBZ =
141 'V', LDZ >= max(1,N).
142
143 WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
144 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
145
146 LWORK (input) INTEGER
147 The length of the array WORK. LWORK >= max(1,2*N). For opti‐
148 mal efficiency, LWORK >= (NB+1)*N, where NB is the blocksize
149 for ZHETRD returned by ILAENV.
150
151 If LWORK = -1, then a workspace query is assumed; the routine
152 only calculates the optimal size of the WORK array, returns
153 this value as the first entry of the WORK array, and no error
154 message related to LWORK is issued by XERBLA.
155
156 RWORK (workspace) DOUBLE PRECISION array, dimension (7*N)
157
158 IWORK (workspace) INTEGER array, dimension (5*N)
159
160 IFAIL (output) INTEGER array, dimension (N)
161 If JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL
162 are zero. If INFO > 0, then IFAIL contains the indices of the
163 eigenvectors that failed to converge. If JOBZ = 'N', then
164 IFAIL is not referenced.
165
166 INFO (output) INTEGER
167 = 0: successful exit
168 < 0: if INFO = -i, the i-th argument had an illegal value
169 > 0: ZPOTRF or ZHEEVX returned an error code:
170 <= N: if INFO = i, ZHEEVX failed to converge; i eigenvectors
171 failed to converge. Their indices are stored in array IFAIL.
172 > N: if INFO = N + i, for 1 <= i <= N, then the leading minor
173 of order i of B is not positive definite. The factorization of
174 B could not be completed and no eigenvalues or eigenvectors
175 were computed.
176
178 Based on contributions by
179 Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
180
181
182
183
184 LAPACK driver routine (version 3.N1o)vember 2006 ZHEGVX(1)