Hi Alex,

You can define explicit C-function after you have constructed the spline.
Let me give an example:

struct param_spline {
    gsl_interp_accel *acc_u;
    gsl_spline *spline_u;
};

double func(double t, void * params) {
    struct param_spline *p = (struct param_spline *)params;
    return gsl_spline_eval(p->spline_u, t, p->acc_u);
}

main() {
...
struct param_spline p;
...
// constructing the spline
gsl_spline_init( spline_data, x, y, N);

p.spline_u =spline_data;
p.acc_u = acc_u;
...
}

Now a pointer to func can be sent to the minimizer. I hope this helps you.
It has worked for me earlier.

Rajeev
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to