fitp_intrvp Function

private function fitp_intrvp(t, x, n)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: t
real, intent(in), dimension(n) :: x
integer, intent(in) :: n

Return Value integer


Contents

Source Code


Source Code

  integer function fitp_intrvp (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, after translating the value to within
! the correct period.  it also returns this translated value.
!
! on input--
!
!   t is the given value.
!
!   x is a vector of strictly increasing values.
!
!   n is the length of x (n .ge. 2).
!
! on output--
!
!   intrvl returns an integer i such that
!
!          i = 1       if             tp .lt. x(2)  ,
!          i = n       if   x(n) .le. tp            ,
!          otherwise       x(i)  .le. tp .lt. x(i+1),
!
! none of the input parameters are altered.
!
!-----------------------------------------------------------
    fitp_intrvp = fitp_intrv_helper(t, x, n, .true.)
  end function fitp_intrvp