LAPACK 3.3.0
|
00001 SUBROUTINE CSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, 00002 $ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, 00003 $ LIWORK, INFO ) 00004 00005 IMPLICIT NONE 00006 * 00007 * 00008 * -- LAPACK computational routine (version 3.2) -- 00009 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00010 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00011 * November 2006 00012 * 00013 * .. Scalar Arguments .. 00014 CHARACTER JOBZ, RANGE 00015 INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N 00016 REAL ABSTOL, VL, VU 00017 * .. 00018 * .. Array Arguments .. 00019 INTEGER ISUPPZ( * ), IWORK( * ) 00020 REAL D( * ), E( * ), W( * ), WORK( * ) 00021 COMPLEX Z( LDZ, * ) 00022 * .. 00023 * 00024 * Purpose 00025 * ======= 00026 * 00027 * CSTEGR computes selected eigenvalues and, optionally, eigenvectors 00028 * of a real symmetric tridiagonal matrix T. Any such unreduced matrix has 00029 * a well defined set of pairwise different real eigenvalues, the corresponding 00030 * real eigenvectors are pairwise orthogonal. 00031 * 00032 * The spectrum may be computed either completely or partially by specifying 00033 * either an interval (VL,VU] or a range of indices IL:IU for the desired 00034 * eigenvalues. 00035 * 00036 * CSTEGR is a compatability wrapper around the improved CSTEMR routine. 00037 * See SSTEMR for further details. 00038 * 00039 * One important change is that the ABSTOL parameter no longer provides any 00040 * benefit and hence is no longer used. 00041 * 00042 * Note : CSTEGR and CSTEMR work only on machines which follow 00043 * IEEE-754 floating-point standard in their handling of infinities and 00044 * NaNs. Normal execution may create these exceptiona values and hence 00045 * may abort due to a floating point exception in environments which 00046 * do not conform to the IEEE-754 standard. 00047 * 00048 * Arguments 00049 * ========= 00050 * 00051 * JOBZ (input) CHARACTER*1 00052 * = 'N': Compute eigenvalues only; 00053 * = 'V': Compute eigenvalues and eigenvectors. 00054 * 00055 * RANGE (input) CHARACTER*1 00056 * = 'A': all eigenvalues will be found. 00057 * = 'V': all eigenvalues in the half-open interval (VL,VU] 00058 * will be found. 00059 * = 'I': the IL-th through IU-th eigenvalues will be found. 00060 * 00061 * N (input) INTEGER 00062 * The order of the matrix. N >= 0. 00063 * 00064 * D (input/output) REAL array, dimension (N) 00065 * On entry, the N diagonal elements of the tridiagonal matrix 00066 * T. On exit, D is overwritten. 00067 * 00068 * E (input/output) REAL array, dimension (N) 00069 * On entry, the (N-1) subdiagonal elements of the tridiagonal 00070 * matrix T in elements 1 to N-1 of E. E(N) need not be set on 00071 * input, but is used internally as workspace. 00072 * On exit, E is overwritten. 00073 * 00074 * VL (input) REAL 00075 * VU (input) REAL 00076 * If RANGE='V', the lower and upper bounds of the interval to 00077 * be searched for eigenvalues. VL < VU. 00078 * Not referenced if RANGE = 'A' or 'I'. 00079 * 00080 * IL (input) INTEGER 00081 * IU (input) INTEGER 00082 * If RANGE='I', the indices (in ascending order) of the 00083 * smallest and largest eigenvalues to be returned. 00084 * 1 <= IL <= IU <= N, if N > 0. 00085 * Not referenced if RANGE = 'A' or 'V'. 00086 * 00087 * ABSTOL (input) REAL 00088 * Unused. Was the absolute error tolerance for the 00089 * eigenvalues/eigenvectors in previous versions. 00090 * 00091 * M (output) INTEGER 00092 * The total number of eigenvalues found. 0 <= M <= N. 00093 * If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1. 00094 * 00095 * W (output) REAL array, dimension (N) 00096 * The first M elements contain the selected eigenvalues in 00097 * ascending order. 00098 * 00099 * Z (output) COMPLEX array, dimension (LDZ, max(1,M) ) 00100 * If JOBZ = 'V', and if INFO = 0, then the first M columns of Z 00101 * contain the orthonormal eigenvectors of the matrix T 00102 * corresponding to the selected eigenvalues, with the i-th 00103 * column of Z holding the eigenvector associated with W(i). 00104 * If JOBZ = 'N', then Z is not referenced. 00105 * Note: the user must ensure that at least max(1,M) columns are 00106 * supplied in the array Z; if RANGE = 'V', the exact value of M 00107 * is not known in advance and an upper bound must be used. 00108 * Supplying N columns is always safe. 00109 * 00110 * LDZ (input) INTEGER 00111 * The leading dimension of the array Z. LDZ >= 1, and if 00112 * JOBZ = 'V', then LDZ >= max(1,N). 00113 * 00114 * ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) ) 00115 * The support of the eigenvectors in Z, i.e., the indices 00116 * indicating the nonzero elements in Z. The i-th computed eigenvector 00117 * is nonzero only in elements ISUPPZ( 2*i-1 ) through 00118 * ISUPPZ( 2*i ). This is relevant in the case when the matrix 00119 * is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0. 00120 * 00121 * WORK (workspace/output) REAL array, dimension (LWORK) 00122 * On exit, if INFO = 0, WORK(1) returns the optimal 00123 * (and minimal) LWORK. 00124 * 00125 * LWORK (input) INTEGER 00126 * The dimension of the array WORK. LWORK >= max(1,18*N) 00127 * if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'. 00128 * If LWORK = -1, then a workspace query is assumed; the routine 00129 * only calculates the optimal size of the WORK array, returns 00130 * this value as the first entry of the WORK array, and no error 00131 * message related to LWORK is issued by XERBLA. 00132 * 00133 * IWORK (workspace/output) INTEGER array, dimension (LIWORK) 00134 * On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. 00135 * 00136 * LIWORK (input) INTEGER 00137 * The dimension of the array IWORK. LIWORK >= max(1,10*N) 00138 * if the eigenvectors are desired, and LIWORK >= max(1,8*N) 00139 * if only the eigenvalues are to be computed. 00140 * If LIWORK = -1, then a workspace query is assumed; the 00141 * routine only calculates the optimal size of the IWORK array, 00142 * returns this value as the first entry of the IWORK array, and 00143 * no error message related to LIWORK is issued by XERBLA. 00144 * 00145 * INFO (output) INTEGER 00146 * On exit, INFO 00147 * = 0: successful exit 00148 * < 0: if INFO = -i, the i-th argument had an illegal value 00149 * > 0: if INFO = 1X, internal error in SLARRE, 00150 * if INFO = 2X, internal error in CLARRV. 00151 * Here, the digit X = ABS( IINFO ) < 10, where IINFO is 00152 * the nonzero error code returned by SLARRE or 00153 * CLARRV, respectively. 00154 * 00155 * Further Details 00156 * =============== 00157 * 00158 * Based on contributions by 00159 * Inderjit Dhillon, IBM Almaden, USA 00160 * Osni Marques, LBNL/NERSC, USA 00161 * Christof Voemel, LBNL/NERSC, USA 00162 * 00163 * ===================================================================== 00164 * 00165 * .. Local Scalars .. 00166 LOGICAL TRYRAC 00167 * .. 00168 * .. External Subroutines .. 00169 EXTERNAL CSTEMR 00170 * .. 00171 * .. Executable Statements .. 00172 INFO = 0 00173 TRYRAC = .FALSE. 00174 00175 CALL CSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, 00176 $ M, W, Z, LDZ, N, ISUPPZ, TRYRAC, WORK, LWORK, 00177 $ IWORK, LIWORK, INFO ) 00178 * 00179 * End of CSTEGR 00180 * 00181 END