LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ cslect()

logical function cslect ( complex  z)

CSLECT

Purpose:
 CSLECT returns .TRUE. if the eigenvalue Z is to be selected,
 otherwise it returns .FALSE.
 It is used by CCHK41 to test if CGEES successfully sorts eigenvalues,
 and by CCHK43 to test if CGEESX successfully sorts eigenvalues.

 The common block /SSLCT/ controls how eigenvalues are selected.
 If SELOPT = 0, then CSLECT return .TRUE. when real(Z) is less than
 zero, and .FALSE. otherwise.
 If SELOPT is at least 1, CSLECT returns SELVAL(SELOPT) and adds 1
 to SELOPT, cycling back to 1 at SELMAX.
Parameters
[in]Z
          Z is COMPLEX
          The eigenvalue Z.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 55 of file cslect.f.

56*
57* -- LAPACK test routine --
58* -- LAPACK is a software package provided by Univ. of Tennessee, --
59* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
60*
61* .. Scalar Arguments ..
62 COMPLEX Z
63* ..
64*
65* =====================================================================
66*
67* .. Parameters ..
68 REAL ZERO
69 parameter( zero = 0.0e0 )
70* ..
71* .. Local Scalars ..
72 INTEGER I
73 REAL RMIN, X
74* ..
75* .. Scalars in Common ..
76 INTEGER SELDIM, SELOPT
77* ..
78* .. Arrays in Common ..
79 LOGICAL SELVAL( 20 )
80 REAL SELWI( 20 ), SELWR( 20 )
81* ..
82* .. Common blocks ..
83 COMMON / sslct / selopt, seldim, selval, selwr, selwi
84* ..
85* .. Intrinsic Functions ..
86 INTRINSIC abs, cmplx, real
87* ..
88* .. Executable Statements ..
89*
90 IF( selopt.EQ.0 ) THEN
91 cslect = ( real( z ).LT.zero )
92 ELSE
93 rmin = abs( z-cmplx( selwr( 1 ), selwi( 1 ) ) )
94 cslect = selval( 1 )
95 DO 10 i = 2, seldim
96 x = abs( z-cmplx( selwr( i ), selwi( i ) ) )
97 IF( x.LE.rmin ) THEN
98 rmin = x
99 cslect = selval( i )
100 END IF
101 10 CONTINUE
102 END IF
103 RETURN
104*
105* End of CSLECT
106*
logical function cslect(z)
CSLECT
Definition cslect.f:56
Here is the call graph for this function:
Here is the caller graph for this function: