This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

increment a single element of matrix/vector


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]