From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5447 invoked by alias); 10 Dec 2009 21:44:35 -0000 Received: (qmail 5439 invoked by uid 22791); 10 Dec 2009 21:44:35 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-yx0-f180.google.com (HELO mail-yx0-f180.google.com) (209.85.210.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Dec 2009 21:44:28 +0000 Received: by yxe10 with SMTP id 10so242156yxe.12 for ; Thu, 10 Dec 2009 13:44:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.101.4.38 with SMTP id g38mr895937ani.2.1260481161668; Thu, 10 Dec 2009 13:39:21 -0800 (PST) In-Reply-To: References: <1259110486.3028.69.camel@manticore.lanl.gov> <4B20105C.3080501@fnal.gov> Date: Thu, 10 Dec 2009 21:44:00 -0000 Message-ID: <7f1eaee30912101339u28a65513q11d08e937c76cadf@mail.gmail.com> Subject: Re: using GSL with C++ (was Re: gsl container designs) From: James Bergstra To: "Robert G. Brown" Cc: gsl-discuss@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 X-SW-Source: 2009-q4/txt/msg00059.txt.bz2 On Thu, Dec 10, 2009 at 8:42 AM, Robert G. Brown > I use C only. =A0Consequently I come down in favor of using casts to type > e.g. generalized tensor forms, because pointer-based indirection can > lead to reasonably efficient, highly readable code (and because the GSL > really needs a generalized tensor form -- the computational universe of > interest to many scientists is not just one or two dimensional, > rectangular, with indices starting at 0 or 1. > > =A0 rgb +1 I mainly use python, numpy, & scipy now. But one of the main reasons for switching from gsl (aside from the python language) was natural support and syntax that numpy provides for n-dimensional arrays. I typically use arrays with n <=3D 5. James --=20 http://www-etud.iro.umontreal.ca/~bergstrj