1CHEEVR(1) LAPACK driver routine (version 3.1) CHEEVR(1)
2
3
4
6 CHEEVR - selected eigenvalues and, optionally, eigenvectors of a com‐
7 plex Hermitian matrix A
8
10 SUBROUTINE CHEEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
11 ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, RWORK,
12 LRWORK, IWORK, LIWORK, INFO )
13
14 CHARACTER JOBZ, RANGE, UPLO
15
16 INTEGER IL, INFO, IU, LDA, LDZ, LIWORK, LRWORK, LWORK, M, N
17
18 REAL ABSTOL, VL, VU
19
20 INTEGER ISUPPZ( * ), IWORK( * )
21
22 REAL RWORK( * ), W( * )
23
24 COMPLEX A( LDA, * ), WORK( * ), Z( LDZ, * )
25
27 CHEEVR computes selected eigenvalues and, optionally, eigenvectors of a
28 complex Hermitian matrix A. Eigenvalues and eigenvectors can be
29 selected by specifying either a range of values or a range of indices
30 for the desired eigenvalues.
31
32 CHEEVR first reduces the matrix A to tridiagonal form T with a call to
33 CHETRD. Then, whenever possible, CHEEVR calls CSTEMR to compute the
34 eigenspectrum using Relatively Robust Representations. CSTEMR computes
35 eigenvalues by the dqds algorithm, while orthogonal eigenvectors are
36 computed from various "good" L D L^T representations (also known as
37 Relatively Robust Representations). Gram-Schmidt orthogonalization is
38 avoided as far as possible. More specifically, the various steps of the
39 algorithm are as follows.
40
41 For each unreduced block (submatrix) of T,
42 (a) Compute T - sigma I = L D L^T, so that L and D
43 define all the wanted eigenvalues to high relative accuracy.
44 This means that small relative changes in the entries of D and L
45 cause only small relative changes in the eigenvalues and
46 eigenvectors. The standard (unfactored) representation of the
47 tridiagonal matrix T does not have this property in general.
48 (b) Compute the eigenvalues to suitable accuracy.
49 If the eigenvectors are desired, the algorithm attains full
50 accuracy of the computed eigenvalues only right before
51 the corresponding vectors have to be computed, see steps c) and
52 d).
53 (c) For each cluster of close eigenvalues, select a new
54 shift close to the cluster, find a new factorization, and refine
55 the shifted eigenvalues to suitable accuracy.
56 (d) For each eigenvalue with a large enough relative separation com‐
57 pute
58 the corresponding eigenvector by forming a rank revealing
59 twisted
60 factorization. Go back to (c) for any clusters that remain.
61
62 The desired accuracy of the output can be specified by the input param‐
63 eter ABSTOL.
64
65 For more details, see DSTEMR's documentation and:
66 - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representa‐
67 tions
68 to compute orthogonal eigenvectors of symmetric tridiagonal matri‐
69 ces,"
70 Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
71 - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
72 Relative Gaps," SIAM Journal on Matrix Analysis and Applications,
73 Vol. 25,
74 2004. Also LAPACK Working Note 154.
75 - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
76 tridiagonal eigenvalue/eigenvector problem",
77 Computer Science Division Technical Report No. UCB/CSD-97-971,
78 UC Berkeley, May 1997.
79
80
81 Note 1 : CHEEVR calls CSTEMR when the full spectrum is requested on
82 machines which conform to the ieee-754 floating point standard. CHEEVR
83 calls SSTEBZ and CSTEIN on non-ieee machines and
84 when partial spectrum requests are made.
85
86 Normal execution of CSTEMR may create NaNs and infinities and hence may
87 abort due to a floating point exception in environments which do not
88 handle NaNs and infinities in the ieee standard default manner.
89
90
92 JOBZ (input) CHARACTER*1
93 = 'N': Compute eigenvalues only;
94 = 'V': Compute eigenvalues and eigenvectors.
95
96 RANGE (input) CHARACTER*1
97 = 'A': all eigenvalues will be found.
98 = 'V': all eigenvalues in the half-open interval (VL,VU] will
99 be found. = 'I': the IL-th through IU-th eigenvalues will be
100 found.
101
102 UPLO (input) CHARACTER*1
103 = 'U': Upper triangle of A is stored;
104 = 'L': Lower triangle of A is stored.
105
106 N (input) INTEGER
107 The order of the matrix A. N >= 0.
108
109 A (input/output) COMPLEX array, dimension (LDA, N)
110 On entry, the Hermitian matrix A. If UPLO = 'U', the leading
111 N-by-N upper triangular part of A contains the upper triangular
112 part of the matrix A. If UPLO = 'L', the leading N-by-N lower
113 triangular part of A contains the lower triangular part of the
114 matrix A. On exit, the lower triangle (if UPLO='L') or the
115 upper triangle (if UPLO='U') of A, including the diagonal, is
116 destroyed.
117
118 LDA (input) INTEGER
119 The leading dimension of the array A. LDA >= max(1,N).
120
121 VL (input) REAL
122 VU (input) REAL If RANGE='V', the lower and upper bounds
123 of the interval to be searched for eigenvalues. VL < VU. Not
124 referenced if RANGE = 'A' or 'I'.
125
126 IL (input) INTEGER
127 IU (input) INTEGER If RANGE='I', the indices (in ascending
128 order) of the smallest and largest eigenvalues to be returned.
129 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not
130 referenced if RANGE = 'A' or 'V'.
131
132 ABSTOL (input) REAL
133 The absolute error tolerance for the eigenvalues. An approxi‐
134 mate eigenvalue is accepted as converged when it is determined
135 to lie in an interval [a,b] of width less than or equal to
136
137 ABSTOL + EPS * max( |a|,|b| ) ,
138
139 where EPS is the machine precision. If ABSTOL is less than or
140 equal to zero, then EPS*|T| will be used in its place, where
141 |T| is the 1-norm of the tridiagonal matrix obtained by reduc‐
142 ing A to tridiagonal form.
143
144 See "Computing Small Singular Values of Bidiagonal Matrices
145 with Guaranteed High Relative Accuracy," by Demmel and Kahan,
146 LAPACK Working Note #3.
147
148 If high relative accuracy is important, set ABSTOL to SLAMCH(
149 'Safe minimum' ). Doing so will guarantee that eigenvalues are
150 computed to high relative accuracy when possible in future
151 releases. The current code does not make any guarantees about
152 high relative accuracy, but furutre releases will. See J. Bar‐
153 low and J. Demmel, "Computing Accurate Eigensystems of Scaled
154 Diagonally Dominant Matrices", LAPACK Working Note #7, for a
155 discussion of which matrices define their eigenvalues to high
156 relative accuracy.
157
158 M (output) INTEGER
159 The total number of eigenvalues found. 0 <= M <= N. If RANGE
160 = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
161
162 W (output) REAL array, dimension (N)
163 The first M elements contain the selected eigenvalues in
164 ascending order.
165
166 Z (output) COMPLEX array, dimension (LDZ, max(1,M))
167 If JOBZ = 'V', then if INFO = 0, the first M columns of Z con‐
168 tain the orthonormal eigenvectors of the matrix A corresponding
169 to the selected eigenvalues, with the i-th column of Z holding
170 the eigenvector associated with W(i). If JOBZ = 'N', then Z is
171 not referenced. Note: the user must ensure that at least
172 max(1,M) columns are supplied in the array Z; if RANGE = 'V',
173 the exact value of M is not known in advance and an upper bound
174 must be used.
175
176 LDZ (input) INTEGER
177 The leading dimension of the array Z. LDZ >= 1, and if JOBZ =
178 'V', LDZ >= max(1,N).
179
180 ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
181 The support of the eigenvectors in Z, i.e., the indices indi‐
182 cating the nonzero elements in Z. The i-th eigenvector is
183 nonzero only in elements ISUPPZ( 2*i-1 ) through ISUPPZ( 2*i ).
184
185 WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
186 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
187
188 LWORK (input) INTEGER
189 The length of the array WORK. LWORK >= max(1,2*N). For opti‐
190 mal efficiency, LWORK >= (NB+1)*N, where NB is the max of the
191 blocksize for CHETRD and for CUNMTR as returned by ILAENV.
192
193 If LWORK = -1, then a workspace query is assumed; the routine
194 only calculates the optimal sizes of the WORK, RWORK and IWORK
195 arrays, returns these values as the first entries of the WORK,
196 RWORK and IWORK arrays, and no error message related to LWORK
197 or LRWORK or LIWORK is issued by XERBLA.
198
199 RWORK (workspace/output) REAL array, dimension (MAX(1,LRWORK))
200 On exit, if INFO = 0, RWORK(1) returns the optimal (and mini‐
201 mal) LRWORK.
202
203 The length of the array RWORK. LRWORK >= max(1,24*N).
204
205 If LRWORK = -1, then a workspace query is assumed; the routine
206 only calculates the optimal sizes of the WORK, RWORK and IWORK
207 arrays, returns these values as the first entries of the WORK,
208 RWORK and IWORK arrays, and no error message related to LWORK
209 or LRWORK or LIWORK is issued by XERBLA.
210
211 IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
212 On exit, if INFO = 0, IWORK(1) returns the optimal (and mini‐
213 mal) LIWORK.
214
215 The dimension of the array IWORK. LIWORK >= max(1,10*N).
216
217 If LIWORK = -1, then a workspace query is assumed; the routine
218 only calculates the optimal sizes of the WORK, RWORK and IWORK
219 arrays, returns these values as the first entries of the WORK,
220 RWORK and IWORK arrays, and no error message related to LWORK
221 or LRWORK or LIWORK is issued by XERBLA.
222
223 INFO (output) INTEGER
224 = 0: successful exit
225 < 0: if INFO = -i, the i-th argument had an illegal value
226 > 0: Internal error
227
229 Based on contributions by
230 Inderjit Dhillon, IBM Almaden, USA
231 Osni Marques, LBNL/NERSC, USA
232 Ken Stanley, Computer Science Division, University of
233 California at Berkeley, USA
234 Jason Riedy, Computer Science Division, University of
235 California at Berkeley, USA
236
237
238
239
240 LAPACK driver routine (version 3.N1o)vember 2006 CHEEVR(1)