![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b CSTEGR 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 *> \htmlonly 00009 *> Download CSTEGR + dependencies 00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cstegr.f"> 00011 *> [TGZ]</a> 00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cstegr.f"> 00013 *> [ZIP]</a> 00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cstegr.f"> 00015 *> [TXT]</a> 00016 *> \endhtmlonly 00017 * 00018 * Definition: 00019 * =========== 00020 * 00021 * SUBROUTINE CSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, 00022 * ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, 00023 * LIWORK, INFO ) 00024 * 00025 * .. Scalar Arguments .. 00026 * CHARACTER JOBZ, RANGE 00027 * INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N 00028 * REAL ABSTOL, VL, VU 00029 * .. 00030 * .. Array Arguments .. 00031 * INTEGER ISUPPZ( * ), IWORK( * ) 00032 * REAL D( * ), E( * ), W( * ), WORK( * ) 00033 * COMPLEX Z( LDZ, * ) 00034 * .. 00035 * 00036 * 00037 *> \par Purpose: 00038 * ============= 00039 *> 00040 *> \verbatim 00041 *> 00042 *> CSTEGR computes selected eigenvalues and, optionally, eigenvectors 00043 *> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has 00044 *> a well defined set of pairwise different real eigenvalues, the corresponding 00045 *> real eigenvectors are pairwise orthogonal. 00046 *> 00047 *> The spectrum may be computed either completely or partially by specifying 00048 *> either an interval (VL,VU] or a range of indices IL:IU for the desired 00049 *> eigenvalues. 00050 *> 00051 *> CSTEGR is a compatability wrapper around the improved CSTEMR routine. 00052 *> See SSTEMR for further details. 00053 *> 00054 *> One important change is that the ABSTOL parameter no longer provides any 00055 *> benefit and hence is no longer used. 00056 *> 00057 *> Note : CSTEGR and CSTEMR work only on machines which follow 00058 *> IEEE-754 floating-point standard in their handling of infinities and 00059 *> NaNs. Normal execution may create these exceptiona values and hence 00060 *> may abort due to a floating point exception in environments which 00061 *> do not conform to the IEEE-754 standard. 00062 *> \endverbatim 00063 * 00064 * Arguments: 00065 * ========== 00066 * 00067 *> \param[in] JOBZ 00068 *> \verbatim 00069 *> JOBZ is CHARACTER*1 00070 *> = 'N': Compute eigenvalues only; 00071 *> = 'V': Compute eigenvalues and eigenvectors. 00072 *> \endverbatim 00073 *> 00074 *> \param[in] RANGE 00075 *> \verbatim 00076 *> RANGE is CHARACTER*1 00077 *> = 'A': all eigenvalues will be found. 00078 *> = 'V': all eigenvalues in the half-open interval (VL,VU] 00079 *> will be found. 00080 *> = 'I': the IL-th through IU-th eigenvalues will be found. 00081 *> \endverbatim 00082 *> 00083 *> \param[in] N 00084 *> \verbatim 00085 *> N is INTEGER 00086 *> The order of the matrix. N >= 0. 00087 *> \endverbatim 00088 *> 00089 *> \param[in,out] D 00090 *> \verbatim 00091 *> D is REAL array, dimension (N) 00092 *> On entry, the N diagonal elements of the tridiagonal matrix 00093 *> T. On exit, D is overwritten. 00094 *> \endverbatim 00095 *> 00096 *> \param[in,out] E 00097 *> \verbatim 00098 *> E is REAL array, dimension (N) 00099 *> On entry, the (N-1) subdiagonal elements of the tridiagonal 00100 *> matrix T in elements 1 to N-1 of E. E(N) need not be set on 00101 *> input, but is used internally as workspace. 00102 *> On exit, E is overwritten. 00103 *> \endverbatim 00104 *> 00105 *> \param[in] VL 00106 *> \verbatim 00107 *> VL is REAL 00108 *> \endverbatim 00109 *> 00110 *> \param[in] VU 00111 *> \verbatim 00112 *> VU is REAL 00113 *> 00114 *> If RANGE='V', the lower and upper bounds of the interval to 00115 *> be searched for eigenvalues. VL < VU. 00116 *> Not referenced if RANGE = 'A' or 'I'. 00117 *> \endverbatim 00118 *> 00119 *> \param[in] IL 00120 *> \verbatim 00121 *> IL is INTEGER 00122 *> \endverbatim 00123 *> 00124 *> \param[in] IU 00125 *> \verbatim 00126 *> IU is INTEGER 00127 *> 00128 *> If RANGE='I', the indices (in ascending order) of the 00129 *> smallest and largest eigenvalues to be returned. 00130 *> 1 <= IL <= IU <= N, if N > 0. 00131 *> Not referenced if RANGE = 'A' or 'V'. 00132 *> \endverbatim 00133 *> 00134 *> \param[in] ABSTOL 00135 *> \verbatim 00136 *> ABSTOL is REAL 00137 *> Unused. Was the absolute error tolerance for the 00138 *> eigenvalues/eigenvectors in previous versions. 00139 *> \endverbatim 00140 *> 00141 *> \param[out] M 00142 *> \verbatim 00143 *> M is INTEGER 00144 *> The total number of eigenvalues found. 0 <= M <= N. 00145 *> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1. 00146 *> \endverbatim 00147 *> 00148 *> \param[out] W 00149 *> \verbatim 00150 *> W is REAL array, dimension (N) 00151 *> The first M elements contain the selected eigenvalues in 00152 *> ascending order. 00153 *> \endverbatim 00154 *> 00155 *> \param[out] Z 00156 *> \verbatim 00157 *> Z is COMPLEX array, dimension (LDZ, max(1,M) ) 00158 *> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z 00159 *> contain the orthonormal eigenvectors of the matrix T 00160 *> corresponding to the selected eigenvalues, with the i-th 00161 *> column of Z holding the eigenvector associated with W(i). 00162 *> If JOBZ = 'N', then Z is not referenced. 00163 *> Note: the user must ensure that at least max(1,M) columns are 00164 *> supplied in the array Z; if RANGE = 'V', the exact value of M 00165 *> is not known in advance and an upper bound must be used. 00166 *> Supplying N columns is always safe. 00167 *> \endverbatim 00168 *> 00169 *> \param[in] LDZ 00170 *> \verbatim 00171 *> LDZ is INTEGER 00172 *> The leading dimension of the array Z. LDZ >= 1, and if 00173 *> JOBZ = 'V', then LDZ >= max(1,N). 00174 *> \endverbatim 00175 *> 00176 *> \param[out] ISUPPZ 00177 *> \verbatim 00178 *> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) ) 00179 *> The support of the eigenvectors in Z, i.e., the indices 00180 *> indicating the nonzero elements in Z. The i-th computed eigenvector 00181 *> is nonzero only in elements ISUPPZ( 2*i-1 ) through 00182 *> ISUPPZ( 2*i ). This is relevant in the case when the matrix 00183 *> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0. 00184 *> \endverbatim 00185 *> 00186 *> \param[out] WORK 00187 *> \verbatim 00188 *> WORK is REAL array, dimension (LWORK) 00189 *> On exit, if INFO = 0, WORK(1) returns the optimal 00190 *> (and minimal) LWORK. 00191 *> \endverbatim 00192 *> 00193 *> \param[in] LWORK 00194 *> \verbatim 00195 *> LWORK is INTEGER 00196 *> The dimension of the array WORK. LWORK >= max(1,18*N) 00197 *> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'. 00198 *> If LWORK = -1, then a workspace query is assumed; the routine 00199 *> only calculates the optimal size of the WORK array, returns 00200 *> this value as the first entry of the WORK array, and no error 00201 *> message related to LWORK is issued by XERBLA. 00202 *> \endverbatim 00203 *> 00204 *> \param[out] IWORK 00205 *> \verbatim 00206 *> IWORK is INTEGER array, dimension (LIWORK) 00207 *> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. 00208 *> \endverbatim 00209 *> 00210 *> \param[in] LIWORK 00211 *> \verbatim 00212 *> LIWORK is INTEGER 00213 *> The dimension of the array IWORK. LIWORK >= max(1,10*N) 00214 *> if the eigenvectors are desired, and LIWORK >= max(1,8*N) 00215 *> if only the eigenvalues are to be computed. 00216 *> If LIWORK = -1, then a workspace query is assumed; the 00217 *> routine only calculates the optimal size of the IWORK array, 00218 *> returns this value as the first entry of the IWORK array, and 00219 *> no error message related to LIWORK is issued by XERBLA. 00220 *> \endverbatim 00221 *> 00222 *> \param[out] INFO 00223 *> \verbatim 00224 *> INFO is INTEGER 00225 *> On exit, INFO 00226 *> = 0: successful exit 00227 *> < 0: if INFO = -i, the i-th argument had an illegal value 00228 *> > 0: if INFO = 1X, internal error in SLARRE, 00229 *> if INFO = 2X, internal error in CLARRV. 00230 *> Here, the digit X = ABS( IINFO ) < 10, where IINFO is 00231 *> the nonzero error code returned by SLARRE or 00232 *> CLARRV, respectively. 00233 *> \endverbatim 00234 * 00235 * Authors: 00236 * ======== 00237 * 00238 *> \author Univ. of Tennessee 00239 *> \author Univ. of California Berkeley 00240 *> \author Univ. of Colorado Denver 00241 *> \author NAG Ltd. 00242 * 00243 *> \date November 2011 00244 * 00245 *> \ingroup complexOTHERcomputational 00246 * 00247 *> \par Contributors: 00248 * ================== 00249 *> 00250 *> Inderjit Dhillon, IBM Almaden, USA \n 00251 *> Osni Marques, LBNL/NERSC, USA \n 00252 *> Christof Voemel, LBNL/NERSC, USA \n 00253 * 00254 * ===================================================================== 00255 SUBROUTINE CSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, 00256 $ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, 00257 $ LIWORK, INFO ) 00258 * 00259 * -- LAPACK computational routine (version 3.4.0) -- 00260 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00261 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00262 * November 2011 00263 * 00264 * .. Scalar Arguments .. 00265 CHARACTER JOBZ, RANGE 00266 INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N 00267 REAL ABSTOL, VL, VU 00268 * .. 00269 * .. Array Arguments .. 00270 INTEGER ISUPPZ( * ), IWORK( * ) 00271 REAL D( * ), E( * ), W( * ), WORK( * ) 00272 COMPLEX Z( LDZ, * ) 00273 * .. 00274 * 00275 * ===================================================================== 00276 * 00277 * .. Local Scalars .. 00278 LOGICAL TRYRAC 00279 * .. 00280 * .. External Subroutines .. 00281 EXTERNAL CSTEMR 00282 * .. 00283 * .. Executable Statements .. 00284 INFO = 0 00285 TRYRAC = .FALSE. 00286 00287 CALL CSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, 00288 $ M, W, Z, LDZ, N, ISUPPZ, TRYRAC, WORK, LWORK, 00289 $ IWORK, LIWORK, INFO ) 00290 * 00291 * End of CSTEGR 00292 * 00293 END