From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12225 invoked by alias); 5 Jan 2014 20:31:28 -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 12213 invoked by uid 89); 5 Jan 2014 20:31:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mail-qc0-f175.google.com Received: from mail-qc0-f175.google.com (HELO mail-qc0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 05 Jan 2014 20:31:26 +0000 Received: by mail-qc0-f175.google.com with SMTP id e9so16574493qcy.20 for ; Sun, 05 Jan 2014 12:31:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=YHPj8tF+ly51wF5HME3QfeiqEIIoVDDJ98Z8qScO66o=; b=dn2HRwxIREUmOTG/lmV41N6F5hfigMWBoVUW9ow1Ve42Oev1D02OaAv0ZapiRxjCkG xdh7VLmgbnrDwC0qjuuRBMY/fq3Mf9LxTq5hgrv3V/5DUrKfIAOJlLRFNp5CHRoWcpXC 6m7K7Q+L8BP6MoOxVVTDiiv945s/6OvqRqomikJj3zbCUCO2+eDFl/OoE122hAKN9gt1 PzwZW8Z2tuHegbCJkcBfbGbw7R8OTn0qh0++12JDKWxS3LZJeXHqNXHPCIsrpsbGifcY YnARqIDQg2N6X1+jMQPddu6HNvVhVi1BnKDv263UUx/Lu6l3q5txwyfcKdN6vKuj0RH7 gCRg== X-Gm-Message-State: ALoCoQknDfKyo+4rLpHnLqjkZkokDOEq4SzlVMO9Ew8E+2G0nnsuss1ev71gc93TMUZx1CpgzRu0 X-Received: by 10.224.79.74 with SMTP id o10mr173334105qak.6.1388953883701; Sun, 05 Jan 2014 12:31:23 -0800 (PST) Received: from [192.168.1.119] (c-174-49-133-13.hsd1.pa.comcast.net. [174.49.133.13]) by mx.google.com with ESMTPSA id c6sm91059408qev.15.2014.01.05.12.31.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 05 Jan 2014 12:31:22 -0800 (PST) Message-ID: <52C9C114.1010303@ellipsix.net> Date: Sun, 05 Jan 2014 20:31:00 -0000 From: David Zaslavsky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: "gsl-discuss@sourceware.org" Subject: Re: [Help-gsl] Getting an extension listed on GSL page References: <520EB115.9070606@ellipsix.net> <52C708E1.6010601@colorado.edu> In-Reply-To: <52C708E1.6010601@colorado.edu> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1UHv8bKiv7h0FK70vSfjDbsoIG9X0NoLv" X-SW-Source: 2014-q1/txt/msg00004.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1UHv8bKiv7h0FK70vSfjDbsoIG9X0NoLv Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 4252 I just noticed this message seems not to have made it out to the list when I originally sent it on Friday. So I'm trying again. ----- Hi Patrick, Thanks for the feedback. First let me say that texinfo documentation will not be a problem. I'm happy to add it, but it's just a matter of time - I have a lot of other things going on so it will probably take on the order of some weeks for me to find time to do that. On the indexing issue: interp2d treats the x index as the column coordinate and the y index as the row coordinate, so that xsize is the number of columns and ysize is the number of rows. This is done for compatibility with Cartesian coordinates: most people envision x as the horizontal coordinate and y as the vertical one. Given this interpretation, the current implementation of INDEX_2D does use row-major order. If I'm not mistaken, it's still possible to use a GSL matrix's data array in interp2d without transposing if you pass the y index as i and the x index as j to gsl_matrix_get and friends. gsl_matrix_alloc(ysize, xsize) gsl_matrix_get(m, yi, xi) etc. So I would say the real issue is not the implementation, but the variable naming. I think it's worth putting in some thought on how best to resolve this without confusing people. For compatibility with gsl_matrix, it might be better to ditch the names xi, yi, xsize, ysize in favor of j, i, size2, size1 respectively. But I must admit I find the x and y naming convention much more intuitive. I guess something else I could do is switch the order of the x and y arguments in the interp2d functions, to put yi, ysize, etc. first. That would make it better correspond with the standard notation in which the first index labels the row of the matrix and the second index labels the column. But then again it would cause some headaches with people who are already using the code. (I'm not sure how many users the library has.) Also, I should mention that I don't consider interp2d to be feature-complete, nor am I in any particular rush to make it complete. There are some features I'm interested in adding, including additional interpolation schemes, more interpolation methods without boundary checks (for extrapolation), etc. How would this move affect my ability to continue to add features? :) David On 01/03/2014 02:00 PM, Patrick Alken wrote: > Hi David, I'm moving this thread over to gsl-discuss from help-gsl. >=20 > I've been taking a look at your interp2d code since I'm currently doing > some work which needs 2d interpolation. I like your coding style and > think this should be moved into the repository at some point. >=20 > Just a few initial thoughts: >=20 > 1. Your INDEX_2D macro for indexing the z array appears to use > column-major ordering, even though the comment in the .h file says > row-major. IE: it is currently defined as: >=20 > #define INDEX_2D(xi, yi, xsize, ysize) ((yi) * (xsize) + (xi)) >=20 > which would store each column contiguously in memory instead of each > row. The GSL gsl_matrix structure uses row-major ordering (see > gsl_matrix_double.h): >=20 > 283 return m->data[i * m->tda + j] ; >=20 > and so if a user wants to store their 2D grid in a gsl_matrix, its not > straightforward to just pass m->data as the z array argument to your > functions; they'd have to transpose first. >=20 > 2. It would be really great if you could document your library with > texinfo so when we fold the code into the repository the docs are ready > to go. You can look at some other extensions for examples (ie see the > doc/alf.texi file in the ALF extension) >=20 > Patrick >=20 > On 08/16/2013 05:09 PM, David Zaslavsky wrote: >> Hi there, >> >> For quite some time I've been working on a 2D interpolation library >> compatible with the GSL. I've mentioned it a couple times on this list. >> With some recent work it's gotten to the point where I consider it >> ready for a first release. How would I go about getting it listed in the >> "Extensions" section on the GSL web page? >> >> Also if anyone would like to try compiling and running the test suite, >> I'd appreciate knowing about any bugs that pop up. I've only tried it on >> Linux with GCC 4.6.3. >> https://github.com/diazona/interp2d >> >> :) David >> >=20 --1UHv8bKiv7h0FK70vSfjDbsoIG9X0NoLv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 295 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlLJwRkACgkQBoP+cm/XtnTytQD/fYTXc9S5Gn8tf3H+tf4HvmGR tv9rtsi2ld6FlvrqKukA/0/g4iW/YQRc1hFDZoQVsL0Jmu24pxxk/rXr1Mfl9YS8 =z+Tt -----END PGP SIGNATURE----- --1UHv8bKiv7h0FK70vSfjDbsoIG9X0NoLv--