From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3827 invoked by alias); 27 Jan 2014 23:47:03 -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 3815 invoked by uid 89); 27 Jan 2014 23:47:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: ipmx6.colorado.edu Received: from ipmx6.colorado.edu (HELO ipmx6.colorado.edu) (128.138.128.246) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Jan 2014 23:47:01 +0000 From: Patrick Alken Received: from bonanza.ngdc.noaa.gov ([140.172.179.41]) by smtp.colorado.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Jan 2014 16:47:00 -0700 Message-ID: <52E6EFF3.1000808@colorado.edu> Date: Mon, 27 Jan 2014 23:47:00 -0000 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: increment a single element of matrix/vector Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2014-q1/txt/msg00017.txt.bz2 I was thinking of adding two routines to GSL, to increment a single element of a matrix or vector by some amount, since I'm always doing things like: gsl_vector_set(v, i, gsl_vector_get(v, i) + x); which I think is ugly and annoying. Something like: gsl_vector_add_element(v, i, x); or gsl_matrix_add_element(m, i, j, x); would be really nice. Does anyone have any better suggestions for the function name? Or also is there another solution to this problem that I don't know about? Patrick