From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8683 invoked by alias); 11 Jan 2014 00:28:55 -0000 Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org Received: (qmail 8672 invoked by uid 89); 11 Jan 2014 00:28:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.5 required=5.0 tests=AWL,BAYES_20,RCVD_IN_BRBL_LASTEXT,RCVD_IN_JMF_BL,RCVD_IN_SORBS_WEB,SPF_NEUTRAL,TVD_RCVD_IP autolearn=no version=3.3.2 X-HELO: server8.dns-grupohost.com Received: from 66-7-198-42.static.ahosting.biz (HELO server8.dns-grupohost.com) (66.7.198.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 11 Jan 2014 00:28:53 +0000 Received: from [201.254.116.168] (port=12241 helo=tom.localnet) by server8.dns-grupohost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1W1mRa-001q3p-Pr for gsl-discuss@sourceware.org; Fri, 10 Jan 2014 19:28:55 -0500 From: jeremy theler To: gsl-discuss@sourceware.org Subject: Re: interp2d discussion Date: Sat, 11 Jan 2014 00:28:00 -0000 Message-ID: <1475379.W4E7QPn8Ol@tom> User-Agent: KMail/4.11.3 (Linux/3.2.0-4-amd64; KDE/4.11.3; x86_64; ; ) In-Reply-To: <52D021B0.6080504@colorado.edu> References: <520EB115.9070606@ellipsix.net> <52CF8F04.60505@ellipsix.net> <52D021B0.6080504@colorado.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Get-Message-Sender-Via: server8.dns-grupohost.com: authenticated_id: jeremy@talador.com.ar X-SW-Source: 2014-q1/txt/msg00009.txt.bz2 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 > */ > }