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

◆ pdlapdct()

subroutine pdlapdct ( double precision  sigma,
integer  n,
double precision, dimension( * )  d,
double precision  pivmin,
integer  count 
)

Definition at line 1364 of file pdstebz.f.

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