LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine dlarrc ( character  JOBT,
integer  N,
double precision  VL,
double precision  VU,
double precision, dimension( * )  D,
double precision, dimension( * )  E,
double precision  PIVMIN,
integer  EIGCNT,
integer  LCNT,
integer  RCNT,
integer  INFO 
)

DLARRC computes the number of eigenvalues of the symmetric tridiagonal matrix.

Download DLARRC + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 Find the number of eigenvalues of the symmetric tridiagonal matrix T
 that are in the interval (VL,VU] if JOBT = 'T', and of L D L^T
 if JOBT = 'L'.
Parameters
[in]JOBT
          JOBT is CHARACTER*1
          = 'T':  Compute Sturm count for matrix T.
          = 'L':  Compute Sturm count for matrix L D L^T.
[in]N
          N is INTEGER
          The order of the matrix. N > 0.
[in]VL
          VL is DOUBLE PRECISION
          The lower bound for the eigenvalues.
[in]VU
          VU is DOUBLE PRECISION
          The upper bound for the eigenvalues.
[in]D
          D is DOUBLE PRECISION array, dimension (N)
          JOBT = 'T': The N diagonal elements of the tridiagonal matrix T.
          JOBT = 'L': The N diagonal elements of the diagonal matrix D.
[in]E
          E is DOUBLE PRECISION array, dimension (N)
          JOBT = 'T': The N-1 offdiagonal elements of the matrix T.
          JOBT = 'L': The N-1 offdiagonal elements of the matrix L.
[in]PIVMIN
          PIVMIN is DOUBLE PRECISION
          The minimum pivot in the Sturm sequence for T.
[out]EIGCNT
          EIGCNT is INTEGER
          The number of eigenvalues of the symmetric tridiagonal matrix T
          that are in the interval (VL,VU]
[out]LCNT
          LCNT is INTEGER
[out]RCNT
          RCNT is INTEGER
          The left and right negcounts of the interval.
[out]INFO
          INFO is INTEGER
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
June 2016
Contributors:
Beresford Parlett, University of California, Berkeley, USA
Jim Demmel, University of California, Berkeley, USA
Inderjit Dhillon, University of Texas, Austin, USA
Osni Marques, LBNL/NERSC, USA
Christof Voemel, University of California, Berkeley, USA

Definition at line 139 of file dlarrc.f.

139 *
140 * -- LAPACK auxiliary routine (version 3.6.1) --
141 * -- LAPACK is a software package provided by Univ. of Tennessee, --
142 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
143 * June 2016
144 *
145 * .. Scalar Arguments ..
146  CHARACTER jobt
147  INTEGER eigcnt, info, lcnt, n, rcnt
148  DOUBLE PRECISION pivmin, vl, vu
149 * ..
150 * .. Array Arguments ..
151  DOUBLE PRECISION d( * ), e( * )
152 * ..
153 *
154 * =====================================================================
155 *
156 * .. Parameters ..
157  DOUBLE PRECISION zero
158  parameter ( zero = 0.0d0 )
159 * ..
160 * .. Local Scalars ..
161  INTEGER i
162  LOGICAL matt
163  DOUBLE PRECISION lpivot, rpivot, sl, su, tmp, tmp2
164 
165 * ..
166 * .. External Functions ..
167  LOGICAL lsame
168  EXTERNAL lsame
169 * ..
170 * .. Executable Statements ..
171 *
172  info = 0
173  lcnt = 0
174  rcnt = 0
175  eigcnt = 0
176  matt = lsame( jobt, 'T' )
177 
178 
179  IF (matt) THEN
180 * Sturm sequence count on T
181  lpivot = d( 1 ) - vl
182  rpivot = d( 1 ) - vu
183  IF( lpivot.LE.zero ) THEN
184  lcnt = lcnt + 1
185  ENDIF
186  IF( rpivot.LE.zero ) THEN
187  rcnt = rcnt + 1
188  ENDIF
189  DO 10 i = 1, n-1
190  tmp = e(i)**2
191  lpivot = ( d( i+1 )-vl ) - tmp/lpivot
192  rpivot = ( d( i+1 )-vu ) - tmp/rpivot
193  IF( lpivot.LE.zero ) THEN
194  lcnt = lcnt + 1
195  ENDIF
196  IF( rpivot.LE.zero ) THEN
197  rcnt = rcnt + 1
198  ENDIF
199  10 CONTINUE
200  ELSE
201 * Sturm sequence count on L D L^T
202  sl = -vl
203  su = -vu
204  DO 20 i = 1, n - 1
205  lpivot = d( i ) + sl
206  rpivot = d( i ) + su
207  IF( lpivot.LE.zero ) THEN
208  lcnt = lcnt + 1
209  ENDIF
210  IF( rpivot.LE.zero ) THEN
211  rcnt = rcnt + 1
212  ENDIF
213  tmp = e(i) * d(i) * e(i)
214 *
215  tmp2 = tmp / lpivot
216  IF( tmp2.EQ.zero ) THEN
217  sl = tmp - vl
218  ELSE
219  sl = sl*tmp2 - vl
220  END IF
221 *
222  tmp2 = tmp / rpivot
223  IF( tmp2.EQ.zero ) THEN
224  su = tmp - vu
225  ELSE
226  su = su*tmp2 - vu
227  END IF
228  20 CONTINUE
229  lpivot = d( n ) + sl
230  rpivot = d( n ) + su
231  IF( lpivot.LE.zero ) THEN
232  lcnt = lcnt + 1
233  ENDIF
234  IF( rpivot.LE.zero ) THEN
235  rcnt = rcnt + 1
236  ENDIF
237  ENDIF
238  eigcnt = rcnt - lcnt
239 
240  RETURN
241 *
242 * end of DLARRC
243 *
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the caller graph for this function: