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