From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23153 invoked by alias); 6 May 2008 20:25:15 -0000 Received: (qmail 23137 invoked by uid 22791); 6 May 2008 20:25:15 -0000 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.31) with ESMTP; Tue, 06 May 2008 20:24:56 +0000 Date: Tue, 06 May 2008 20:25:00 -0000 Message-ID: <87lk2n2naj.wl%bjg@network-theory.co.uk> From: Brian Gough To: "Stuart O Anderson" Cc: gsl-discuss@sourceware.org Subject: Re: Adding new Vector/Matrix accessor functions In-Reply-To: <7ed3bc8b0805031457g6ef4f51ei810283a9b1f084b0@mail.gmail.com> References: <7ed3bc8b0805031457g6ef4f51ei810283a9b1f084b0@mail.gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/22.1 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: 93bd37abd5ad98b7582de5e4add3abc0 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: 2008-q2/txt/msg00024.txt.bz2 At Sat, 3 May 2008 17:57:42 -0400, Stuart O Anderson wrote: > I've run into a situation where it would be very convenient to be able > to get pointers to individual elements of GSL vector and matrices. > Currently I deal with this by using matrix and vector views of normal > C arrays. However, if there were a pair of functions: > double *gsl_vector_get_ptr( gsl_vector *v, int offset ) > double *gsl_matrix_get_ptr( gsl_vector *v, int row, int col ) Hello, I think these already exist -- see the functions gsl_matrix_ptr(m,i,j) and gsl_vector_ptr(v,i) in the manual. Manipulating data with the pointers from these is fine. -- Brian Gough