FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | t | |||
real, | intent(in), | dimension(n) | :: | x | ||
integer, | intent(in) | :: | n |
integer function fitp_intrvl (t,x,n)
implicit none
integer, intent(in) :: n
real, intent(in) :: t
real, dimension(n), intent(in) :: x
!
! coded by alan kaylor cline
! from fitpack -- january 26, 1987
! a curve and surface fitting package
! a product of pleasant valley software
! 8603 altus cove, austin, texas 78759, usa
!
! this function determines the index of the interval
! (determined by a given increasing sequence) in which
! a given value lies.
!
! on input--
!
! t is the given value.
!
! x is a vector of strictly increasing values.
!
! and
!
! n is the length of x (n .ge. 2).
!
! on output--
!
! intrvl returns an integer i such that
!
! i = 1 if e t .lt. x(2) ,
! i = n-1 if x(n-1) .le. t ,
! otherwise x(i) .le. t .le. x(i+1),
!
! none of the input parameters are altered.
!
!-----------------------------------------------------------
fitp_intrvl = fitp_intrv_helper(t, x, n, .false.)
end function fitp_intrvl