> 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....

Agreed.  This has often bugged me.

> Or also is there another solution to this problem that I don't know about?

How about using

INLINE_DECL double * gsl_vector_ptr (gsl_vector * v, const size_t i);

to say *gsl_vector_ptr(v, i) += x ?  Never knew about this until I
just went fishing for it.

- Rhys

Reply via email to