Subroutine */
| 264 | } /* zgebak_ */ |
| 265 | |
| 266 | /* Subroutine */ int zgebal_(char *job, integer *n, doublecomplex *a, integer |
| 267 | *lda, integer *ilo, integer *ihi, doublereal *scale, integer *info) |
| 268 | { |
| 269 | /* System generated locals */ |
| 270 | integer a_dim1, a_offset, i__1, i__2, i__3; |
| 271 | doublereal d__1, d__2; |
| 272 | |
| 273 | /* Local variables */ |
| 274 | static doublereal c__, f, g; |
| 275 | static integer i__, j, k, l, m; |
| 276 | static doublereal r__, s, ca, ra; |
| 277 | static integer ica, ira, iexc; |
| 278 | extern logical lsame_(char *, char *); |
| 279 | extern /* Subroutine */ int zswap_(integer *, doublecomplex *, integer *, |
| 280 | doublecomplex *, integer *); |
| 281 | static doublereal sfmin1, sfmin2, sfmax1, sfmax2; |
| 282 | |
| 283 | extern logical disnan_(doublereal *); |
| 284 | extern /* Subroutine */ int xerbla_(char *, integer *), zdscal_( |
| 285 | integer *, doublereal *, doublecomplex *, integer *); |
| 286 | extern integer izamax_(integer *, doublecomplex *, integer *); |
| 287 | static logical noconv; |
| 288 | |
| 289 | |
| 290 | /* |
| 291 | -- LAPACK routine (version 3.2.2) -- |
| 292 | -- LAPACK is a software package provided by Univ. of Tennessee, -- |
| 293 | -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
| 294 | June 2010 |
| 295 | |
| 296 | |
| 297 | Purpose |
| 298 | ======= |
| 299 | |
| 300 | ZGEBAL balances a general complex matrix A. This involves, first, |
| 301 | permuting A by a similarity transformation to isolate eigenvalues |
| 302 | in the first 1 to ILO-1 and last IHI+1 to N elements on the |
| 303 | diagonal; and second, applying a diagonal similarity transformation |
| 304 | to rows and columns ILO to IHI to make the rows and columns as |
| 305 | close in norm as possible. Both steps are optional. |
| 306 | |
| 307 | Balancing may reduce the 1-norm of the matrix, and improve the |
| 308 | accuracy of the computed eigenvalues and/or eigenvectors. |
| 309 | |
| 310 | Arguments |
| 311 | ========= |
| 312 | |
| 313 | JOB (input) CHARACTER*1 |
| 314 | Specifies the operations to be performed on A: |
| 315 | = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0 |
| 316 | for i = 1,...,N; |
| 317 | = 'P': permute only; |
| 318 | = 'S': scale only; |
| 319 | = 'B': both permute and scale. |
| 320 | |
| 321 | N (input) INTEGER |
| 322 | The order of the matrix A. N >= 0. |
| 323 |