LAPACK 3.11.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
cslect.f
Go to the documentation of this file.
1*> \brief \b CSLECT
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8* Definition:
9* ===========
10*
11* LOGICAL FUNCTION CSLECT( Z )
12*
13* .. Scalar Arguments ..
14* COMPLEX Z
15* ..
16*
17*
18*> \par Purpose:
19* =============
20*>
21*> \verbatim
22*>
23*> CSLECT returns .TRUE. if the eigenvalue Z is to be selected,
24*> otherwise it returns .FALSE.
25*> It is used by CCHK41 to test if CGEES successfully sorts eigenvalues,
26*> and by CCHK43 to test if CGEESX successfully sorts eigenvalues.
27*>
28*> The common block /SSLCT/ controls how eigenvalues are selected.
29*> If SELOPT = 0, then CSLECT return .TRUE. when real(Z) is less than
30*> zero, and .FALSE. otherwise.
31*> If SELOPT is at least 1, CSLECT returns SELVAL(SELOPT) and adds 1
32*> to SELOPT, cycling back to 1 at SELMAX.
33*> \endverbatim
34*
35* Arguments:
36* ==========
37*
38*> \param[in] Z
39*> \verbatim
40*> Z is COMPLEX
41*> The eigenvalue Z.
42*> \endverbatim
43*
44* Authors:
45* ========
46*
47*> \author Univ. of Tennessee
48*> \author Univ. of California Berkeley
49*> \author Univ. of Colorado Denver
50*> \author NAG Ltd.
51*
52*> \ingroup complex_eig
53*
54* =====================================================================
55 LOGICAL FUNCTION cslect( Z )
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*
107 END
logical function cslect(Z)
CSLECT
Definition: cslect.f:56