1 *> \brief \b SLARRC computes the number of eigenvalues of the symmetric tridiagonal matrix.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download SLARRC + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slarrc.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slarrc.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slarrc.f">
21 * SUBROUTINE SLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
22 * EIGCNT, LCNT, RCNT, INFO )
24 * .. Scalar Arguments ..
26 * INTEGER EIGCNT, INFO, LCNT, N, RCNT
29 * .. Array Arguments ..
39 *> Find the number of eigenvalues of the symmetric tridiagonal matrix T
40 *> that are in the interval (VL,VU] if JOBT = 'T', and of L D L^T
49 *> JOBT is CHARACTER*1
50 *> = 'T': Compute Sturm count for matrix T.
51 *> = 'L': Compute Sturm count for matrix L D L^T.
57 *> The order of the matrix. N > 0.
63 *> The lower bound for the eigenvalues.
69 *> The upper bound for the eigenvalues.
74 *> D is REAL array, dimension (N)
75 *> JOBT = 'T': The N diagonal elements of the tridiagonal matrix T.
76 *> JOBT = 'L': The N diagonal elements of the diagonal matrix D.
81 *> E is REAL array, dimension (N)
82 *> JOBT = 'T': The N-1 offdiagonal elements of the matrix T.
83 *> JOBT = 'L': The N-1 offdiagonal elements of the matrix L.
89 *> The minimum pivot in the Sturm sequence for T.
95 *> The number of eigenvalues of the symmetric tridiagonal matrix T
96 *> that are in the interval (VL,VU]
107 *> The left and right negcounts of the interval.
118 *> \author Univ. of Tennessee
119 *> \author Univ. of California Berkeley
120 *> \author Univ. of Colorado Denver
125 *> \ingroup OTHERauxiliary
127 *> \par Contributors:
130 *> Beresford Parlett, University of California, Berkeley, USA \n
131 *> Jim Demmel, University of California, Berkeley, USA \n
132 *> Inderjit Dhillon, University of Texas, Austin, USA \n
133 *> Osni Marques, LBNL/NERSC, USA \n
134 *> Christof Voemel, University of California, Berkeley, USA
136 * =====================================================================
137 SUBROUTINE SLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
138 $ EIGCNT, LCNT, RCNT, INFO )
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..--
145 * .. Scalar Arguments ..
147 INTEGER EIGCNT, INFO, LCNT, N, RCNT
150 * .. Array Arguments ..
154 * =====================================================================
158 PARAMETER ( ZERO = 0.0E0 )
160 * .. Local Scalars ..
163 REAL LPIVOT, RPIVOT, SL, SU, TMP, TMP2
166 * .. External Functions ..
170 * .. Executable Statements ..
176 MATT = LSAME( JOBT, 'T' )
180 * Sturm sequence count on T
183 IF( LPIVOT.LE.ZERO ) THEN
186 IF( RPIVOT.LE.ZERO ) THEN
191 LPIVOT = ( D( I+1 )-VL ) - TMP/LPIVOT
192 RPIVOT = ( D( I+1 )-VU ) - TMP/RPIVOT
193 IF( LPIVOT.LE.ZERO ) THEN
196 IF( RPIVOT.LE.ZERO ) THEN
201 * Sturm sequence count on L D L^T
207 IF( LPIVOT.LE.ZERO ) THEN
210 IF( RPIVOT.LE.ZERO ) THEN
213 TMP = E(I) * D(I) * E(I)
216 IF( TMP2.EQ.ZERO ) THEN
223 IF( TMP2.EQ.ZERO ) THEN
231 IF( LPIVOT.LE.ZERO ) THEN
234 IF( RPIVOT.LE.ZERO ) THEN