From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10343 invoked by alias); 23 Oct 2009 21:28:21 -0000 Received: (qmail 10268 invoked by uid 22791); 23 Oct 2009 21:28:21 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_20,DATE_IN_PAST_03_06,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.network-theory.co.uk (HELO mail.network-theory.co.uk) (66.199.228.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Oct 2009 21:28:16 +0000 Date: Fri, 23 Oct 2009 21:28:00 -0000 Message-ID: From: Brian Gough To: Gerard Jungman Cc: gsl-discuss@sourceware.org Subject: Re: questions about block/vector/matrix In-Reply-To: <1255983086.12024.83.camel@manticore.lanl.gov> References: <1254708196.18519.1.camel@ForbiddenPlanet> <1255983086.12024.83.camel@manticore.lanl.gov> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Message-Mac: 8a23673d42f70ffcfcdb674c3ca23f45 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/msg00025.txt.bz2 At Mon, 19 Oct 2009 14:11:26 -0600, Gerard Jungman wrote: At Mon, 19 Oct 2009 14:11:26 -0600, Gerard Jungman wrote: > It is worth mentioning at this point that std::valarray is a > recognized failure. The implementations could never live up > to the intentions. See many discussions on the web, including > an admission from the designer of valarray that it is a > failure. It is best not to invoke valarray as a > justification for any design choice; Yes, gsl_block was written in 1999, so I am just describing the reason it was done like that at the time. While it's not essential, I don't think it's a bad principle to have wrapper around malloc. > This does not address the point, which is that the name of a > function like gsl_vector_alloc_from_vector() is inappropriate, > since it is not clear what is being "alloced". That is an old undocumented function, not intended for actual use as far as I'm aware. Ideally it should have been removed. The header files no doubt contain bits of old junk. The best description of the vectors and matrices is in the manual, where I've written what should be the clearest description of how they are meant to be used and some simple examples of the view functions. The challenge for any scheme is getting reasonable const behavior in C. If that problem can be solved better then everything else follows more easily.