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