4 subroutine grdfit (lbase,lcheck,nvar,naux,cut,time,
8 implicit double precision (a-h,o-z)
9 integer clock_start, clock_finish, clock_rate
12 dimension corner(nsize,maxcl)
13 integer numptc(maxcl), prvptr
24 call system_clock(clock_start,clock_rate)
28 iregst(lcheck+1) = iinfinity
29 jregst(lcheck+1) = iinfinity
30 iregend(lcheck+1) = -1
31 jregend(lcheck+1) = -1
38 call system_clock(clock_start1,clock_rate)
39 call
flglvl2(nvar,naux,lcheck,nptmax,index,lbase,npts,start_time)
40 call system_clock(clock_finish,clock_rate)
41 timeflglvl = timeflglvl + clock_finish - clock_start1
43 if (npts .eq. 0) go to 99
46 hxfine = hxposs(levnew)
47 hyfine = hyposs(levnew)
56 call
smartbis(alloc(index),npts,cut,numptc,nclust,lbase,
62 write(outunit,103) nclust
63 write(outunit,104) (icl, numptc(icl),icl=1,nclust)
64 103
format(
' ',i4,
' clusters after bisect')
65 104
format(
' cluster ',i5,
' has points: ',i8)
77 75 call
moment(node(1,mnew),alloc(index+2*ibase),numptc(icl),usage)
79 if (gprint)
write(outunit,100) icl,mnew,usage,numptc(icl)
80 100
format(
' cluster ',i5,
' new rect.',i5,
81 1
' usage ',e12.5,
' with ',i5,
' pts.')
83 node(ndilo,mnew) = node(ndilo,mnew)*intratx(lcheck)
84 node(ndjlo,mnew) = node(ndjlo,mnew)*intraty(lcheck)
85 node(ndihi,mnew) = (node(ndihi,mnew)+1)*intratx(lcheck) - 1
86 node(ndjhi,mnew) = (node(ndjhi,mnew)+1)*intraty(lcheck) - 1
87 rnode(cornxlo,mnew) = node(ndilo,mnew)*hxfine + xlower
88 rnode(cornylo,mnew) = node(ndjlo,mnew)*hyfine + ylower
89 rnode(cornxhi,mnew) = (node(ndihi,mnew)+1)*hxfine + xlower
90 rnode(cornyhi,mnew) = (node(ndjhi,mnew)+1)*hyfine + ylower
91 node(nestlevel,mnew) = levnew
92 rnode(timemult,mnew) = time
94 if (gprint)
write(outunit,101) (node(i,mnew),i=1,nsize),
95 & (rnode(i,mnew),i=1,rsize)
96 101
format(4i5,4i15,/,4i15,5i15,/,2i15,/,5e15.7)
103 fit2 =
nestck2(mnew,lbase,alloc(index+2*ibase),numptc(icl),numptc,
104 1 icl,nclust,nvar, naux)
105 if (.not. fit2) go to 75
108 if (newstl(levnew) .eq. null)
then
109 newstl(levnew) = mnew
111 node(levelptr,prvptr) = mnew
115 iregst(levnew) = min(iregst(levnew), node(ndilo,mnew))
116 jregst(levnew) = min(jregst(levnew), node(ndjlo,mnew))
117 iregend(levnew) = max(iregend(levnew),node(ndihi,mnew))
118 jregend(levnew) = max(jregend(levnew),node(ndjhi,mnew))
121 69 ibase = ibase + numptc(icl)
123 if (icl .le. nclust) go to 70
126 call
birect(newstl(levnew))
133 if (nptmax .gt. 0) call
reclam(index, 2*nptmax)
135 call system_clock(clock_finish,clock_rate)
136 timegrdfitall = timegrdfitall + clock_finish - clock_start
subroutine flglvl2(nvar, naux, lcheck, nxypts, index, lbase, npts, start_time)
Controls the error estimation/flagging bad pts.
subroutine reclam(index, nwords)
subroutine moment(intrect, badpts, npt, usage)
subroutine grdfit(lbase, lcheck, nvar, naux, cut, time, start_time)
logical function nestck2(mnew, lbase, badpts, npts, numptc, icl, nclust, nvar, naux)
integer function nodget()
subroutine smartbis(badpts, npts, cutoff, numptc, nclust, lbase, intcorn, idim, jdim)