Debian Codegraph @

Modules/ThirdParty/VNL/src/vxl/v3p/netlib/arpack/dstqrb.c

raw symbols SCIP
1 /* arpack/dstqrb.f -- translated by f2c (version 20090411).
2 You must link the resulting object file with libf2c:
3 on Microsoft Windows system, link with libf2c.lib;
4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5 or, if you install libf2c.a in a standard place, with -lf2c -lm
6 -- in that order, at the end of the command line, as in
7 cc *.o -lf2c -lm
8 Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9
10 http://www.netlib.org/f2c/libf2c.zip
11 */
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 #include "v3p_netlib.h"cxx . . $ `<file>/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib.h`/
17
18 /* Table of constant values */
19
20 static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! c__0cxx . . $ c__0. = 0;
21 static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! c__1cxx . . $ c__1. = 1;
22 static doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! c_b31cxx . . $ c_b31. = 1.;
23
24 /* ----------------------------------------------------------------------- */
25 /* \BeginDoc */
26
27 /* \Name: dstqrb */
28
29 /* \Description: */
30 /* Computes all eigenvalues and the last component of the eigenvectors */
31 /* of a symmetric tridiagonal matrix using the implicit QL or QR method. */
32
33 /* This is mostly a modification of the LAPACK routine dsteqr. */
34 /* See Remarks. */
35
36 /* \Usage: */
37 /* call dstqrb */
38 /* ( N, D, E, Z, WORK, INFO ) */
39
40 /* \Arguments */
41 /* N Integer. (INPUT) */
42 /* The number of rows and columns in the matrix. N >= 0. */
43
44 /* D Double precision array, dimension (N). (INPUT/OUTPUT) */
45 /* On entry, D contains the diagonal elements of the */
46 /* tridiagonal matrix. */
47 /* On exit, D contains the eigenvalues, in ascending order. */
48 /* If an error exit is made, the eigenvalues are correct */
49 /* for indices 1,2,...,INFO-1, but they are unordered and */
50 /* may not be the smallest eigenvalues of the matrix. */
51
52 /* E Double precision array, dimension (N-1). (INPUT/OUTPUT) */
53 /* On entry, E contains the subdiagonal elements of the */
54 /* tridiagonal matrix in positions 1 through N-1. */
55 /* On exit, E has been destroyed. */
56
57 /* Z Double precision array, dimension (N). (OUTPUT) */
58 /* On exit, Z contains the last row of the orthonormal */
59 /* eigenvector matrix of the symmetric tridiagonal matrix. */
60 /* If an error exit is made, Z contains the last row of the */
61 /* eigenvector matrix associated with the stored eigenvalues. */
62
63 /* WORK Double precision array, dimension (max(1,2*N-2)). (WORKSPACE) */
64 /* Workspace used in accumulating the transformation for */
65 /* computing the last components of the eigenvectors. */
66
67 /* INFO Integer. (OUTPUT) */
68 /* = 0: normal return. */
69 /* < 0: if INFO = -i, the i-th argument had an illegal value. */
70 /* > 0: if INFO = +i, the i-th eigenvalue has not converged */
71 /* after a total of 30*N iterations. */
72
73 /* \Remarks */
74 /* 1. None. */
75
76 /* ----------------------------------------------------------------------- */
77
78 /* \BeginLib */
79
80 /* \Local variables: */
81 /* xxxxxx real */
82
83 /* \Routines called: */
84 /* daxpy Level 1 BLAS that computes a vector triad. */
85 /* dcopy Level 1 BLAS that copies one vector to another. */
86 /* dswap Level 1 BLAS that swaps the contents of two vectors. */
87 /* lsame LAPACK character comparison routine. */
88 /* dlae2 LAPACK routine that computes the eigenvalues of a 2-by-2 */
89 /* symmetric matrix. */
90 /* dlaev2 LAPACK routine that eigendecomposition of a 2-by-2 symmetric */
91 /* matrix. */
92 /* dlamch LAPACK routine that determines machine constants. */
93 /* dlanst LAPACK routine that computes the norm of a matrix. */
94 /* dlapy2 LAPACK routine to compute sqrt(x**2+y**2) carefully. */
95 /* dlartg LAPACK Givens rotation construction routine. */
96 /* dlascl LAPACK routine for careful scaling of a matrix. */
97 /* dlaset LAPACK matrix initialization routine. */
98 /* dlasr LAPACK routine that applies an orthogonal transformation to */
99 /* a matrix. */
100 /* dlasrt LAPACK sorting routine. */
101 /* dsteqr LAPACK routine that computes eigenvalues and eigenvectors */
102 /* of a symmetric tridiagonal matrix. */
103 /* xerbla LAPACK error handler routine. */
104
105 /* \Authors */
106 /* Danny Sorensen Phuong Vu */
107 /* Richard Lehoucq CRPC / Rice University */
108 /* Dept. of Computational & Houston, Texas */
109 /* Applied Mathematics */
110 /* Rice University */
111 /* Houston, Texas */
112
113 /* \SCCS Information: @(#) */
114 /* FILE: stqrb.F SID: 2.5 DATE OF SID: 8/27/96 RELEASE: 2 */
115
116 /* \Remarks */
117 /* 1. Starting with version 2.5, this routine is a modified version */
118 /* of LAPACK version 2.0 subroutine SSTEQR. No lines are deleted, */
119 /* only commeted out and new lines inserted. */
120 /* All lines commented out have "c$$$" at the beginning. */
121 /* Note that the LAPACK version 1.0 subroutine SSTEQR contained */
122 /* bugs. */
123
124 /* \EndLib */
125
126 /* ----------------------------------------------------------------------- */
127
128 /*< subroutine dstqrb ( n, d, e, z, work, info ) >*/
129 /* Subroutine */ int dstqrb_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:144:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *d__, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *e,
130 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *z__, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *work, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *info)
131 {
132 /* System generated locals */
133 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__1, i__2;
134 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! d__1, d__2;
135
136 /* Builtin functions */
137 double sqrtcxx . . $ sqrt(447c67c6676f75c3).(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`!), d_signcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:14:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *);
138
139 /* Local variables */
140 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! b, c__, f, g;
141 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, j, k, l, m;
142 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! p, r__, s;
143 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! l1, ii, mm, lm1, mm1, nm1;
144 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! rt1, rt2, eps;
145 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lsv;
146 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! tst, eps2;
147 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lend, jtot;
148 extern /* Subroutine */ int dlae2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:70:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`!
149 *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *), dlasr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:97:9`!(char *, char *, char *,
150 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
151 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
152 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! anorm;
153 extern /* Subroutine */ int dlaev2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:72:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
154 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
155 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *);
156 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lendm1, lendp1;
157 extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! dlapy2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:85:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *), dlamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:81:9`!(char *,
158 ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
159 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! iscale;
160 extern /* Subroutine */ int dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *,
161 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
162 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
163 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! safmin;
164 extern /* Subroutine */ int dlartg_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:93:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
165 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *);
166 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! safmax;
167 extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! dlanst_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:84:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
168 ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
169 extern /* Subroutine */ int dlasrt_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:98:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *,
170 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!);
171 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lendsv, nmaxit, icompz;
172 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! ssfmax, ssfmin;
173
174
175 /* %------------------% */
176 /* | Scalar Arguments | */
177 /* %------------------% */
178
179 /*< integer info, n >*/
180
181 /* %-----------------% */
182 /* | Array Arguments | */
183 /* %-----------------% */
184
185 /*< >*/
186
187 /* .. parameters .. */
188 /*< >*/
189 /*< >*/
190 /*< integer maxit >*/
191 /*< parameter ( maxit = 30 ) >*/
192 /* .. */
193 /* .. local scalars .. */
194 /*< >*/
195 /*< >*/
196 /* .. */
197 /* .. external functions .. */
198 /*< logical lsame >*/
199 /*< >*/
200 /*< external lsame, dlamch, dlanst, dlapy2 >*/
201 /* .. */
202 /* .. external subroutines .. */
203 /*< >*/
204 /* .. */
205 /* .. intrinsic functions .. */
206 /*< intrinsic abs, max, sign, sqrt >*/
207 /* .. */
208 /* .. executable statements .. */
209
210 /* test the input parameters. */
211
212 /*< info = 0 >*/
213 /* Parameter adjustments */
214 --work;
215 --z__;
216 --e;
217 --d__;
218
219 /* Function Body */
220 *info = 0;
221
222 /* $$$ IF( LSAME( COMPZ, 'N' ) ) THEN */
223 /* $$$ ICOMPZ = 0 */
224 /* $$$ ELSE IF( LSAME( COMPZ, 'V' ) ) THEN */
225 /* $$$ ICOMPZ = 1 */
226 /* $$$ ELSE IF( LSAME( COMPZ, 'I' ) ) THEN */
227 /* $$$ ICOMPZ = 2 */
228 /* $$$ ELSE */
229 /* $$$ ICOMPZ = -1 */
230 /* $$$ END IF */
231 /* $$$ IF( ICOMPZ.LT.0 ) THEN */
232 /* $$$ INFO = -1 */
233 /* $$$ ELSE IF( N.LT.0 ) THEN */
234 /* $$$ INFO = -2 */
235 /* $$$ ELSE IF( ( LDZ.LT.1 ) .OR. ( ICOMPZ.GT.0 .AND. LDZ.LT.MAX( 1, */
236 /* $$$ $ N ) ) ) THEN */
237 /* $$$ INFO = -6 */
238 /* $$$ END IF */
239 /* $$$ IF( INFO.NE.0 ) THEN */
240 /* $$$ CALL XERBLA( 'SSTEQR', -INFO ) */
241 /* $$$ RETURN */
242 /* $$$ END IF */
243
244 /* *** New starting with version 2.5 *** */
245
246 /*< icompz = 2 >*/
247 icompz = 2;
248 /* ************************************* */
249
250 /* quick return if possible */
251
252 /*< >*/
253 if (*n == 0) {
254 return 0;
255 }
256
257 /*< if( n.eq.1 ) then >*/
258 if (*n == 1) {
259 /*< if( icompz.eq.2 ) z( 1 ) = one >*/
260 if (icompz == 2) {
261 z__[1] = 1.;
262 }
263 /*< return >*/
264 return 0;
265 /*< end if >*/
266 }
267
268 /* determine the unit roundoff and over/underflow thresholds. */
269
270 /*< eps = dlamch( 'e' ) >*/
271 eps = dlamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:81:9`!("e", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
272 /*< eps2 = eps**2 >*/
273 /* Computing 2nd power */
274 d__1 = eps;
275 eps2 = d__1 * d__1;
276 /*< safmin = dlamch( 's' ) >*/
277 safmin = dlamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:81:9`!("s", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
278 /*< safmax = one / safmin >*/
279 safmax = 1. / safmin;
280 /*< ssfmax = sqrt( safmax ) / three >*/
281 ssfmax = sqrtcxx . . $ sqrt(447c67c6676f75c3).(safmax) / 3.;
282 /*< ssfmin = sqrt( safmin ) / eps2 >*/
283 ssfmin = sqrtcxx . . $ sqrt(447c67c6676f75c3).(safmin) / eps2;
284
285 /* compute the eigenvalues and eigenvectors of the tridiagonal */
286 /* matrix. */
287
288 /* $$ if( icompz.eq.2 ) */
289 /* $$$ $ call dlaset( 'full', n, n, zero, one, z, ldz ) */
290
291 /* *** New starting with version 2.5 *** */
292
293 /*< if ( icompz .eq. 2 ) then >*/
294 if (icompz == 2) {
295 /*< do 5 j = 1, n-1 >*/
296 i__1 = *n - 1;
297 for (j = 1; j <= i__1; ++j) {
298 /*< z(j) = zero >*/
299 z__[j] = 0.;
300 /*< 5 continue >*/
301 /* L5: */
302 }
303 /*< z( n ) = one >*/
304 z__[*n] = 1.;
305 /*< end if >*/
306 }
307 /* ************************************* */
308
309 /*< nmaxit = n*maxit >*/
310 nmaxit = *n * 30;
311 /*< jtot = 0 >*/
312 jtot = 0;
313
314 /* determine where the matrix splits and choose ql or qr iteration */
315 /* for each block, according to whether top or bottom diagonal */
316 /* element is smaller. */
317
318 /*< l1 = 1 >*/
319 l1 = 1;
320 /*< nm1 = n - 1 >*/
321 nm1 = *n - 1;
322
323 /*< 10 continue >*/
324 L10:
325 /*< >*/
326 if (l1 > *n) {
327 goto L160;
328 }
329 /*< >*/
330 if (l1 > 1) {
331 e[l1 - 1] = 0.;
332 }
333 /*< if( l1.le.nm1 ) then >*/
334 if (l1 <= nm1) {
335 /*< do 20 m = l1, nm1 >*/
336 i__1 = nm1;
337 for (m = l1; m <= i__1; ++m) {
338 /*< tst = abs( e( m ) ) >*/
339 tst = (d__1 = e[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1));
340 /*< >*/
341 if (tst == 0.) {
342 goto L30;
343 }
344 /*< >*/
345 if (tst <= sqrtcxx . . $ sqrt(447c67c6676f75c3).((d__1 = d__[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1))) * sqrtcxx . . $ sqrt(447c67c6676f75c3).((d__2 = d__[m
346 + 1], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2))) * eps) {
347 /*< e( m ) = zero >*/
348 e[m] = 0.;
349 /*< go to 30 >*/
350 goto L30;
351 /*< end if >*/
352 }
353 /*< 20 continue >*/
354 /* L20: */
355 }
356 /*< end if >*/
357 }
358 /*< m = n >*/
359 m = *n;
360
361 /*< 30 continue >*/
362 L30:
363 /*< l = l1 >*/
364 l = l1;
365 /*< lsv = l >*/
366 lsv = l;
367 /*< lend = m >*/
368 lend = m;
369 /*< lendsv = lend >*/
370 lendsv = lend;
371 /*< l1 = m + 1 >*/
372 l1 = m + 1;
373 /*< >*/
374 if (lend == l) {
375 goto L10;
376 }
377
378 /* scale submatrix in rows and columns l to lend */
379
380 /*< anorm = dlanst( 'i', lend-l+1, d( l ), e( l ) ) >*/
381 i__1 = lend - l + 1;
382 anorm = dlanst_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:84:9`!("i", &i__1, &d__[l], &e[l], (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
383 /*< iscale = 0 >*/
384 iscale = 0;
385 /*< >*/
386 if (anorm == 0.) {
387 goto L10;
388 }
389 /*< if( anorm.gt.ssfmax ) then >*/
390 if (anorm > ssfmax) {
391 /*< iscale = 1 >*/
392 iscale = 1;
393 /*< >*/
394 i__1 = lend - l + 1;
395 dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("g", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &anorm, &ssfmax, &i__1, &c__1cxx . . $ c__1., &d__[l], n,
396 info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
397 /*< >*/
398 i__1 = lend - l;
399 dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("g", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &anorm, &ssfmax, &i__1, &c__1cxx . . $ c__1., &e[l], n,
400 info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
401 /*< else if( anorm.lt.ssfmin ) then >*/
402 } else if (anorm < ssfmin) {
403 /*< iscale = 2 >*/
404 iscale = 2;
405 /*< >*/
406 i__1 = lend - l + 1;
407 dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("g", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &anorm, &ssfmin, &i__1, &c__1cxx . . $ c__1., &d__[l], n,
408 info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
409 /*< >*/
410 i__1 = lend - l;
411 dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("g", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &anorm, &ssfmin, &i__1, &c__1cxx . . $ c__1., &e[l], n,
412 info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
413 /*< end if >*/
414 }
415
416 /* choose between ql and qr iteration */
417
418 /*< if( abs( d( lend ) ).lt.abs( d( l ) ) ) then >*/
419 if ((d__1 = d__[lend], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) < (d__2 = d__[l], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2))) {
420 /*< lend = lsv >*/
421 lend = lsv;
422 /*< l = lendsv >*/
423 l = lendsv;
424 /*< end if >*/
425 }
426
427 /*< if( lend.gt.l ) then >*/
428 if (lend > l) {
429
430 /* ql iteration */
431
432 /* look for small subdiagonal element. */
433
434 /*< 40 continue >*/
435 L40:
436 /*< if( l.ne.lend ) then >*/
437 if (l != lend) {
438 /*< lendm1 = lend - 1 >*/
439 lendm1 = lend - 1;
440 /*< do 50 m = l, lendm1 >*/
441 i__1 = lendm1;
442 for (m = l; m <= i__1; ++m) {
443 /*< tst = abs( e( m ) )**2 >*/
444 /* Computing 2nd power */
445 d__2 = (d__1 = e[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1));
446 tst = d__2 * d__2;
447 /*< >*/
448 if (tst <= eps2 * (d__1 = d__[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) * (d__2 = d__[m
449 + 1], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2)) + safmin) {
450 goto L60;
451 }
452 /*< 50 continue >*/
453 /* L50: */
454 }
455 /*< end if >*/
456 }
457
458 /*< m = lend >*/
459 m = lend;
460
461 /*< 60 continue >*/
462 L60:
463 /*< >*/
464 if (m < lend) {
465 e[m] = 0.;
466 }
467 /*< p = d( l ) >*/
468 p = d__[l];
469 /*< >*/
470 if (m == l) {
471 goto L80;
472 }
473
474 /* if remaining matrix is 2-by-2, use dlae2 or dlaev2 */
475 /* to compute its eigensystem. */
476
477 /*< if( m.eq.l+1 ) then >*/
478 if (m == l + 1) {
479 /*< if( icompz.gt.0 ) then >*/
480 if (icompz > 0) {
481 /*< call dlaev2( d( l ), e( l ), d( l+1 ), rt1, rt2, c, s ) >*/
482 dlaev2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:72:9`!(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s);
483 /*< work( l ) = c >*/
484 work[l] = c__;
485 /*< work( n-1+l ) = s >*/
486 work[*n - 1 + l] = s;
487 /* $$$ call dlasr( 'r', 'v', 'b', n, 2, work( l ), */
488 /* $$$ $ work( n-1+l ), z( 1, l ), ldz ) */
489
490 /* *** New starting with version 2.5 *** */
491
492 /*< tst = z(l+1) >*/
493 tst = z__[l + 1];
494 /*< z(l+1) = c*tst - s*z(l) >*/
495 z__[l + 1] = c__ * tst - s * z__[l];
496 /*< z(l) = s*tst + c*z(l) >*/
497 z__[l] = s * tst + c__ * z__[l];
498 /* ************************************* */
499 /*< else >*/
500 } else {
501 /*< call dlae2( d( l ), e( l ), d( l+1 ), rt1, rt2 ) >*/
502 dlae2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:70:9`!(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2);
503 /*< end if >*/
504 }
505 /*< d( l ) = rt1 >*/
506 d__[l] = rt1;
507 /*< d( l+1 ) = rt2 >*/
508 d__[l + 1] = rt2;
509 /*< e( l ) = zero >*/
510 e[l] = 0.;
511 /*< l = l + 2 >*/
512 l += 2;
513 /*< >*/
514 if (l <= lend) {
515 goto L40;
516 }
517 /*< go to 140 >*/
518 goto L140;
519 /*< end if >*/
520 }
521
522 /*< >*/
523 if (jtot == nmaxit) {
524 goto L140;
525 }
526 /*< jtot = jtot + 1 >*/
527 ++jtot;
528
529 /* form shift. */
530
531 /*< g = ( d( l+1 )-p ) / ( two*e( l ) ) >*/
532 g = (d__[l + 1] - p) / (e[l] * 2.);
533 /*< r = dlapy2( g, one ) >*/
534 r__ = dlapy2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:85:9`!(&g, &c_b31cxx . . $ c_b31.);
535 /*< g = d( m ) - p + ( e( l ) / ( g+sign( r, g ) ) ) >*/
536 g = d__[m] - p + e[l] / (g + d_signcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:14:9`!(&r__, &g));
537
538 /*< s = one >*/
539 s = 1.;
540 /*< c = one >*/
541 c__ = 1.;
542 /*< p = zero >*/
543 p = 0.;
544
545 /* inner loop */
546
547 /*< mm1 = m - 1 >*/
548 mm1 = m - 1;
549 /*< do 70 i = mm1, l, -1 >*/
550 i__1 = l;
551 for (i__ = mm1; i__ >= i__1; --i__) {
552 /*< f = s*e( i ) >*/
553 f = s * e[i__];
554 /*< b = c*e( i ) >*/
555 b = c__ * e[i__];
556 /*< call dlartg( g, f, c, s, r ) >*/
557 dlartg_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:93:9`!(&g, &f, &c__, &s, &r__);
558 /*< >*/
559 if (i__ != m - 1) {
560 e[i__ + 1] = r__;
561 }
562 /*< g = d( i+1 ) - p >*/
563 g = d__[i__ + 1] - p;
564 /*< r = ( d( i )-g )*s + two*c*b >*/
565 r__ = (d__[i__] - g) * s + c__ * 2. * b;
566 /*< p = s*r >*/
567 p = s * r__;
568 /*< d( i+1 ) = g + p >*/
569 d__[i__ + 1] = g + p;
570 /*< g = c*r - b >*/
571 g = c__ * r__ - b;
572
573 /* if eigenvectors are desired, then save rotations. */
574
575 /*< if( icompz.gt.0 ) then >*/
576 if (icompz > 0) {
577 /*< work( i ) = c >*/
578 work[i__] = c__;
579 /*< work( n-1+i ) = -s >*/
580 work[*n - 1 + i__] = -s;
581 /*< end if >*/
582 }
583
584 /*< 70 continue >*/
585 /* L70: */
586 }
587
588 /* if eigenvectors are desired, then apply saved rotations. */
589
590 /*< if( icompz.gt.0 ) then >*/
591 if (icompz > 0) {
592 /*< mm = m - l + 1 >*/
593 mm = m - l + 1;
594 /* $$$ call dlasr( 'r', 'v', 'b', n, mm, work( l ), work( n-1+l ), */
595 /* $$$ $ z( 1, l ), ldz ) */
596
597 /* *** New starting with version 2.5 *** */
598
599 /*< >*/
600 dlasr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:97:9`!("r", "v", "b", &c__1cxx . . $ c__1., &mm, &work[l], &work[*n - 1 + l], &
601 z__[l], &c__1cxx . . $ c__1., (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
602 /* ************************************* */
603 /*< end if >*/
604 }
605
606 /*< d( l ) = d( l ) - p >*/
607 d__[l] -= p;
608 /*< e( l ) = g >*/
609 e[l] = g;
610 /*< go to 40 >*/
611 goto L40;
612
613 /* eigenvalue found. */
614
615 /*< 80 continue >*/
616 L80:
617 /*< d( l ) = p >*/
618 d__[l] = p;
619
620 /*< l = l + 1 >*/
621 ++l;
622 /*< >*/
623 if (l <= lend) {
624 goto L40;
625 }
626 /*< go to 140 >*/
627 goto L140;
628
629 /*< else >*/
630 } else {
631
632 /* qr iteration */
633
634 /* look for small superdiagonal element. */
635
636 /*< 90 continue >*/
637 L90:
638 /*< if( l.ne.lend ) then >*/
639 if (l != lend) {
640 /*< lendp1 = lend + 1 >*/
641 lendp1 = lend + 1;
642 /*< do 100 m = l, lendp1, -1 >*/
643 i__1 = lendp1;
644 for (m = l; m >= i__1; --m) {
645 /*< tst = abs( e( m-1 ) )**2 >*/
646 /* Computing 2nd power */
647 d__2 = (d__1 = e[m - 1], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1));
648 tst = d__2 * d__2;
649 /*< >*/
650 if (tst <= eps2 * (d__1 = d__[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) * (d__2 = d__[m
651 - 1], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2)) + safmin) {
652 goto L110;
653 }
654 /*< 100 continue >*/
655 /* L100: */
656 }
657 /*< end if >*/
658 }
659
660 /*< m = lend >*/
661 m = lend;
662
663 /*< 110 continue >*/
664 L110:
665 /*< >*/
666 if (m > lend) {
667 e[m - 1] = 0.;
668 }
669 /*< p = d( l ) >*/
670 p = d__[l];
671 /*< >*/
672 if (m == l) {
673 goto L130;
674 }
675
676 /* if remaining matrix is 2-by-2, use dlae2 or dlaev2 */
677 /* to compute its eigensystem. */
678
679 /*< if( m.eq.l-1 ) then >*/
680 if (m == l - 1) {
681 /*< if( icompz.gt.0 ) then >*/
682 if (icompz > 0) {
683 /*< call dlaev2( d( l-1 ), e( l-1 ), d( l ), rt1, rt2, c, s ) >*/
684 dlaev2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:72:9`!(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s)
685 ;
686 /* $$$ work( m ) = c */
687 /* $$$ work( n-1+m ) = s */
688 /* $$$ call dlasr( 'r', 'v', 'f', n, 2, work( m ), */
689 /* $$$ $ work( n-1+m ), z( 1, l-1 ), ldz ) */
690
691 /* *** New starting with version 2.5 *** */
692
693 /*< tst = z(l) >*/
694 tst = z__[l];
695 /*< z(l) = c*tst - s*z(l-1) >*/
696 z__[l] = c__ * tst - s * z__[l - 1];
697 /*< z(l-1) = s*tst + c*z(l-1) >*/
698 z__[l - 1] = s * tst + c__ * z__[l - 1];
699 /* ************************************* */
700 /*< else >*/
701 } else {
702 /*< call dlae2( d( l-1 ), e( l-1 ), d( l ), rt1, rt2 ) >*/
703 dlae2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:70:9`!(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2);
704 /*< end if >*/
705 }
706 /*< d( l-1 ) = rt1 >*/
707 d__[l - 1] = rt1;
708 /*< d( l ) = rt2 >*/
709 d__[l] = rt2;
710 /*< e( l-1 ) = zero >*/
711 e[l - 1] = 0.;
712 /*< l = l - 2 >*/
713 l += -2;
714 /*< >*/
715 if (l >= lend) {
716 goto L90;
717 }
718 /*< go to 140 >*/
719 goto L140;
720 /*< end if >*/
721 }
722
723 /*< >*/
724 if (jtot == nmaxit) {
725 goto L140;
726 }
727 /*< jtot = jtot + 1 >*/
728 ++jtot;
729
730 /* form shift. */
731
732 /*< g = ( d( l-1 )-p ) / ( two*e( l-1 ) ) >*/
733 g = (d__[l - 1] - p) / (e[l - 1] * 2.);
734 /*< r = dlapy2( g, one ) >*/
735 r__ = dlapy2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:85:9`!(&g, &c_b31cxx . . $ c_b31.);
736 /*< g = d( m ) - p + ( e( l-1 ) / ( g+sign( r, g ) ) ) >*/
737 g = d__[m] - p + e[l - 1] / (g + d_signcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:14:9`!(&r__, &g));
738
739 /*< s = one >*/
740 s = 1.;
741 /*< c = one >*/
742 c__ = 1.;
743 /*< p = zero >*/
744 p = 0.;
745
746 /* inner loop */
747
748 /*< lm1 = l - 1 >*/
749 lm1 = l - 1;
750 /*< do 120 i = m, lm1 >*/
751 i__1 = lm1;
752 for (i__ = m; i__ <= i__1; ++i__) {
753 /*< f = s*e( i ) >*/
754 f = s * e[i__];
755 /*< b = c*e( i ) >*/
756 b = c__ * e[i__];
757 /*< call dlartg( g, f, c, s, r ) >*/
758 dlartg_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:93:9`!(&g, &f, &c__, &s, &r__);
759 /*< >*/
760 if (i__ != m) {
761 e[i__ - 1] = r__;
762 }
763 /*< g = d( i ) - p >*/
764 g = d__[i__] - p;
765 /*< r = ( d( i+1 )-g )*s + two*c*b >*/
766 r__ = (d__[i__ + 1] - g) * s + c__ * 2. * b;
767 /*< p = s*r >*/
768 p = s * r__;
769 /*< d( i ) = g + p >*/
770 d__[i__] = g + p;
771 /*< g = c*r - b >*/
772 g = c__ * r__ - b;
773
774 /* if eigenvectors are desired, then save rotations. */
775
776 /*< if( icompz.gt.0 ) then >*/
777 if (icompz > 0) {
778 /*< work( i ) = c >*/
779 work[i__] = c__;
780 /*< work( n-1+i ) = s >*/
781 work[*n - 1 + i__] = s;
782 /*< end if >*/
783 }
784
785 /*< 120 continue >*/
786 /* L120: */
787 }
788
789 /* if eigenvectors are desired, then apply saved rotations. */
790
791 /*< if( icompz.gt.0 ) then >*/
792 if (icompz > 0) {
793 /*< mm = l - m + 1 >*/
794 mm = l - m + 1;
795 /* $$$ call dlasr( 'r', 'v', 'f', n, mm, work( m ), work( n-1+m ), */
796 /* $$$ $ z( 1, m ), ldz ) */
797
798 /* *** New starting with version 2.5 *** */
799
800 /*< >*/
801 dlasr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:97:9`!("r", "v", "f", &c__1cxx . . $ c__1., &mm, &work[m], &work[*n - 1 + m], &
802 z__[m], &c__1cxx . . $ c__1., (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
803 /* ************************************* */
804 /*< end if >*/
805 }
806
807 /*< d( l ) = d( l ) - p >*/
808 d__[l] -= p;
809 /*< e( lm1 ) = g >*/
810 e[lm1] = g;
811 /*< go to 90 >*/
812 goto L90;
813
814 /* eigenvalue found. */
815
816 /*< 130 continue >*/
817 L130:
818 /*< d( l ) = p >*/
819 d__[l] = p;
820
821 /*< l = l - 1 >*/
822 --l;
823 /*< >*/
824 if (l >= lend) {
825 goto L90;
826 }
827 /*< go to 140 >*/
828 goto L140;
829
830 /*< end if >*/
831 }
832
833 /* undo scaling if necessary */
834
835 /*< 140 continue >*/
836 L140:
837 /*< if( iscale.eq.1 ) then >*/
838 if (iscale == 1) {
839 /*< >*/
840 i__1 = lendsv - lsv + 1;
841 dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("g", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &ssfmax, &anorm, &i__1, &c__1cxx . . $ c__1., &d__[lsv],
842 n, info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
843 /*< >*/
844 i__1 = lendsv - lsv;
845 dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("g", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &ssfmax, &anorm, &i__1, &c__1cxx . . $ c__1., &e[lsv], n,
846 info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
847 /*< else if( iscale.eq.2 ) then >*/
848 } else if (iscale == 2) {
849 /*< >*/
850 i__1 = lendsv - lsv + 1;
851 dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("g", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &ssfmin, &anorm, &i__1, &c__1cxx . . $ c__1., &d__[lsv],
852 n, info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
853 /*< >*/
854 i__1 = lendsv - lsv;
855 dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("g", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &ssfmin, &anorm, &i__1, &c__1cxx . . $ c__1., &e[lsv], n,
856 info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
857 /*< end if >*/
858 }
859
860 /* check for no convergence to an eigenvalue after a total */
861 /* of n*maxit iterations. */
862
863 /*< >*/
864 if (jtot < nmaxit) {
865 goto L10;
866 }
867 /*< do 150 i = 1, n - 1 >*/
868 i__1 = *n - 1;
869 for (i__ = 1; i__ <= i__1; ++i__) {
870 /*< >*/
871 if (e[i__] != 0.) {
872 ++(*info);
873 }
874 /*< 150 continue >*/
875 /* L150: */
876 }
877 /*< go to 190 >*/
878 goto L190;
879
880 /* order eigenvalues and eigenvectors. */
881
882 /*< 160 continue >*/
883 L160:
884 /*< if( icompz.eq.0 ) then >*/
885 if (icompz == 0) {
886
887 /* use quick sort */
888
889 /*< call dlasrt( 'i', n, d, info ) >*/
890 dlasrt_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:98:9`!("i", n, &d__[1], info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1);
891
892 /*< else >*/
893 } else {
894
895 /* use selection sort to minimize swaps of eigenvectors */
896
897 /*< do 180 ii = 2, n >*/
898 i__1 = *n;
899 for (ii = 2; ii <= i__1; ++ii) {
900 /*< i = ii - 1 >*/
901 i__ = ii - 1;
902 /*< k = i >*/
903 k = i__;
904 /*< p = d( i ) >*/
905 p = d__[i__];
906 /*< do 170 j = ii, n >*/
907 i__2 = *n;
908 for (j = ii; j <= i__2; ++j) {
909 /*< if( d( j ).lt.p ) then >*/
910 if (d__[j] < p) {
911 /*< k = j >*/
912 k = j;
913 /*< p = d( j ) >*/
914 p = d__[j];
915 /*< end if >*/
916 }
917 /*< 170 continue >*/
918 /* L170: */
919 }
920 /*< if( k.ne.i ) then >*/
921 if (k != i__) {
922 /*< d( k ) = d( i ) >*/
923 d__[k] = d__[i__];
924 /*< d( i ) = p >*/
925 d__[i__] = p;
926 /* $$$ call dswap( n, z( 1, i ), 1, z( 1, k ), 1 ) */
927 /* *** New starting with version 2.5 *** */
928
929 /*< p = z(k) >*/
930 p = z__[k];
931 /*< z(k) = z(i) >*/
932 z__[k] = z__[i__];
933 /*< z(i) = p >*/
934 z__[i__] = p;
935 /* ************************************* */
936 /*< end if >*/
937 }
938 /*< 180 continue >*/
939 /* L180: */
940 }
941 /*< end if >*/
942 }
943
944 /*< 190 continue >*/
945 L190:
946 /*< return >*/
947 return 0;
948
949 /* %---------------% */
950 /* | End of dstqrb | */
951 /* %---------------% */
952
953 /*< end >*/
954 } /* dstqrb_ */
955
956 #ifdef __cplusplus
957 }
958 #endif