4 subroutine findcut(icl,iscr,jscr,idim,jdim,index,iside,
14 implicit double precision (a-h,o-z)
17 dimension iscr(idim), jscr(jdim)
31 if (iscr(i) .eq. 0)
then
39 if (jscr(j) .eq. 0)
then
52 do 50 i = ilo+1, ihi-1
54 iscr(i) = iscr(i+1)-2*icur+ipre
60 imid = (ilo + ihi) / 2
61 do 60 i = ilo+minoff, ihi-minoff+1
64 locdif = iabs(itemp1-itemp2)
65 if (itemp1*itemp2.lt.0)
then
66 if (locdif .gt. locmaxi)
then
69 else if (locdif .eq. locmaxi)
then
70 if (iabs(i-imid).lt.iabs(indexi-imid)) indexi = i
77 do 130 j = jlo+1, jhi-1
79 jscr(j) = jscr(j+1)-2*jcur+jpre
85 jmid = (jlo + jhi) / 2
86 do 160 j = jlo+minoff, jhi-minoff+1
89 locdif = iabs(jtemp1-jtemp2)
90 if (jtemp1*jtemp2.lt.0)
then
91 if (locdif .gt. locmaxj)
then
94 else if (locdif .eq. locmaxj)
then
95 if (iabs(j-jmid).lt.iabs(indexj-jmid)) indexj = j
102 220
if (locmaxi .gt. locmaxj)
then
106 else if (locmaxi .lt. locmaxj)
then
110 else if (iabs(indexi-imid).lt.iabs(indexj-jmid))
then
122 if (locmax .lt. ithres) index = 0
subroutine findcut(icl, iscr, jscr, idim, jdim, index, iside, ilo, ihi, jlo, jhi)