From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- math/interp/asieva.x | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 math/interp/asieva.x (limited to 'math/interp/asieva.x') diff --git a/math/interp/asieva.x b/math/interp/asieva.x new file mode 100644 index 00000000..bc5fcbb3 --- /dev/null +++ b/math/interp/asieva.x @@ -0,0 +1,38 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# procedure to evaluate interpolator at a sequence of ordered points +# aasumes that all x_values land within [1,n]. + +procedure asieva(x, y, n, coeff) +include "interpdef.h" +include "asidef.h" + +real x[ARB] # ordered x array +int n # no. of points in x +real coeff[ARB] + +real y[ARB] # interpolated values + +begin + switch (ITYPEI) { # switch on interpolator type + + case IT_NEAREST : + call iievne(x, y, n, coeff[COFF + 1]) + + case IT_LINEAR : + call iievli(x, y, n, coeff[COFF + 1]) + + case IT_POLY3 : + call iievp3(x, y, n, coeff[COFF + 1]) + + case IT_POLY5 : + call iievp5(x, y, n, coeff[COFF + 1]) + + case IT_SPLINE3 : + call iievs3(x, y, n, coeff[COFF + 1]) + + } + + return + +end -- cgit