Spline missing functions patch

Stewart V. Wright swright+gsl@physics.adelaide.edu.au
Tue Nov 8 09:39:00 GMT 2005


Hi,

I've been looking at the interpolation section and I've noticed that
there are the functions
 
 - gsl_interp_name
 - gsl_interp_min_size

but no equivalents for gsl_spline.

I know it is a minor issue, but I've attached a patch adding these two
functions for gsl_spine.  Basically they are just interfaces to the
gsl_interp functions.


Cheers,

S.
-------------- next part --------------
Index: doc/interp.texi
===================================================================
RCS file: /cvs/gsl/gsl/doc/interp.texi,v
retrieving revision 1.28
diff -u -r1.28 doc/interp.texi
--- doc/interp.texi	21 May 2005 13:29:02 -0000	1.28
+++ doc/interp.texi	7 Nov 2005 20:05:38 -0000
@@ -208,6 +208,12 @@
 @deftypefun void gsl_spline_free (gsl_spline * @var{spline})
 @end deftypefun
 
+@deftypefun {const char *} gsl_spline_name (const gsl_spline * @var{spline})
+@end deftypefun
+
+@deftypefun {unsigned int} gsl_spline_min_size (const gsl_spline * @var{spline})
+@end deftypefun
+
 @deftypefun double gsl_spline_eval (const gsl_spline * @var{spline}, double @var{x}, gsl_interp_accel * @var{acc})
 @deftypefunx int gsl_spline_eval_e (const gsl_spline * @var{spline}, double @var{x}, gsl_interp_accel * @var{acc}, double * @var{y})
 @end deftypefun
Index: interpolation/gsl_spline.h
===================================================================
RCS file: /cvs/gsl/gsl/interpolation/gsl_spline.h,v
retrieving revision 1.4
diff -u -r1.4 interpolation/gsl_spline.h
--- interpolation/gsl_spline.h	26 Jun 2005 13:27:03 -0000	1.4
+++ interpolation/gsl_spline.h	7 Nov 2005 20:05:38 -0000
@@ -49,6 +49,9 @@
 int
 gsl_spline_init(gsl_spline * spline, const double xa[], const double ya[], size_t size);
 
+const char * gsl_spline_name(const gsl_spline * spline);
+unsigned int gsl_spline_min_size(const gsl_spline * spline);
+
 
 int
 gsl_spline_eval_e(const gsl_spline * spline, double x,
Index: interpolation/spline.c
===================================================================
RCS file: /cvs/gsl/gsl/interpolation/spline.c,v
retrieving revision 1.5
diff -u -r1.5 interpolation/spline.c
--- interpolation/spline.c	26 Jun 2005 13:27:03 -0000	1.5
+++ interpolation/spline.c	7 Nov 2005 20:05:38 -0000
@@ -83,6 +83,18 @@
   }
 }
 
+const char *
+gsl_spline_name(const gsl_spline * spline)
+{
+  return gsl_interp_name(spline->interp);
+}
+
+unsigned int
+gsl_spline_min_size(const gsl_spline * spline)
+{
+  return gsl_interp_min_size(spline->interp);
+}
+
 void
 gsl_spline_free (gsl_spline * spline)
 {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 274 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20051108/d48042c0/attachment.sig>


More information about the Gsl-discuss mailing list