aboutsummaryrefslogtreecommitdiff
path: root/math/curfit/cvvectorr.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /math/curfit/cvvectorr.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'math/curfit/cvvectorr.x')
-rw-r--r--math/curfit/cvvectorr.x34
1 files changed, 34 insertions, 0 deletions
diff --git a/math/curfit/cvvectorr.x b/math/curfit/cvvectorr.x
new file mode 100644
index 00000000..b344ab84
--- /dev/null
+++ b/math/curfit/cvvectorr.x
@@ -0,0 +1,34 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <math/curfit.h>
+
+include "curfitdef.h"
+
+# CVVECTOR -- Procedure to evaluate a curve. The CV_NCOEFF(cv) coefficients
+# are assumed to be in COEFF.
+
+procedure cvvector (cv, x, yfit, npts)
+
+pointer cv # curve descriptor
+real x[npts] # data x values
+real yfit[npts] # the fitted y values
+int npts # number of data points
+
+begin
+ switch (CV_TYPE(cv)) {
+ case LEGENDRE:
+ call rcv_evleg (COEFF(CV_COEFF(cv)), x, yfit, npts, CV_ORDER(cv),
+ CV_MAXMIN(cv), CV_RANGE(cv))
+ case CHEBYSHEV:
+ call rcv_evcheb (COEFF(CV_COEFF(cv)), x, yfit, npts, CV_ORDER(cv),
+ CV_MAXMIN(cv), CV_RANGE(cv))
+ case SPLINE3:
+ call rcv_evspline3 (COEFF(CV_COEFF(cv)), x, yfit, npts,
+ CV_NPIECES(cv), -CV_XMIN(cv), CV_SPACING(cv))
+ case SPLINE1:
+ call rcv_evspline1 (COEFF(CV_COEFF(cv)), x, yfit, npts,
+ CV_NPIECES(cv), -CV_XMIN(cv), CV_SPACING(cv))
+ case USERFNC:
+ call rcv_evuser (cv, x, yfit, npts)
+ }
+end