4 subroutine smartbis(badpts,npts,cutoff,numptc,nclust,
5 1 lbase,intcorn,idim,jdim)
11 implicit double precision (a-h,o-z)
13 dimension badpts(2,npts),intcorn(nsize,maxcl)
16 dimension iscr(idim), jscr(jdim)
17 integer nclust, numptc(maxcl)
31 if (gprint)
write(outunit,100) nclust
32 100
format(
' starting smart bisection with ',i5,
' clusters')
38 10 call
moment(intcorn(1,icl),badpts(1,ist),numptc(icl),usenew)
39 if (gprint)
write(outunit,101) icl,numptc(icl),usenew
40 101
format(
' testing cluster ',i8,
' with ',i9,
' pts. use ',e12.4)
42 if (usenew .lt. cutoff) go to 20
46 if (.not. gprint) go to 15
47 write(outunit,102) icl,numptc(icl),usenew
48 102
format(
' accepting smart bisected cluster',i4,
' with ',i5,
49 1
' pts. use = ',e10.3)
51 if (icl .gt. nclust) go to 200
53 iend = ist + numptc(icl) - 1
58 20
if (nclust .lt. maxcl) go to 25
59 write(outunit,900) maxcl
61 900
format(
' too many clusters: > ',i5)
67 call
signs(badpts,npts,iscr,jscr,idim,jdim,
68 & ist,iend,ilo,ihi,jlo,jhi)
69 call
findcut(icl,iscr,jscr,idim,jdim,index,iside,
71 if (index .eq. 0)
then
92 if (icl .gt. nclust) go to 200
94 iend = ist + numptc(icl) - 1
98 if (iside .eq. vertical)
then
110 50
if (badpts(idir,i) .lt. fmid) go to 60
115 if (itop+1 .ge. ibot) go to 80
123 temp = badpts(1,ibot)
124 badpts(1,ibot) = badpts(1,i)
126 temp = badpts(2,ibot)
127 badpts(2,ibot) = badpts(2,i)
129 if (itop+1 .lt. ibot) go to 50
133 80 numptc(icl) = itop - ist + 1
138 if (ibump .gt. nclust) go to 120
139 do 90 ico = ibump, nclust
140 nmove = nclust - ico + ibump
141 90 numptc(nmove + 1) = numptc(nmove)
143 120 numptc(ibump) = iend - ibot + 1
subroutine signs(badpts, npts, iscr, jscr, idim, jdim, ist, iend, ilo, ihi, jlo, jhi)
subroutine moment(intrect, badpts, npt, usage)
subroutine smartbis(badpts, npts, cutoff, numptc, nclust, lbase, intcorn, idim, jdim)
subroutine findcut(icl, iscr, jscr, idim, jdim, index, iside, ilo, ihi, jlo, jhi)