|
n=30
do i=1,n
ielem(i)=i
enddo
loct(inp)=1
call bisec(x,ielem(loct(inp)),numt(inp),ysep,nsepy, 2)
subroutine bisec(x,ielem,n,xsep,nsep,ic)
implicit real*8(a-h,o-z)
dimension x(2,*),ielem(*)
nsep = 1
if(n.le.0) return
do ifr=1,n
if(x(ic,ielem(ifr)).le.xsep) then
if(ifr.ne.nsep) then
istore = ielem(nsep)
ielem(nsep) = ielem(ifr)
ielem(ifr) = istore
endif
nsep = nsep + 1
endif
enddo
return
end
c-------------------------------------------------------------------------------
|
|