3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download SSTEGR + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/sstegr.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/sstegr.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/sstegr.f">
21 * SUBROUTINE SSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
22 * ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
25 * .. Scalar Arguments ..
26 * CHARACTER JOBZ, RANGE
27 * INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
30 * .. Array Arguments ..
31 * INTEGER ISUPPZ( * ), IWORK( * )
32 * REAL D( * ), E( * ), W( * ), WORK( * )
42 *> SSTEGR computes selected eigenvalues and, optionally, eigenvectors
43 *> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
44 *> a well defined set of pairwise different real eigenvalues, the corresponding
45 *> real eigenvectors are pairwise orthogonal.
47 *> The spectrum may be computed either completely or partially by specifying
48 *> either an interval (VL,VU] or a range of indices IL:IU for the desired
51 *> SSTEGR is a compatibility wrapper around the improved SSTEMR routine.
52 *> See SSTEMR for further details.
54 *> One important change is that the ABSTOL parameter no longer provides any
55 *> benefit and hence is no longer used.
57 *> Note : SSTEGR and SSTEMR work only on machines which follow
58 *> IEEE-754 floating-point standard in their handling of infinities and
59 *> NaNs. Normal execution may create these exceptiona values and hence
60 *> may abort due to a floating point exception in environments which
61 *> do not conform to the IEEE-754 standard.
69 *> JOBZ is CHARACTER*1
70 *> = 'N': Compute eigenvalues only;
71 *> = 'V': Compute eigenvalues and eigenvectors.
76 *> RANGE is CHARACTER*1
77 *> = 'A': all eigenvalues will be found.
78 *> = 'V': all eigenvalues in the half-open interval (VL,VU]
80 *> = 'I': the IL-th through IU-th eigenvalues will be found.
86 *> The order of the matrix. N >= 0.
91 *> D is REAL array, dimension (N)
92 *> On entry, the N diagonal elements of the tridiagonal matrix
93 *> T. On exit, D is overwritten.
98 *> E is REAL array, dimension (N)
99 *> On entry, the (N-1) subdiagonal elements of the tridiagonal
100 *> matrix T in elements 1 to N-1 of E. E(N) need not be set on
101 *> input, but is used internally as workspace.
102 *> On exit, E is overwritten.
109 *> If RANGE='V', the lower bound of the interval to
110 *> be searched for eigenvalues. VL < VU.
111 *> Not referenced if RANGE = 'A' or 'I'.
118 *> If RANGE='V', the upper bound of the interval to
119 *> be searched for eigenvalues. VL < VU.
120 *> Not referenced if RANGE = 'A' or 'I'.
127 *> If RANGE='I', the index of the
128 *> smallest eigenvalue to be returned.
129 *> 1 <= IL <= IU <= N, if N > 0.
130 *> Not referenced if RANGE = 'A' or 'V'.
137 *> If RANGE='I', the index of the
138 *> largest eigenvalue to be returned.
139 *> 1 <= IL <= IU <= N, if N > 0.
140 *> Not referenced if RANGE = 'A' or 'V'.
146 *> Unused. Was the absolute error tolerance for the
147 *> eigenvalues/eigenvectors in previous versions.
153 *> The total number of eigenvalues found. 0 <= M <= N.
154 *> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
159 *> W is REAL array, dimension (N)
160 *> The first M elements contain the selected eigenvalues in
166 *> Z is REAL array, dimension (LDZ, max(1,M) )
167 *> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
168 *> contain the orthonormal eigenvectors of the matrix T
169 *> corresponding to the selected eigenvalues, with the i-th
170 *> column of Z holding the eigenvector associated with W(i).
171 *> If JOBZ = 'N', then Z is not referenced.
172 *> Note: the user must ensure that at least max(1,M) columns are
173 *> supplied in the array Z; if RANGE = 'V', the exact value of M
174 *> is not known in advance and an upper bound must be used.
175 *> Supplying N columns is always safe.
181 *> The leading dimension of the array Z. LDZ >= 1, and if
182 *> JOBZ = 'V', then LDZ >= max(1,N).
185 *> \param[out] ISUPPZ
187 *> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
188 *> The support of the eigenvectors in Z, i.e., the indices
189 *> indicating the nonzero elements in Z. The i-th computed eigenvector
190 *> is nonzero only in elements ISUPPZ( 2*i-1 ) through
191 *> ISUPPZ( 2*i ). This is relevant in the case when the matrix
192 *> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
197 *> WORK is REAL array, dimension (LWORK)
198 *> On exit, if INFO = 0, WORK(1) returns the optimal
199 *> (and minimal) LWORK.
205 *> The dimension of the array WORK. LWORK >= max(1,18*N)
206 *> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
207 *> If LWORK = -1, then a workspace query is assumed; the routine
208 *> only calculates the optimal size of the WORK array, returns
209 *> this value as the first entry of the WORK array, and no error
210 *> message related to LWORK is issued by XERBLA.
215 *> IWORK is INTEGER array, dimension (LIWORK)
216 *> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
222 *> The dimension of the array IWORK. LIWORK >= max(1,10*N)
223 *> if the eigenvectors are desired, and LIWORK >= max(1,8*N)
224 *> if only the eigenvalues are to be computed.
225 *> If LIWORK = -1, then a workspace query is assumed; the
226 *> routine only calculates the optimal size of the IWORK array,
227 *> returns this value as the first entry of the IWORK array, and
228 *> no error message related to LIWORK is issued by XERBLA.
235 *> = 0: successful exit
236 *> < 0: if INFO = -i, the i-th argument had an illegal value
237 *> > 0: if INFO = 1X, internal error in SLARRE,
238 *> if INFO = 2X, internal error in SLARRV.
239 *> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
240 *> the nonzero error code returned by SLARRE or
241 *> SLARRV, respectively.
247 *> \author Univ. of Tennessee
248 *> \author Univ. of California Berkeley
249 *> \author Univ. of Colorado Denver
254 *> \ingroup realOTHERcomputational
256 *> \par Contributors:
259 *> Inderjit Dhillon, IBM Almaden, USA \n
260 *> Osni Marques, LBNL/NERSC, USA \n
261 *> Christof Voemel, LBNL/NERSC, USA \n
263 * =====================================================================
264 SUBROUTINE SSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
265 $ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
268 * -- LAPACK computational routine (version 3.6.1) --
269 * -- LAPACK is a software package provided by Univ. of Tennessee, --
270 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
273 * .. Scalar Arguments ..
274 CHARACTER JOBZ, RANGE
275 INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
278 * .. Array Arguments ..
279 INTEGER ISUPPZ( * ), IWORK( * )
280 REAL D( * ), E( * ), W( * ), WORK( * )
284 * =====================================================================
286 * .. Local Scalars ..
289 * .. External Subroutines ..
292 * .. Executable Statements ..
296 CALL SSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
297 $ M, W, Z, LDZ, N, ISUPPZ, TRYRAC, WORK, LWORK,
298 $ IWORK, LIWORK, INFO )