Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/7.0.0/doc/ssclib/node102.html
Дата изменения: Wed Jun 28 23:12:27 2006 Дата индексирования: Sat Dec 22 09:33:01 2007 Кодировка: |
This is a function to perform numerical integration of y(x) (using the trapezoid rule) over a set of discrete ranges specified via the xRanges argument.
NOTE! (i) The values in the vector x() should be in increasing order. (ii) The ranges may occur in any order, but are otherwise assumed to be well-formed. (iii) If any upper range bound is undefined, the upper x value is used instead for that range bound; likewise for undefined lower bounds.
!*** should change it so that the ranges are required to be well-formed. This would make the routine less general but makes the accepted properties of ranges simpler.
interface integrateRanges function integrateRangesScalar(x, y, xRange) result(approxIntegral) real(single), intent(in) :: x(:), y(size(x)) type(RangeT), intent(in) :: xRange real(single) :: approxIntegral end function integrateRangesScalar function integrateRangesVector(x, y, xRanges) result(approxIntegral) real(single), intent(in) :: x(:), y(size(x)) type(RangeT), intent(in) :: xRanges(:) real(single) :: approxIntegral end function integrateRangesVector end interface