This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
Re: interp2d discussion
- From: jeremy theler <jeremy at talador dot com dot ar>
- To: gsl-discuss at sourceware dot org
- Date: Fri, 10 Jan 2014 21:27:11 -0300
- Subject: Re: interp2d discussion
- Authentication-results: sourceware.org; auth=none
- References: <520EB115 dot 9070606 at ellipsix dot net> <52CF8F04 dot 60505 at ellipsix dot net> <52D021B0 dot 6080504 at colorado dot edu>
Hi all,
I consider the addition of these routines to GSL as a major breakthrough.
Now I have three questions about generalization:
1. can these 2D interpolation routines be extended to scattered (i.e. non-
rectangular) data?
2. can these 2D interpolation routines be extended to n dimensions?
3. both
Thank you for your hard work!
--
jeremy
On Friday 10 January 2014 09:37:04 Patrick Alken wrote:
> > Sure, that would be a reasonable option, but I'd like to do a bit of
> > research (i.e. ask a few more people for opinions) to see what solution
> > will be the least confusing. After all, if there is a change to be made,
> > this is the time to do it, not later after the code is incorporated into
> > GSL. I think backward compatibility will not be too much of a problem
> > because people will have to make other changes anyway to transition from
> > the interp2d_* functions to the corresponding gsl_* functions.
>
> I think 2 additional functions could be added to help solve this issue
> and hide the indexing
> from the user:
>
> interp2d_grid_set(double zarr[], size_t i, size_t j, double z)
> {
> /* set point (i,j) of grid 'zarr' to value 'z' */
> }
>
> and
>
> interp2d_grid_fill(double zarr[], int (*grid_func)(double x, double y,
> void *params))
> {
> /* fill entire grid 'zarr' using callback function 'grid_func'; this
> would be useful
> * in cases where the user has a continuous/analytic function which
> is expensive to call, but
> * they'd like to make a grid and then interpolate from it
> */
> }