| 1 | /* lapack/complex16/zgebal.f -- translated by f2c (version 20050501). |
| 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__1cxx . . $ c__1. = 1; |
| 21 | |
| 22 | /*< SUBROUTINE ZGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO ) >*/ |
| 23 | /* Subroutine */ int zgebal_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:313:9`!(char *job, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *a, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! |
| 24 | *lda, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ilo, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ihi, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *scale, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *info, |
| 25 | ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`! job_len) |
| 26 | { |
| 27 | /* System generated locals */ |
| 28 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! a_dim1, a_offset, i__1, i__2, i__3; |
| 29 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! d__1, d__2; |
| 30 | |
| 31 | /* Builtin functions */ |
| 32 | double d_imagcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:12:9`!(doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *), z_abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:28:9`!(doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *); |
| 33 | |
| 34 | /* Local variables */ |
| 35 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! c__, f, g; |
| 36 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, j, k, l, m; |
| 37 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! r__, s, ca, ra; |
| 38 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! ica, ira, iexc; |
| 39 | extern logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(const char *, const char *, 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`!); |
| 40 | extern /* Subroutine */ int zswap_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:341:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, |
| 41 | doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *); |
| 42 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! sfmin1, sfmin2, sfmax1, sfmax2; |
| 43 | extern 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 *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 44 | extern /* Subroutine */ int xerbla_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:303:9`!(char *, 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`!), zdscal_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:311:9`!( |
| 45 | 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`! *, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *); |
| 46 | extern integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! izamax_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:184:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublecomplexcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:56:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *); |
| 47 | logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! noconv; |
| 48 | (void)job_len; |
| 49 | |
| 50 | /* -- LAPACK routine (version 3.0) -- */ |
| 51 | /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ |
| 52 | /* Courant Institute, Argonne National Lab, and Rice University */ |
| 53 | /* June 30, 1999 */ |
| 54 | |
| 55 | /* .. Scalar Arguments .. */ |
| 56 | /*< CHARACTER JOB >*/ |
| 57 | /*< INTEGER IHI, ILO, INFO, LDA, N >*/ |
| 58 | /* .. */ |
| 59 | /* .. Array Arguments .. */ |
| 60 | /*< DOUBLE PRECISION SCALE( * ) >*/ |
| 61 | /*< COMPLEX*16 A( LDA, * ) >*/ |
| 62 | /* .. */ |
| 63 | |
| 64 | /* Purpose */ |
| 65 | /* ======= */ |
| 66 | |
| 67 | /* ZGEBAL balances a general complex matrix A. This involves, first, */ |
| 68 | /* permuting A by a similarity transformation to isolate eigenvalues */ |
| 69 | /* in the first 1 to ILO-1 and last IHI+1 to N elements on the */ |
| 70 | /* diagonal; and second, applying a diagonal similarity transformation */ |
| 71 | /* to rows and columns ILO to IHI to make the rows and columns as */ |
| 72 | /* close in norm as possible. Both steps are optional. */ |
| 73 | |
| 74 | /* Balancing may reduce the 1-norm of the matrix, and improve the */ |
| 75 | /* accuracy of the computed eigenvalues and/or eigenvectors. */ |
| 76 | |
| 77 | /* Arguments */ |
| 78 | /* ========= */ |
| 79 | |
| 80 | /* JOB (input) CHARACTER*1 */ |
| 81 | /* Specifies the operations to be performed on A: */ |
| 82 | /* = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0 */ |
| 83 | /* for i = 1,...,N; */ |
| 84 | /* = 'P': permute only; */ |
| 85 | /* = 'S': scale only; */ |
| 86 | /* = 'B': both permute and scale. */ |
| 87 | |
| 88 | /* N (input) INTEGER */ |
| 89 | /* The order of the matrix A. N >= 0. */ |
| 90 | |
| 91 | /* A (input/output) COMPLEX*16 array, dimension (LDA,N) */ |
| 92 | /* On entry, the input matrix A. */ |
| 93 | /* On exit, A is overwritten by the balanced matrix. */ |
| 94 | /* If JOB = 'N', A is not referenced. */ |
| 95 | /* See Further Details. */ |
| 96 | |
| 97 | /* LDA (input) INTEGER */ |
| 98 | /* The leading dimension of the array A. LDA >= max(1,N). */ |
| 99 | |
| 100 | /* ILO (output) INTEGER */ |
| 101 | /* IHI (output) INTEGER */ |
| 102 | /* ILO and IHI are set to integers such that on exit */ |
| 103 | /* A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N. */ |
| 104 | /* If JOB = 'N' or 'S', ILO = 1 and IHI = N. */ |
| 105 | |
| 106 | /* SCALE (output) DOUBLE PRECISION array, dimension (N) */ |
| 107 | /* Details of the permutations and scaling factors applied to */ |
| 108 | /* A. If P(j) is the index of the row and column interchanged */ |
| 109 | /* with row and column j and D(j) is the scaling factor */ |
| 110 | /* applied to row and column j, then */ |
| 111 | /* SCALE(j) = P(j) for j = 1,...,ILO-1 */ |
| 112 | /* = D(j) for j = ILO,...,IHI */ |
| 113 | /* = P(j) for j = IHI+1,...,N. */ |
| 114 | /* The order in which the interchanges are made is N to IHI+1, */ |
| 115 | /* then 1 to ILO-1. */ |
| 116 | |
| 117 | /* INFO (output) INTEGER */ |
| 118 | /* = 0: successful exit. */ |
| 119 | /* < 0: if INFO = -i, the i-th argument had an illegal value. */ |
| 120 | |
| 121 | /* Further Details */ |
| 122 | /* =============== */ |
| 123 | |
| 124 | /* The permutations consist of row and column interchanges which put */ |
| 125 | /* the matrix in the form */ |
| 126 | |
| 127 | /* ( T1 X Y ) */ |
| 128 | /* P A P = ( 0 B Z ) */ |
| 129 | /* ( 0 0 T2 ) */ |
| 130 | |
| 131 | /* where T1 and T2 are upper triangular matrices whose eigenvalues lie */ |
| 132 | /* along the diagonal. The column indices ILO and IHI mark the starting */ |
| 133 | /* and ending columns of the submatrix B. Balancing consists of applying */ |
| 134 | /* a diagonal similarity transformation inv(D) * B * D to make the */ |
| 135 | /* 1-norms of each row of B and its corresponding column nearly equal. */ |
| 136 | /* The output matrix is */ |
| 137 | |
| 138 | /* ( T1 X*D Y ) */ |
| 139 | /* ( 0 inv(D)*B*D inv(D)*Z ). */ |
| 140 | /* ( 0 0 T2 ) */ |
| 141 | |
| 142 | /* Information about the permutations P and the diagonal matrix D is */ |
| 143 | /* returned in the vector SCALE. */ |
| 144 | |
| 145 | /* This subroutine is based on the EISPACK routine CBAL. */ |
| 146 | |
| 147 | /* Modified by Tzu-Yi Chen, Computer Science Division, University of */ |
| 148 | /* California at Berkeley, USA */ |
| 149 | |
| 150 | /* ===================================================================== */ |
| 151 | |
| 152 | /* .. Parameters .. */ |
| 153 | /*< DOUBLE PRECISION ZERO, ONE >*/ |
| 154 | /*< PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) >*/ |
| 155 | /*< DOUBLE PRECISION SCLFAC >*/ |
| 156 | /*< PARAMETER ( SCLFAC = 0.8D+1 ) >*/ |
| 157 | /*< DOUBLE PRECISION FACTOR >*/ |
| 158 | /*< PARAMETER ( FACTOR = 0.95D+0 ) >*/ |
| 159 | /* .. */ |
| 160 | /* .. Local Scalars .. */ |
| 161 | /*< LOGICAL NOCONV >*/ |
| 162 | /*< INTEGER I, ICA, IEXC, IRA, J, K, L, M >*/ |
| 163 | /*< >*/ |
| 164 | /*< COMPLEX*16 CDUM >*/ |
| 165 | /* .. */ |
| 166 | /* .. External Functions .. */ |
| 167 | /*< LOGICAL LSAME >*/ |
| 168 | /*< INTEGER IZAMAX >*/ |
| 169 | /*< DOUBLE PRECISION DLAMCH >*/ |
| 170 | /*< EXTERNAL LSAME, IZAMAX, DLAMCH >*/ |
| 171 | /* .. */ |
| 172 | /* .. External Subroutines .. */ |
| 173 | /*< EXTERNAL XERBLA, ZDSCAL, ZSWAP >*/ |
| 174 | /* .. */ |
| 175 | /* .. Intrinsic Functions .. */ |
| 176 | /*< INTRINSIC ABS, DBLE, DIMAG, MAX, MIN >*/ |
| 177 | /* .. */ |
| 178 | /* .. Statement Functions .. */ |
| 179 | /*< DOUBLE PRECISION CABS1 >*/ |
| 180 | /* .. */ |
| 181 | /* .. Statement Function definitions .. */ |
| 182 | /*< CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) >*/ |
| 183 | /* .. */ |
| 184 | /* .. Executable Statements .. */ |
| 185 | |
| 186 | /* Test the input parameters */ |
| 187 | |
| 188 | /*< INFO = 0 >*/ |
| 189 | /* Parameter adjustments */ |
| 190 | a_dim1 = *lda; |
| 191 | a_offset = 1 + a_dim1; |
| 192 | a -= a_offset; |
| 193 | --scale; |
| 194 | |
| 195 | /* Function Body */ |
| 196 | *info = 0; |
| 197 | /*< >*/ |
| 198 | if (! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(job, "N", (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) && ! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(job, "P", ( |
| 199 | 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) && ! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(job, "S", (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) |
| 200 | && ! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(job, "B", (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)) { |
| 201 | /*< INFO = -1 >*/ |
| 202 | *info = -1; |
| 203 | /*< ELSE IF( N.LT.0 ) THEN >*/ |
| 204 | } else if (*n < 0) { |
| 205 | /*< INFO = -2 >*/ |
| 206 | *info = -2; |
| 207 | /*< ELSE IF( LDA.LT.MAX( 1, N ) ) THEN >*/ |
| 208 | } else if (*lda < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,*n)) { |
| 209 | /*< INFO = -4 >*/ |
| 210 | *info = -4; |
| 211 | /*< END IF >*/ |
| 212 | } |
| 213 | /*< IF( INFO.NE.0 ) THEN >*/ |
| 214 | if (*info != 0) { |
| 215 | /*< CALL XERBLA( 'ZGEBAL', -INFO ) >*/ |
| 216 | i__1 = -(*info); |
| 217 | xerbla_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:303:9`!("ZGEBAL", &i__1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)6); |
| 218 | /*< RETURN >*/ |
| 219 | return 0; |
| 220 | /*< END IF >*/ |
| 221 | } |
| 222 | |
| 223 | /*< K = 1 >*/ |
| 224 | k = 1; |
| 225 | /*< L = N >*/ |
| 226 | l = *n; |
| 227 | |
| 228 | /*< >*/ |
| 229 | if (*n == 0) { |
| 230 | goto L210; |
| 231 | } |
| 232 | |
| 233 | /*< IF( LSAME( JOB, 'N' ) ) THEN >*/ |
| 234 | if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(job, "N", (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)) { |
| 235 | /*< DO 10 I = 1, N >*/ |
| 236 | i__1 = *n; |
| 237 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 238 | /*< SCALE( I ) = ONE >*/ |
| 239 | scale[i__] = 1.; |
| 240 | /*< 10 CONTINUE >*/ |
| 241 | /* L10: */ |
| 242 | } |
| 243 | /*< GO TO 210 >*/ |
| 244 | goto L210; |
| 245 | /*< END IF >*/ |
| 246 | } |
| 247 | |
| 248 | /*< >*/ |
| 249 | if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(job, "S", (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)) { |
| 250 | goto L120; |
| 251 | } |
| 252 | |
| 253 | /* Permutation to isolate eigenvalues if possible */ |
| 254 | |
| 255 | /*< GO TO 50 >*/ |
| 256 | goto L50; |
| 257 | |
| 258 | /* Row and column exchange. */ |
| 259 | |
| 260 | /*< 20 CONTINUE >*/ |
| 261 | L20: |
| 262 | /*< SCALE( M ) = J >*/ |
| 263 | scale[m] = (doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`!) j; |
| 264 | /*< >*/ |
| 265 | if (j == m) { |
| 266 | goto L30; |
| 267 | } |
| 268 | |
| 269 | /*< CALL ZSWAP( L, A( 1, J ), 1, A( 1, M ), 1 ) >*/ |
| 270 | zswap_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:341:9`!(&l, &a[j * a_dim1 + 1], &c__1cxx . . $ c__1., &a[m * a_dim1 + 1], &c__1cxx . . $ c__1.); |
| 271 | /*< CALL ZSWAP( N-K+1, A( J, K ), LDA, A( M, K ), LDA ) >*/ |
| 272 | i__1 = *n - k + 1; |
| 273 | zswap_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:341:9`!(&i__1, &a[j + k * a_dim1], lda, &a[m + k * a_dim1], lda); |
| 274 | |
| 275 | /*< 30 CONTINUE >*/ |
| 276 | L30: |
| 277 | /*< GO TO ( 40, 80 )IEXC >*/ |
| 278 | switch (iexc) { |
| 279 | case 1: goto L40; |
| 280 | case 2: goto L80; |
| 281 | } |
| 282 | |
| 283 | /* Search for rows isolating an eigenvalue and push them down. */ |
| 284 | |
| 285 | /*< 40 CONTINUE >*/ |
| 286 | L40: |
| 287 | /*< >*/ |
| 288 | if (l == 1) { |
| 289 | goto L210; |
| 290 | } |
| 291 | /*< L = L - 1 >*/ |
| 292 | --l; |
| 293 | |
| 294 | /*< 50 CONTINUE >*/ |
| 295 | L50: |
| 296 | /*< DO 70 J = L, 1, -1 >*/ |
| 297 | for (j = l; j >= 1; --j) { |
| 298 | |
| 299 | /*< DO 60 I = 1, L >*/ |
| 300 | i__1 = l; |
| 301 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 302 | /*< >*/ |
| 303 | if (i__ == j) { |
| 304 | goto L60; |
| 305 | } |
| 306 | /*< >*/ |
| 307 | i__2 = j + i__ * a_dim1; |
| 308 | if (a[i__2].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. != 0. || d_imagcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:12:9`!(&a[j + i__ * a_dim1]) != 0.) { |
| 309 | goto L70; |
| 310 | } |
| 311 | /*< 60 CONTINUE >*/ |
| 312 | L60: |
| 313 | ; |
| 314 | } |
| 315 | |
| 316 | /*< M = L >*/ |
| 317 | m = l; |
| 318 | /*< IEXC = 1 >*/ |
| 319 | iexc = 1; |
| 320 | /*< GO TO 20 >*/ |
| 321 | goto L20; |
| 322 | /*< 70 CONTINUE >*/ |
| 323 | L70: |
| 324 | ; |
| 325 | } |
| 326 | |
| 327 | /*< GO TO 90 >*/ |
| 328 | goto L90; |
| 329 | |
| 330 | /* Search for columns isolating an eigenvalue and push them left. */ |
| 331 | |
| 332 | /*< 80 CONTINUE >*/ |
| 333 | L80: |
| 334 | /*< K = K + 1 >*/ |
| 335 | ++k; |
| 336 | |
| 337 | /*< 90 CONTINUE >*/ |
| 338 | L90: |
| 339 | /*< DO 110 J = K, L >*/ |
| 340 | i__1 = l; |
| 341 | for (j = k; j <= i__1; ++j) { |
| 342 | |
| 343 | /*< DO 100 I = K, L >*/ |
| 344 | i__2 = l; |
| 345 | for (i__ = k; i__ <= i__2; ++i__) { |
| 346 | /*< >*/ |
| 347 | if (i__ == j) { |
| 348 | goto L100; |
| 349 | } |
| 350 | /*< >*/ |
| 351 | i__3 = i__ + j * a_dim1; |
| 352 | if (a[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r. != 0. || d_imagcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:12:9`!(&a[i__ + j * a_dim1]) != 0.) { |
| 353 | goto L110; |
| 354 | } |
| 355 | /*< 100 CONTINUE >*/ |
| 356 | L100: |
| 357 | ; |
| 358 | } |
| 359 | |
| 360 | /*< M = K >*/ |
| 361 | m = k; |
| 362 | /*< IEXC = 2 >*/ |
| 363 | iexc = 2; |
| 364 | /*< GO TO 20 >*/ |
| 365 | goto L20; |
| 366 | /*< 110 CONTINUE >*/ |
| 367 | L110: |
| 368 | ; |
| 369 | } |
| 370 | |
| 371 | /*< 120 CONTINUE >*/ |
| 372 | L120: |
| 373 | /*< DO 130 I = K, L >*/ |
| 374 | i__1 = l; |
| 375 | for (i__ = k; i__ <= i__1; ++i__) { |
| 376 | /*< SCALE( I ) = ONE >*/ |
| 377 | scale[i__] = 1.; |
| 378 | /*< 130 CONTINUE >*/ |
| 379 | /* L130: */ |
| 380 | } |
| 381 | |
| 382 | /*< >*/ |
| 383 | if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(job, "P", (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)) { |
| 384 | goto L210; |
| 385 | } |
| 386 | |
| 387 | /* Balance the submatrix in rows K to L. */ |
| 388 | |
| 389 | /* Iterative loop for norm reduction */ |
| 390 | |
| 391 | /*< SFMIN1 = DLAMCH( 'S' ) / DLAMCH( 'P' ) >*/ |
| 392 | sfmin1 = 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) / dlamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:81:9`!("P", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 393 | /*< SFMAX1 = ONE / SFMIN1 >*/ |
| 394 | sfmax1 = 1. / sfmin1; |
| 395 | /*< SFMIN2 = SFMIN1*SCLFAC >*/ |
| 396 | sfmin2 = sfmin1 * 8.; |
| 397 | /*< SFMAX2 = ONE / SFMIN2 >*/ |
| 398 | sfmax2 = 1. / sfmin2; |
| 399 | /*< 140 CONTINUE >*/ |
| 400 | L140: |
| 401 | /*< NOCONV = .FALSE. >*/ |
| 402 | noconv = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!; |
| 403 | |
| 404 | /*< DO 200 I = K, L >*/ |
| 405 | i__1 = l; |
| 406 | for (i__ = k; i__ <= i__1; ++i__) { |
| 407 | /*< C = ZERO >*/ |
| 408 | c__ = 0.; |
| 409 | /*< R = ZERO >*/ |
| 410 | r__ = 0.; |
| 411 | |
| 412 | /*< DO 150 J = K, L >*/ |
| 413 | i__2 = l; |
| 414 | for (j = k; j <= i__2; ++j) { |
| 415 | /*< >*/ |
| 416 | if (j == i__) { |
| 417 | goto L150; |
| 418 | } |
| 419 | /*< C = C + CABS1( A( J, I ) ) >*/ |
| 420 | i__3 = j + i__ * a_dim1; |
| 421 | c__ += (d__1 = a[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) + (d__2 = d_imagcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:12:9`!(&a[j + i__ * |
| 422 | a_dim1]), abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2)); |
| 423 | /*< R = R + CABS1( A( I, J ) ) >*/ |
| 424 | i__3 = i__ + j * a_dim1; |
| 425 | r__ += (d__1 = a[i__3].rcxx . . $ $anonymous_type_ec17f80a666933f6_1#r., abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) + (d__2 = d_imagcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:12:9`!(&a[i__ + j * |
| 426 | a_dim1]), abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2)); |
| 427 | /*< 150 CONTINUE >*/ |
| 428 | L150: |
| 429 | ; |
| 430 | } |
| 431 | /*< ICA = IZAMAX( L, A( 1, I ), 1 ) >*/ |
| 432 | ica = izamax_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:184:9`!(&l, &a[i__ * a_dim1 + 1], &c__1cxx . . $ c__1.); |
| 433 | /*< CA = ABS( A( ICA, I ) ) >*/ |
| 434 | ca = z_abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:28:9`!(&a[ica + i__ * a_dim1]); |
| 435 | /*< IRA = IZAMAX( N-K+1, A( I, K ), LDA ) >*/ |
| 436 | i__2 = *n - k + 1; |
| 437 | ira = izamax_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:184:9`!(&i__2, &a[i__ + k * a_dim1], lda); |
| 438 | /*< RA = ABS( A( I, IRA+K-1 ) ) >*/ |
| 439 | ra = z_abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:28:9`!(&a[i__ + (ira + k - 1) * a_dim1]); |
| 440 | |
| 441 | /* Guard against zero C or R due to underflow. */ |
| 442 | |
| 443 | /*< >*/ |
| 444 | if (c__ == 0. || r__ == 0.) { |
| 445 | goto L200; |
| 446 | } |
| 447 | /*< G = R / SCLFAC >*/ |
| 448 | g = r__ / 8.; |
| 449 | /*< F = ONE >*/ |
| 450 | f = 1.; |
| 451 | /*< S = C + R >*/ |
| 452 | s = c__ + r__; |
| 453 | /*< 160 CONTINUE >*/ |
| 454 | L160: |
| 455 | /*< >*/ |
| 456 | /* Computing MAX */ |
| 457 | d__1 = maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(f,c__); |
| 458 | /* Computing MIN */ |
| 459 | d__2 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(r__,g); |
| 460 | if (c__ >= g || maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(d__1,ca) >= sfmax2 || mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(d__2,ra) <= sfmin2) { |
| 461 | goto L170; |
| 462 | } |
| 463 | /*< F = F*SCLFAC >*/ |
| 464 | f *= 8.; |
| 465 | /*< C = C*SCLFAC >*/ |
| 466 | c__ *= 8.; |
| 467 | /*< CA = CA*SCLFAC >*/ |
| 468 | ca *= 8.; |
| 469 | /*< R = R / SCLFAC >*/ |
| 470 | r__ /= 8.; |
| 471 | /*< G = G / SCLFAC >*/ |
| 472 | g /= 8.; |
| 473 | /*< RA = RA / SCLFAC >*/ |
| 474 | ra /= 8.; |
| 475 | /*< GO TO 160 >*/ |
| 476 | goto L160; |
| 477 | |
| 478 | /*< 170 CONTINUE >*/ |
| 479 | L170: |
| 480 | /*< G = C / SCLFAC >*/ |
| 481 | g = c__ / 8.; |
| 482 | /*< 180 CONTINUE >*/ |
| 483 | L180: |
| 484 | /*< >*/ |
| 485 | /* Computing MIN */ |
| 486 | d__1 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(f,c__), d__1 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(d__1,g); |
| 487 | if (g < r__ || maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(r__,ra) >= sfmax2 || mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(d__1,ca) <= sfmin2) { |
| 488 | goto L190; |
| 489 | } |
| 490 | /*< F = F / SCLFAC >*/ |
| 491 | f /= 8.; |
| 492 | /*< C = C / SCLFAC >*/ |
| 493 | c__ /= 8.; |
| 494 | /*< G = G / SCLFAC >*/ |
| 495 | g /= 8.; |
| 496 | /*< CA = CA / SCLFAC >*/ |
| 497 | ca /= 8.; |
| 498 | /*< R = R*SCLFAC >*/ |
| 499 | r__ *= 8.; |
| 500 | /*< RA = RA*SCLFAC >*/ |
| 501 | ra *= 8.; |
| 502 | /*< GO TO 180 >*/ |
| 503 | goto L180; |
| 504 | |
| 505 | /* Now balance. */ |
| 506 | |
| 507 | /*< 190 CONTINUE >*/ |
| 508 | L190: |
| 509 | /*< >*/ |
| 510 | if (c__ + r__ >= s * .95) { |
| 511 | goto L200; |
| 512 | } |
| 513 | /*< IF( F.LT.ONE .AND. SCALE( I ).LT.ONE ) THEN >*/ |
| 514 | if (f < 1. && scale[i__] < 1.) { |
| 515 | /*< >*/ |
| 516 | if (f * scale[i__] <= sfmin1) { |
| 517 | goto L200; |
| 518 | } |
| 519 | /*< END IF >*/ |
| 520 | } |
| 521 | /*< IF( F.GT.ONE .AND. SCALE( I ).GT.ONE ) THEN >*/ |
| 522 | if (f > 1. && scale[i__] > 1.) { |
| 523 | /*< >*/ |
| 524 | if (scale[i__] >= sfmax1 / f) { |
| 525 | goto L200; |
| 526 | } |
| 527 | /*< END IF >*/ |
| 528 | } |
| 529 | /*< G = ONE / F >*/ |
| 530 | g = 1. / f; |
| 531 | /*< SCALE( I ) = SCALE( I )*F >*/ |
| 532 | scale[i__] *= f; |
| 533 | /*< NOCONV = .TRUE. >*/ |
| 534 | noconv = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; |
| 535 | |
| 536 | /*< CALL ZDSCAL( N-K+1, G, A( I, K ), LDA ) >*/ |
| 537 | i__2 = *n - k + 1; |
| 538 | zdscal_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:311:9`!(&i__2, &g, &a[i__ + k * a_dim1], lda); |
| 539 | /*< CALL ZDSCAL( L, F, A( 1, I ), 1 ) >*/ |
| 540 | zdscal_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:311:9`!(&l, &f, &a[i__ * a_dim1 + 1], &c__1cxx . . $ c__1.); |
| 541 | |
| 542 | /*< 200 CONTINUE >*/ |
| 543 | L200: |
| 544 | ; |
| 545 | } |
| 546 | |
| 547 | /*< >*/ |
| 548 | if (noconv) { |
| 549 | goto L140; |
| 550 | } |
| 551 | |
| 552 | /*< 210 CONTINUE >*/ |
| 553 | L210: |
| 554 | /*< ILO = K >*/ |
| 555 | *ilo = k; |
| 556 | /*< IHI = L >*/ |
| 557 | *ihi = l; |
| 558 | |
| 559 | /*< RETURN >*/ |
| 560 | return 0; |
| 561 | |
| 562 | /* End of ZGEBAL */ |
| 563 | |
| 564 | /*< END >*/ |
| 565 | } /* zgebal_ */ |
| 566 | |
| 567 | #ifdef __cplusplus |
| 568 | } |
| 569 | #endif |