LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ dlarrc()

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.7.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 *
174 * Quick return if possible
175 *
176  IF( n.LE.0 ) THEN
177  RETURN
178  END IF
179 *
180  lcnt = 0
181  rcnt = 0
182  eigcnt = 0
183  matt = lsame( jobt, 'T' )
184 
185 
186  IF (matt) THEN
187 * Sturm sequence count on T
188  lpivot = d( 1 ) - vl
189  rpivot = d( 1 ) - vu
190  IF( lpivot.LE.zero ) THEN
191  lcnt = lcnt + 1
192  ENDIF
193  IF( rpivot.LE.zero ) THEN
194  rcnt = rcnt + 1
195  ENDIF
196  DO 10 i = 1, n-1
197  tmp = e(i)**2
198  lpivot = ( d( i+1 )-vl ) - tmp/lpivot
199  rpivot = ( d( i+1 )-vu ) - tmp/rpivot
200  IF( lpivot.LE.zero ) THEN
201  lcnt = lcnt + 1
202  ENDIF
203  IF( rpivot.LE.zero ) THEN
204  rcnt = rcnt + 1
205  ENDIF
206  10 CONTINUE
207  ELSE
208 * Sturm sequence count on L D L^T
209  sl = -vl
210  su = -vu
211  DO 20 i = 1, n - 1
212  lpivot = d( i ) + sl
213  rpivot = d( i ) + su
214  IF( lpivot.LE.zero ) THEN
215  lcnt = lcnt + 1
216  ENDIF
217  IF( rpivot.LE.zero ) THEN
218  rcnt = rcnt + 1
219  ENDIF
220  tmp = e(i) * d(i) * e(i)
221 *
222  tmp2 = tmp / lpivot
223  IF( tmp2.EQ.zero ) THEN
224  sl = tmp - vl
225  ELSE
226  sl = sl*tmp2 - vl
227  END IF
228 *
229  tmp2 = tmp / rpivot
230  IF( tmp2.EQ.zero ) THEN
231  su = tmp - vu
232  ELSE
233  su = su*tmp2 - vu
234  END IF
235  20 CONTINUE
236  lpivot = d( n ) + sl
237  rpivot = d( n ) + su
238  IF( lpivot.LE.zero ) THEN
239  lcnt = lcnt + 1
240  ENDIF
241  IF( rpivot.LE.zero ) THEN
242  rcnt = rcnt + 1
243  ENDIF
244  ENDIF
245  eigcnt = rcnt - lcnt
246 
247  RETURN
248 *
249 * end of DLARRC
250 *
Here is the caller graph for this function:
lsame
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55