Next: , Previous: 1D Evaluation of Interpolating Functions, Up: Interpolation   [Index]


28.6 1D Higher-level Interface

The functions described in the previous sections required the user to supply pointers to the x and y arrays on each call. The following functions are equivalent to the corresponding gsl_interp functions but maintain a copy of this data in the gsl_spline object. This removes the need to pass both xa and ya as arguments on each evaluation. These functions are defined in the header file gsl_spline.h.

Function: gsl_spline * gsl_spline_alloc (const gsl_interp_type * T, size_t size)
Function: int gsl_spline_init (gsl_spline * spline, const double xa[], const double ya[], size_t size)
Function: void gsl_spline_free (gsl_spline * spline)
Function: const char * gsl_spline_name (const gsl_spline * spline)
Function: unsigned int gsl_spline_min_size (const gsl_spline * spline)
Function: double gsl_spline_eval (const gsl_spline * spline, double x, gsl_interp_accel * acc)
Function: int gsl_spline_eval_e (const gsl_spline * spline, double x, gsl_interp_accel * acc, double * y)
Function: double gsl_spline_eval_deriv (const gsl_spline * spline, double x, gsl_interp_accel * acc)
Function: int gsl_spline_eval_deriv_e (const gsl_spline * spline, double x, gsl_interp_accel * acc, double * d)
Function: double gsl_spline_eval_deriv2 (const gsl_spline * spline, double x, gsl_interp_accel * acc)
Function: int gsl_spline_eval_deriv2_e (const gsl_spline * spline, double x, gsl_interp_accel * acc, double * d2)
Function: double gsl_spline_eval_integ (const gsl_spline * spline, double a, double b, gsl_interp_accel * acc)
Function: int gsl_spline_eval_integ_e (const gsl_spline * spline, double a, double b, gsl_interp_accel * acc, double * result)