SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ pslapdct()

subroutine pslapdct ( real  sigma,
integer  n,
real, dimension( * )  d,
real  pivmin,
integer  count 
)

Definition at line 1348 of file psstebz.f.

1349*
1350* -- ScaLAPACK routine (version 1.7) --
1351* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
1352* and University of California, Berkeley.
1353* November 15, 1997
1354*
1355*
1356* .. Scalar Arguments ..
1357 INTEGER COUNT, N
1358 REAL PIVMIN, SIGMA
1359* ..
1360* .. Array Arguments ..
1361 REAL D( * )
1362* ..
1363*
1364* Purpose
1365* =======
1366*
1367* PSLAPDCT counts the number of negative eigenvalues of (T - SIGMA I).
1368* This implementation of the Sturm Sequence loop has conditionals in
1369* the innermost loop to avoid overflow and determine the sign of a
1370* floating point number. PSLAPDCT will be referred to as the "paranoid"
1371* implementation of the Sturm Sequence loop.
1372*
1373* This is a SCALAPACK internal procedure and arguments are not checked
1374* for unreasonable values.
1375*
1376* Arguments
1377* =========
1378*
1379* SIGMA (input) REAL
1380* The shift. PSLAPDCT finds the number of eigenvalues of T less
1381* than or equal to SIGMA.
1382*
1383* N (input) INTEGER
1384* The order of the tridiagonal matrix T. N >= 1.
1385*
1386* D (input) REAL array, dimension (2*N - 1)
1387* Contains the diagonals and the squares of the off-diagonal
1388* elements of the tridiagonal matrix T. These elements are
1389* assumed to be interleaved in memory for better cache
1390* performance. The diagonal entries of T are in the entries
1391* D(1),D(3),...,D(2*N-1), while the squares of the off-diagonal
1392* entries are D(2),D(4),...,D(2*N-2). To avoid overflow, the
1393* matrix must be scaled so that its largest entry is no greater
1394* than overflow**(1/2) * underflow**(1/4) in absolute value,
1395* and for greatest accuracy, it should not be much smaller
1396* than that.
1397*
1398* PIVMIN (input) REAL
1399* The minimum absolute of a "pivot" in this "paranoid"
1400* implementation of the Sturm sequence loop. This must be at
1401* least max_j |e(j)^2| *safe_min, and at least safe_min, where
1402* safe_min is at least the smallest number that can divide 1.0
1403* without overflow.
1404*
1405* COUNT (output) INTEGER
1406* The count of the number of eigenvalues of T less than or
1407* equal to SIGMA.
1408*
1409* =====================================================================
1410*
1411* .. Intrinsic Functions ..
1412 INTRINSIC abs
1413* ..
1414* .. Parameters ..
1415 REAL ZERO
1416 parameter( zero = 0.0e+0 )
1417* ..
1418* .. Local Scalars ..
1419 INTEGER I
1420 REAL TMP
1421* ..
1422* .. Executable Statements ..
1423*
1424 tmp = d( 1 ) - sigma
1425 IF( abs( tmp ).LE.pivmin )
1426 $ tmp = -pivmin
1427 count = 0
1428 IF( tmp.LE.zero )
1429 $ count = 1
1430 DO 10 i = 3, 2*n - 1, 2
1431 tmp = d( i ) - d( i-1 ) / tmp - sigma
1432 IF( abs( tmp ).LE.pivmin )
1433 $ tmp = -pivmin
1434 IF( tmp.LE.zero )
1435 $ count = count + 1
1436 10 CONTINUE
1437*
1438 RETURN
1439*
1440* End of PSLAPDCT
1441*
Here is the caller graph for this function: