00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
00017
00018 static doublecomplex c_b1 = {0.,0.};
00019 static integer c__1 = 1;
00020 static integer c__2 = 2;
00021 static doublereal c_b28 = 0.;
00022
00023 int zlarrv_(integer *n, doublereal *vl, doublereal *vu,
00024 doublereal *d__, doublereal *l, doublereal *pivmin, integer *isplit,
00025 integer *m, integer *dol, integer *dou, doublereal *minrgp,
00026 doublereal *rtol1, doublereal *rtol2, doublereal *w, doublereal *werr,
00027 doublereal *wgap, integer *iblock, integer *indexw, doublereal *gers,
00028 doublecomplex *z__, integer *ldz, integer *isuppz, doublereal *work,
00029 integer *iwork, integer *info)
00030 {
00031
00032 integer z_dim1, z_offset, i__1, i__2, i__3, i__4, i__5, i__6;
00033 doublereal d__1, d__2;
00034 doublecomplex z__1;
00035 logical L__1;
00036
00037
00038 double log(doublereal);
00039
00040
00041 integer minwsize, i__, j, k, p, q, miniwsize, ii;
00042 doublereal gl;
00043 integer im, in;
00044 doublereal gu, gap, eps, tau, tol, tmp;
00045 integer zto;
00046 doublereal ztz;
00047 integer iend, jblk;
00048 doublereal lgap;
00049 integer done;
00050 doublereal rgap, left;
00051 integer wend, iter;
00052 doublereal bstw;
00053 integer itmp1, indld;
00054 doublereal fudge;
00055 integer idone;
00056 doublereal sigma;
00057 integer iinfo, iindr;
00058 doublereal resid;
00059 logical eskip;
00060 doublereal right;
00061 extern int dcopy_(integer *, doublereal *, integer *,
00062 doublereal *, integer *);
00063 integer nclus, zfrom;
00064 doublereal rqtol;
00065 integer iindc1, iindc2, indin1, indin2;
00066 logical stp2ii;
00067 extern int zlar1v_(integer *, integer *, integer *,
00068 doublereal *, doublereal *, doublereal *, doublereal *,
00069 doublereal *, doublereal *, doublereal *, doublecomplex *,
00070 logical *, integer *, doublereal *, doublereal *, integer *,
00071 integer *, doublereal *, doublereal *, doublereal *, doublereal *)
00072 ;
00073 doublereal lambda;
00074 extern doublereal dlamch_(char *);
00075 integer ibegin, indeig;
00076 logical needbs;
00077 integer indlld;
00078 doublereal sgndef, mingma;
00079 extern int dlarrb_(integer *, doublereal *, doublereal *,
00080 integer *, integer *, doublereal *, doublereal *, integer *,
00081 doublereal *, doublereal *, doublereal *, doublereal *, integer *,
00082 doublereal *, doublereal *, integer *, integer *);
00083 integer oldien, oldncl, wbegin;
00084 doublereal spdiam;
00085 integer negcnt;
00086 extern int dlarrf_(integer *, doublereal *, doublereal *,
00087 doublereal *, integer *, integer *, doublereal *, doublereal *,
00088 doublereal *, doublereal *, doublereal *, doublereal *,
00089 doublereal *, doublereal *, doublereal *, doublereal *,
00090 doublereal *, integer *);
00091 integer oldcls;
00092 doublereal savgap;
00093 integer ndepth;
00094 doublereal ssigma;
00095 extern int zdscal_(integer *, doublereal *,
00096 doublecomplex *, integer *);
00097 logical usedbs;
00098 integer iindwk, offset;
00099 doublereal gaptol;
00100 integer newcls, oldfst, indwrk, windex, oldlst;
00101 logical usedrq;
00102 integer newfst, newftt, parity, windmn, windpl, isupmn, newlst, zusedl;
00103 doublereal bstres;
00104 integer newsiz, zusedu, zusedw;
00105 doublereal nrminv;
00106 logical tryrqc;
00107 integer isupmx;
00108 doublereal rqcorr;
00109 extern int zlaset_(char *, integer *, integer *,
00110 doublecomplex *, doublecomplex *, doublecomplex *, integer *);
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285 --d__;
00286 --l;
00287 --isplit;
00288 --w;
00289 --werr;
00290 --wgap;
00291 --iblock;
00292 --indexw;
00293 --gers;
00294 z_dim1 = *ldz;
00295 z_offset = 1 + z_dim1;
00296 z__ -= z_offset;
00297 --isuppz;
00298 --work;
00299 --iwork;
00300
00301
00302 indld = *n + 1;
00303 indlld = (*n << 1) + 1;
00304 indin1 = *n * 3 + 1;
00305 indin2 = (*n << 2) + 1;
00306 indwrk = *n * 5 + 1;
00307 minwsize = *n * 12;
00308 i__1 = minwsize;
00309 for (i__ = 1; i__ <= i__1; ++i__) {
00310 work[i__] = 0.;
00311
00312 }
00313
00314
00315 iindr = 0;
00316
00317
00318 iindc1 = *n;
00319 iindc2 = *n << 1;
00320 iindwk = *n * 3 + 1;
00321 miniwsize = *n * 7;
00322 i__1 = miniwsize;
00323 for (i__ = 1; i__ <= i__1; ++i__) {
00324 iwork[i__] = 0;
00325
00326 }
00327 zusedl = 1;
00328 if (*dol > 1) {
00329
00330 zusedl = *dol - 1;
00331 }
00332 zusedu = *m;
00333 if (*dou < *m) {
00334
00335 zusedu = *dou + 1;
00336 }
00337
00338 zusedw = zusedu - zusedl + 1;
00339 zlaset_("Full", n, &zusedw, &c_b1, &c_b1, &z__[zusedl * z_dim1 + 1], ldz);
00340 eps = dlamch_("Precision");
00341 rqtol = eps * 2.;
00342
00343
00344 tryrqc = TRUE_;
00345 if (*dol == 1 && *dou == *m) {
00346 } else {
00347
00348
00349
00350 *rtol1 = eps * 4.;
00351 *rtol2 = eps * 4.;
00352 }
00353
00354
00355
00356
00357
00358
00359 done = 0;
00360 ibegin = 1;
00361 wbegin = 1;
00362 i__1 = iblock[*m];
00363 for (jblk = 1; jblk <= i__1; ++jblk) {
00364 iend = isplit[jblk];
00365 sigma = l[iend];
00366
00367
00368 wend = wbegin - 1;
00369 L15:
00370 if (wend < *m) {
00371 if (iblock[wend + 1] == jblk) {
00372 ++wend;
00373 goto L15;
00374 }
00375 }
00376 if (wend < wbegin) {
00377 ibegin = iend + 1;
00378 goto L170;
00379 } else if (wend < *dol || wbegin > *dou) {
00380 ibegin = iend + 1;
00381 wbegin = wend + 1;
00382 goto L170;
00383 }
00384
00385 gl = gers[(ibegin << 1) - 1];
00386 gu = gers[ibegin * 2];
00387 i__2 = iend;
00388 for (i__ = ibegin + 1; i__ <= i__2; ++i__) {
00389
00390 d__1 = gers[(i__ << 1) - 1];
00391 gl = min(d__1,gl);
00392
00393 d__1 = gers[i__ * 2];
00394 gu = max(d__1,gu);
00395
00396 }
00397 spdiam = gu - gl;
00398
00399 oldien = ibegin - 1;
00400
00401 in = iend - ibegin + 1;
00402
00403 im = wend - wbegin + 1;
00404
00405 if (ibegin == iend) {
00406 ++done;
00407 i__2 = ibegin + wbegin * z_dim1;
00408 z__[i__2].r = 1., z__[i__2].i = 0.;
00409 isuppz[(wbegin << 1) - 1] = ibegin;
00410 isuppz[wbegin * 2] = ibegin;
00411 w[wbegin] += sigma;
00412 work[wbegin] = w[wbegin];
00413 ibegin = iend + 1;
00414 ++wbegin;
00415 goto L170;
00416 }
00417
00418
00419
00420
00421
00422
00423 dcopy_(&im, &w[wbegin], &c__1, &work[wbegin], &c__1);
00424
00425
00426 i__2 = im;
00427 for (i__ = 1; i__ <= i__2; ++i__) {
00428 w[wbegin + i__ - 1] += sigma;
00429
00430 }
00431
00432 ndepth = 0;
00433
00434 parity = 1;
00435
00436
00437 nclus = 1;
00438 iwork[iindc1 + 1] = 1;
00439 iwork[iindc1 + 2] = im;
00440
00441
00442 idone = 0;
00443
00444
00445
00446 L40:
00447 if (idone < im) {
00448
00449 if (ndepth > *m) {
00450 *info = -2;
00451 return 0;
00452 }
00453
00454
00455 oldncl = nclus;
00456
00457 nclus = 0;
00458
00459 parity = 1 - parity;
00460 if (parity == 0) {
00461 oldcls = iindc1;
00462 newcls = iindc2;
00463 } else {
00464 oldcls = iindc2;
00465 newcls = iindc1;
00466 }
00467
00468 i__2 = oldncl;
00469 for (i__ = 1; i__ <= i__2; ++i__) {
00470 j = oldcls + (i__ << 1);
00471
00472
00473
00474 oldfst = iwork[j - 1];
00475 oldlst = iwork[j];
00476 if (ndepth > 0) {
00477
00478
00479
00480
00481 if (*dol == 1 && *dou == *m) {
00482
00483
00484 j = wbegin + oldfst - 1;
00485 } else {
00486 if (wbegin + oldfst - 1 < *dol) {
00487
00488 j = *dol - 1;
00489 } else if (wbegin + oldfst - 1 > *dou) {
00490
00491 j = *dou;
00492 } else {
00493 j = wbegin + oldfst - 1;
00494 }
00495 }
00496 i__3 = in - 1;
00497 for (k = 1; k <= i__3; ++k) {
00498 i__4 = ibegin + k - 1 + j * z_dim1;
00499 d__[ibegin + k - 1] = z__[i__4].r;
00500 i__4 = ibegin + k - 1 + (j + 1) * z_dim1;
00501 l[ibegin + k - 1] = z__[i__4].r;
00502
00503 }
00504 i__3 = iend + j * z_dim1;
00505 d__[iend] = z__[i__3].r;
00506 i__3 = iend + (j + 1) * z_dim1;
00507 sigma = z__[i__3].r;
00508
00509 zlaset_("Full", &in, &c__2, &c_b1, &c_b1, &z__[ibegin + j
00510 * z_dim1], ldz);
00511 }
00512
00513 i__3 = iend - 1;
00514 for (j = ibegin; j <= i__3; ++j) {
00515 tmp = d__[j] * l[j];
00516 work[indld - 1 + j] = tmp;
00517 work[indlld - 1 + j] = tmp * l[j];
00518
00519 }
00520 if (ndepth > 0) {
00521
00522
00523 p = indexw[wbegin - 1 + oldfst];
00524 q = indexw[wbegin - 1 + oldlst];
00525
00526
00527
00528 offset = indexw[wbegin] - 1;
00529
00530
00531 dlarrb_(&in, &d__[ibegin], &work[indlld + ibegin - 1], &p,
00532 &q, rtol1, rtol2, &offset, &work[wbegin], &wgap[
00533 wbegin], &werr[wbegin], &work[indwrk], &iwork[
00534 iindwk], pivmin, &spdiam, &in, &iinfo);
00535 if (iinfo != 0) {
00536 *info = -1;
00537 return 0;
00538 }
00539
00540
00541
00542
00543
00544
00545
00546 if (oldfst > 1) {
00547
00548 d__1 = wgap[wbegin + oldfst - 2], d__2 = w[wbegin +
00549 oldfst - 1] - werr[wbegin + oldfst - 1] - w[
00550 wbegin + oldfst - 2] - werr[wbegin + oldfst -
00551 2];
00552 wgap[wbegin + oldfst - 2] = max(d__1,d__2);
00553 }
00554 if (wbegin + oldlst - 1 < wend) {
00555
00556 d__1 = wgap[wbegin + oldlst - 1], d__2 = w[wbegin +
00557 oldlst] - werr[wbegin + oldlst] - w[wbegin +
00558 oldlst - 1] - werr[wbegin + oldlst - 1];
00559 wgap[wbegin + oldlst - 1] = max(d__1,d__2);
00560 }
00561
00562
00563 i__3 = oldlst;
00564 for (j = oldfst; j <= i__3; ++j) {
00565 w[wbegin + j - 1] = work[wbegin + j - 1] + sigma;
00566
00567 }
00568 }
00569
00570 newfst = oldfst;
00571 i__3 = oldlst;
00572 for (j = oldfst; j <= i__3; ++j) {
00573 if (j == oldlst) {
00574
00575
00576 newlst = j;
00577 } else if (wgap[wbegin + j - 1] >= *minrgp * (d__1 = work[
00578 wbegin + j - 1], abs(d__1))) {
00579
00580
00581 newlst = j;
00582 } else {
00583
00584
00585 goto L140;
00586 }
00587
00588 newsiz = newlst - newfst + 1;
00589
00590
00591 if (*dol == 1 && *dou == *m) {
00592
00593
00594 newftt = wbegin + newfst - 1;
00595 } else {
00596 if (wbegin + newfst - 1 < *dol) {
00597
00598 newftt = *dol - 1;
00599 } else if (wbegin + newfst - 1 > *dou) {
00600
00601 newftt = *dou;
00602 } else {
00603 newftt = wbegin + newfst - 1;
00604 }
00605 }
00606 if (newsiz > 1) {
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621 if (newfst == 1) {
00622
00623 d__1 = 0., d__2 = w[wbegin] - werr[wbegin] - *vl;
00624 lgap = max(d__1,d__2);
00625 } else {
00626 lgap = wgap[wbegin + newfst - 2];
00627 }
00628 rgap = wgap[wbegin + newlst - 1];
00629
00630
00631
00632
00633
00634
00635 for (k = 1; k <= 2; ++k) {
00636 if (k == 1) {
00637 p = indexw[wbegin - 1 + newfst];
00638 } else {
00639 p = indexw[wbegin - 1 + newlst];
00640 }
00641 offset = indexw[wbegin] - 1;
00642 dlarrb_(&in, &d__[ibegin], &work[indlld + ibegin
00643 - 1], &p, &p, &rqtol, &rqtol, &offset, &
00644 work[wbegin], &wgap[wbegin], &werr[wbegin]
00645 , &work[indwrk], &iwork[iindwk], pivmin, &
00646 spdiam, &in, &iinfo);
00647
00648 }
00649
00650 if (wbegin + newlst - 1 < *dol || wbegin + newfst - 1
00651 > *dou) {
00652
00653
00654
00655
00656
00657
00658
00659 idone = idone + newlst - newfst + 1;
00660 goto L139;
00661 }
00662
00663
00664
00665
00666
00667 dlarrf_(&in, &d__[ibegin], &l[ibegin], &work[indld +
00668 ibegin - 1], &newfst, &newlst, &work[wbegin],
00669 &wgap[wbegin], &werr[wbegin], &spdiam, &lgap,
00670 &rgap, pivmin, &tau, &work[indin1], &work[
00671 indin2], &work[indwrk], &iinfo);
00672
00673
00674
00675 i__4 = in - 1;
00676 for (k = 1; k <= i__4; ++k) {
00677 i__5 = ibegin + k - 1 + newftt * z_dim1;
00678 i__6 = indin1 + k - 1;
00679 z__1.r = work[i__6], z__1.i = 0.;
00680 z__[i__5].r = z__1.r, z__[i__5].i = z__1.i;
00681 i__5 = ibegin + k - 1 + (newftt + 1) * z_dim1;
00682 i__6 = indin2 + k - 1;
00683 z__1.r = work[i__6], z__1.i = 0.;
00684 z__[i__5].r = z__1.r, z__[i__5].i = z__1.i;
00685
00686 }
00687 i__4 = iend + newftt * z_dim1;
00688 i__5 = indin1 + in - 1;
00689 z__1.r = work[i__5], z__1.i = 0.;
00690 z__[i__4].r = z__1.r, z__[i__4].i = z__1.i;
00691 if (iinfo == 0) {
00692
00693
00694 ssigma = sigma + tau;
00695 i__4 = iend + (newftt + 1) * z_dim1;
00696 z__1.r = ssigma, z__1.i = 0.;
00697 z__[i__4].r = z__1.r, z__[i__4].i = z__1.i;
00698
00699
00700 i__4 = newlst;
00701 for (k = newfst; k <= i__4; ++k) {
00702 fudge = eps * 3. * (d__1 = work[wbegin + k -
00703 1], abs(d__1));
00704 work[wbegin + k - 1] -= tau;
00705 fudge += eps * 4. * (d__1 = work[wbegin + k -
00706 1], abs(d__1));
00707
00708 werr[wbegin + k - 1] += fudge;
00709
00710
00711
00712
00713
00714
00715
00716
00717 }
00718 ++nclus;
00719 k = newcls + (nclus << 1);
00720 iwork[k - 1] = newfst;
00721 iwork[k] = newlst;
00722 } else {
00723 *info = -2;
00724 return 0;
00725 }
00726 } else {
00727
00728
00729
00730 iter = 0;
00731
00732 tol = log((doublereal) in) * 4. * eps;
00733
00734 k = newfst;
00735 windex = wbegin + k - 1;
00736
00737 i__4 = windex - 1;
00738 windmn = max(i__4,1);
00739
00740 i__4 = windex + 1;
00741 windpl = min(i__4,*m);
00742 lambda = work[windex];
00743 ++done;
00744
00745 if (windex < *dol || windex > *dou) {
00746 eskip = TRUE_;
00747 goto L125;
00748 } else {
00749 eskip = FALSE_;
00750 }
00751 left = work[windex] - werr[windex];
00752 right = work[windex] + werr[windex];
00753 indeig = indexw[windex];
00754
00755
00756
00757
00758
00759
00760 if (k == 1) {
00761
00762
00763
00764
00765
00766
00767
00768 d__1 = abs(left), d__2 = abs(right);
00769 lgap = eps * max(d__1,d__2);
00770 } else {
00771 lgap = wgap[windmn];
00772 }
00773 if (k == im) {
00774
00775
00776
00777
00778
00779
00780 d__1 = abs(left), d__2 = abs(right);
00781 rgap = eps * max(d__1,d__2);
00782 } else {
00783 rgap = wgap[windex];
00784 }
00785 gap = min(lgap,rgap);
00786 if (k == 1 || k == im) {
00787
00788
00789
00790 gaptol = 0.;
00791 } else {
00792 gaptol = gap * eps;
00793 }
00794 isupmn = in;
00795 isupmx = 1;
00796
00797
00798
00799
00800
00801 savgap = wgap[windex];
00802 wgap[windex] = gap;
00803
00804
00805
00806
00807
00808
00809 usedbs = FALSE_;
00810 usedrq = FALSE_;
00811
00812 needbs = ! tryrqc;
00813 L120:
00814
00815 if (needbs) {
00816
00817 usedbs = TRUE_;
00818 itmp1 = iwork[iindr + windex];
00819 offset = indexw[wbegin] - 1;
00820 d__1 = eps * 2.;
00821 dlarrb_(&in, &d__[ibegin], &work[indlld + ibegin
00822 - 1], &indeig, &indeig, &c_b28, &d__1, &
00823 offset, &work[wbegin], &wgap[wbegin], &
00824 werr[wbegin], &work[indwrk], &iwork[
00825 iindwk], pivmin, &spdiam, &itmp1, &iinfo);
00826 if (iinfo != 0) {
00827 *info = -3;
00828 return 0;
00829 }
00830 lambda = work[windex];
00831
00832
00833 iwork[iindr + windex] = 0;
00834 }
00835
00836 L__1 = ! usedbs;
00837 zlar1v_(&in, &c__1, &in, &lambda, &d__[ibegin], &l[
00838 ibegin], &work[indld + ibegin - 1], &work[
00839 indlld + ibegin - 1], pivmin, &gaptol, &z__[
00840 ibegin + windex * z_dim1], &L__1, &negcnt, &
00841 ztz, &mingma, &iwork[iindr + windex], &isuppz[
00842 (windex << 1) - 1], &nrminv, &resid, &rqcorr,
00843 &work[indwrk]);
00844 if (iter == 0) {
00845 bstres = resid;
00846 bstw = lambda;
00847 } else if (resid < bstres) {
00848 bstres = resid;
00849 bstw = lambda;
00850 }
00851
00852 i__4 = isupmn, i__5 = isuppz[(windex << 1) - 1];
00853 isupmn = min(i__4,i__5);
00854
00855 i__4 = isupmx, i__5 = isuppz[windex * 2];
00856 isupmx = max(i__4,i__5);
00857 ++iter;
00858
00859
00860
00861
00862
00863
00864
00865
00866 if (resid > tol * gap && abs(rqcorr) > rqtol * abs(
00867 lambda) && ! usedbs) {
00868
00869
00870
00871 if (indeig <= negcnt) {
00872
00873 sgndef = -1.;
00874 } else {
00875
00876 sgndef = 1.;
00877 }
00878
00879
00880 if (rqcorr * sgndef >= 0. && lambda + rqcorr <=
00881 right && lambda + rqcorr >= left) {
00882 usedrq = TRUE_;
00883
00884 if (sgndef == 1.) {
00885
00886
00887 left = lambda;
00888
00889
00890
00891
00892
00893
00894 } else {
00895
00896
00897 right = lambda;
00898
00899
00900
00901 }
00902 work[windex] = (right + left) * .5;
00903
00904
00905 lambda += rqcorr;
00906
00907 werr[windex] = (right - left) * .5;
00908 } else {
00909 needbs = TRUE_;
00910 }
00911 if (right - left < rqtol * abs(lambda)) {
00912
00913
00914 usedbs = TRUE_;
00915 goto L120;
00916 } else if (iter < 10) {
00917 goto L120;
00918 } else if (iter == 10) {
00919 needbs = TRUE_;
00920 goto L120;
00921 } else {
00922 *info = 5;
00923 return 0;
00924 }
00925 } else {
00926 stp2ii = FALSE_;
00927 if (usedrq && usedbs && bstres <= resid) {
00928 lambda = bstw;
00929 stp2ii = TRUE_;
00930 }
00931 if (stp2ii) {
00932
00933 L__1 = ! usedbs;
00934 zlar1v_(&in, &c__1, &in, &lambda, &d__[ibegin]
00935 , &l[ibegin], &work[indld + ibegin -
00936 1], &work[indlld + ibegin - 1],
00937 pivmin, &gaptol, &z__[ibegin + windex
00938 * z_dim1], &L__1, &negcnt, &ztz, &
00939 mingma, &iwork[iindr + windex], &
00940 isuppz[(windex << 1) - 1], &nrminv, &
00941 resid, &rqcorr, &work[indwrk]);
00942 }
00943 work[windex] = lambda;
00944 }
00945
00946
00947
00948 isuppz[(windex << 1) - 1] += oldien;
00949 isuppz[windex * 2] += oldien;
00950 zfrom = isuppz[(windex << 1) - 1];
00951 zto = isuppz[windex * 2];
00952 isupmn += oldien;
00953 isupmx += oldien;
00954
00955 if (isupmn < zfrom) {
00956 i__4 = zfrom - 1;
00957 for (ii = isupmn; ii <= i__4; ++ii) {
00958 i__5 = ii + windex * z_dim1;
00959 z__[i__5].r = 0., z__[i__5].i = 0.;
00960
00961 }
00962 }
00963 if (isupmx > zto) {
00964 i__4 = isupmx;
00965 for (ii = zto + 1; ii <= i__4; ++ii) {
00966 i__5 = ii + windex * z_dim1;
00967 z__[i__5].r = 0., z__[i__5].i = 0.;
00968
00969 }
00970 }
00971 i__4 = zto - zfrom + 1;
00972 zdscal_(&i__4, &nrminv, &z__[zfrom + windex * z_dim1],
00973 &c__1);
00974 L125:
00975
00976 w[windex] = lambda + sigma;
00977
00978
00979
00980
00981
00982
00983 if (! eskip) {
00984 if (k > 1) {
00985
00986 d__1 = wgap[windmn], d__2 = w[windex] - werr[
00987 windex] - w[windmn] - werr[windmn];
00988 wgap[windmn] = max(d__1,d__2);
00989 }
00990 if (windex < wend) {
00991
00992 d__1 = savgap, d__2 = w[windpl] - werr[windpl]
00993 - w[windex] - werr[windex];
00994 wgap[windex] = max(d__1,d__2);
00995 }
00996 }
00997 ++idone;
00998 }
00999
01000
01001 L139:
01002
01003 newfst = j + 1;
01004 L140:
01005 ;
01006 }
01007
01008 }
01009 ++ndepth;
01010 goto L40;
01011 }
01012 ibegin = iend + 1;
01013 wbegin = wend + 1;
01014 L170:
01015 ;
01016 }
01017
01018 return 0;
01019
01020
01021
01022 }