Routine: PSLAPDCT()  File: SRC\psstebz.f

 
 
# lines: 95
  # code: 95
  # comment: 0
  # blank:0
# Variables:7
# Callers:2
# Callings:0
# Words:24
# Keywords:16
 

 

..
     .. Array Arguments ..
     ..
  Purpose
  =======
  PSLAPDCT counts the number of negative eigenvalues of (T - SIGMA I).
  This implementation of the Sturm Sequence loop has conditionals in
  the innermost loop to avoid overflow and determine the sign of a
  floating point number. PSLAPDCT will be referred to as the "paranoid"
  implementation of the Sturm Sequence loop.
  This is a SCALAPACK internal procedure and arguments are not checked
  for unreasonable values.
  Arguments
  =========
  SIGMA   (input) REAL
          The shift. PSLAPDCT finds the number of eigenvalues of T less
          than or equal to SIGMA.
  N       (input) INTEGER
          The order of the tridiagonal matrix T. N >= 1.
  D       (input) REAL array, dimension (2*N - 1)
          Contains the diagonals and the squares of the off-diagonal
          elements of the tridiagonal matrix T. These elements are
          assumed to be interleaved in memory for better cache
          performance. The diagonal entries of T are in the entries
          D(1),D(3),...,D(2*N-1), while the squares of the off-diagonal
          entries are D(2),D(4),...,D(2*N-2). To avoid overflow, the
          matrix must be scaled so that its largest entry is no greater
          than overflow**(1/2) * underflow**(1/4) in absolute value,
          and for greatest accuracy, it should not be much smaller
          than that.
  PIVMIN  (input) REAL
          The minimum absolute of a "pivot" in this "paranoid"
          implementation of the Sturm sequence loop. This must be at
          least max_j |e(j)^2| *safe_min, and at least safe_min, where
          safe_min is at least the smallest number that can divide 1.0
          without overflow.
  COUNT   (output) INTEGER
          The count of the number of eigenvalues of T less than or
          equal to SIGMA.
  =====================================================================
     .. Intrinsic Functions ..

 
Display dynamic version Find AutoScroll Reload FontSize: - + Hide Comments Hide Blanks Frame FullScreen MailPrint

 
01        SUBROUTINE PSLAPDCT( SIGMA , N , D , PIVMIN , COUNT )
02  
03  *     -- ScaLAPACK routine(version 1.7) --
04  *     University of Tennessee , Knoxville , Oak Ridge National Laboratory ,
05  *     and University of California , Berkeley.
06  *     November 15 , 1997
07  
08  *     .. Scalar Arguments ..
09        INTEGER COUNT , N
10        REAL PIVMIN , SIGMA
11        INTRINSIC ABS
12  *     ..
13  *     .. Parameters ..
14        REAL ZERO
15        PARAMETER( ZERO = 0.0E + 0 )
16  *     ..
17  *     .. Local Scalars ..
18        INTEGER I
19        REAL TMP
20  *     ..
21  *     .. Executable Statements ..
22  
23        TMP = D( 1 ) - SIGMA
24        IF( ABS( TMP ).LE.PIVMIN )
25       $    TMP = - PIVMIN
26            COUNT = 0
27            IF( TMP.LE.ZERO )
28       $        COUNT = 1
29                DO 10 I = 3 , 2*N - 1 , 2
30                    TMP = D( I ) - D( I - 1 ) / TMP - SIGMA
31                    IF( ABS( TMP ).LE.PIVMIN )
32       $                TMP = - PIVMIN
33                        IF( TMP.LE.ZERO )
34       $                    COUNT = COUNT + 1
35     10         CONTINUE
36  
37                RETURN
38  
39  *             End of PSLAPDCT
40  
41            END