aboutsummaryrefslogtreecommitdiff
path: root/math/curfit/cvstat.gx
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/cvstat.gx
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/curfit/cvstat.gx')
-rw-r--r--math/curfit/cvstat.gx61
1 files changed, 61 insertions, 0 deletions
diff --git a/math/curfit/cvstat.gx b/math/curfit/cvstat.gx
new file mode 100644
index 00000000..e98367b9
--- /dev/null
+++ b/math/curfit/cvstat.gx
@@ -0,0 +1,61 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <math/curfit.h>
+
+$if (datatype == r)
+include "curfitdef.h"
+$else
+include "dcurfitdef.h"
+$endif
+
+# CVSTATI -- Return integer paramters from the curfit package
+
+$if (datatype == r)
+int procedure cvstati (cv, param)
+$else
+int procedure dcvstati (cv, param)
+$endif
+
+pointer cv # Curfit pointer
+int param # Parameter
+
+begin
+ switch (param) {
+ case CVTYPE:
+ return (CV_TYPE(cv))
+ case CVORDER:
+ switch (CV_TYPE(cv)) {
+ case LEGENDRE, CHEBYSHEV, USERFNC:
+ return (CV_ORDER(cv))
+ case SPLINE1, SPLINE3:
+ return (CV_NPIECES(cv) + 1)
+ }
+ case CVNSAVE:
+ if (CV_TYPE(cv) == USERFNC)
+ return (CV_SAVECOEFF + CV_NCOEFF(cv))
+ else
+ return (CV_SAVECOEFF + CV_NCOEFF(cv) - 1)
+ case CVNCOEFF:
+ return (CV_NCOEFF(cv))
+ }
+end
+
+# CVSTATR -- Return real paramters from the curfit package
+
+$if (datatype == r)
+PIXEL procedure cvstatr (cv, param)
+$else
+PIXEL procedure dcvstatd (cv, param)
+$endif
+
+pointer cv # Curfit pointer
+int param # Parameter
+
+begin
+ switch (param) {
+ case CVXMIN:
+ return (CV_XMIN(cv))
+ case CVXMAX:
+ return (CV_XMAX(cv))
+ }
+end