LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
dlarrc.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine dlarrc (JOBT, N, VL, VU, D, E, PIVMIN, EIGCNT, LCNT, RCNT, INFO)
 DLARRC computes the number of eigenvalues of the symmetric tridiagonal matrix. More...
 

Function/Subroutine Documentation

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
[in]VU
          VU is DOUBLE PRECISION
          The lower and upper bounds 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
September 2012
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 138 of file dlarrc.f.

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

Here is the caller graph for this function: