1 SUBROUTINE indexx(n,arr,indx)
2 implicit real*8 (a-h,o-z)
3 INTEGER n,indx(n),M,NSTACK
5 c PARAMETER (M=7,NSTACK=50)
6 PARAMETER (M=7,NSTACK=500)
7 INTEGER i,indxt,ir,itemp,j,jstack,k,l,istack(NSTACK)
20 if(arr(indx(i)).le.a)goto 2
35 if(arr(indx(l+1)).gt.arr(indx(ir)))then
40 if(arr(indx(l)).gt.arr(indx(ir)))then
45 if(arr(indx(l+1)).gt.arr(indx(l)))then
56 if(arr(indx(i)).lt.a)goto 3
59 if(arr(indx(j)).gt.a)goto 4
68 if(jstack.gt.NSTACK)pause 'NSTACK too small in indexx'
81 C (C) Copr. 1986-92 Numerical Recipes Software *11915aZ%.