This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
increment a single element of matrix/vector
- From: Patrick Alken <patrick dot alken at Colorado dot EDU>
- To: "gsl-discuss at sourceware dot org" <gsl-discuss at sourceware dot org>
- Date: Mon, 27 Jan 2014 16:46:59 -0700
- Subject: increment a single element of matrix/vector
- Authentication-results: sourceware.org; auth=none
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