Revision a968cb727c3b72a67d1ddc6588c5edf9c0e3723a authored by Doug Nychka on 21 April 2013, 07:56:06 UTC, committed by cran-robot on 21 April 2013, 07:56:06 UTC
1 parent 759a1e4
ifind.f
INTEGER FUNCTION IFIND(X,XK,N)
C FIND I SUCH THAT XK(I) LE X LT XK(I+1)
C IFIND=0 IF X LT XK(1)
C IFIND=N IF X GT XK(N)
C J F MONAHAN JAN 1982 DEPT OF STAT, N C S U, RALEIGH, NC 27650
REAL*8 X,XK(N)
IFIND=0
IF(X.LT.XK(1)) RETURN
IFIND=N
IF(X.GE.XK(N)) RETURN
IL=1
IU=N
1 IF(IU-IL.LE.1) GO TO 4
I=(IU+IL)/2
C IF(X-XK(I)) 2,5,3
IF( (X-XK(I)).eq.0) go to 5
IF( (X-XK(I)).gt.0) go to 3
2 IU=I
GO TO 1
3 IL=I
GO TO 1
4 IFIND=IL
RETURN
5 IFIND=I
RETURN
END
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...