aboutsummaryrefslogtreecommitdiff
path: root/math/curfit/cvvectord.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /math/curfit/cvvectord.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/curfit/cvvectord.x')
-rw-r--r--math/curfit/cvvectord.x34
1 files changed, 34 insertions, 0 deletions
diff --git a/math/curfit/cvvectord.x b/math/curfit/cvvectord.x
new file mode 100644
index 00000000..f23e988e
--- /dev/null
+++ b/math/curfit/cvvectord.x
@@ -0,0 +1,34 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <math/curfit.h>
+
+include "dcurfitdef.h"
+
+# CVVECTOR -- Procedure to evaluate a curve. The CV_NCOEFF(cv) coefficients
+# are assumed to be in COEFF.
+
+procedure dcvvector (cv, x, yfit, npts)
+
+pointer cv # curve descriptor
+double x[npts] # data x values
+double yfit[npts] # the fitted y values
+int npts # number of data points
+
+begin
+ switch (CV_TYPE(cv)) {
+ case LEGENDRE:
+ call dcv_evleg (COEFF(CV_COEFF(cv)), x, yfit, npts, CV_ORDER(cv),
+ CV_MAXMIN(cv), CV_RANGE(cv))
+ case CHEBYSHEV:
+ call dcv_evcheb (COEFF(CV_COEFF(cv)), x, yfit, npts, CV_ORDER(cv),
+ CV_MAXMIN(cv), CV_RANGE(cv))
+ case SPLINE3:
+ call dcv_evspline3 (COEFF(CV_COEFF(cv)), x, yfit, npts,
+ CV_NPIECES(cv), -CV_XMIN(cv), CV_SPACING(cv))
+ case SPLINE1:
+ call dcv_evspline1 (COEFF(CV_COEFF(cv)), x, yfit, npts,
+ CV_NPIECES(cv), -CV_XMIN(cv), CV_SPACING(cv))
+ case USERFNC:
+ call dcv_evuser (cv, x, yfit, npts)
+ }
+end