From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12066 invoked by alias); 5 May 2008 20:09:39 -0000 Received: (qmail 32763 invoked by uid 22791); 3 May 2008 21:58:04 -0000 X-Spam-Check-By: sourceware.org Message-ID: <7ed3bc8b0805031457g6ef4f51ei810283a9b1f084b0@mail.gmail.com> Date: Mon, 05 May 2008 20:09:00 -0000 From: "Stuart O Anderson" To: gsl-discuss@sourceware.org Subject: Adding new Vector/Matrix accessor functions MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: c6db995a30033c4f 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/msg00023.txt.bz2 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 ) This would make my code cleaner. Does giving the user pointers to single elements of the matrix/vector data break anything? Stuart