Currently it is recommended to reference v->size directly in your
program. Similar for matricies m->size1 and m->size2.
The gsl_vector and gsl_matrix structs are documented in the manual so
accessing the size parameters shouldn't be an issue. The _get and _set
functions are needed since they are a bit more complex than just
accessing an element in an array.
On 01/08/2016 04:06 AM, Torbjörn Rathsman wrote:
It is possible to use accessor functions to retrieve or set data, but it is
not possible to access its size that way. Suggestion:
Add the function
inline gsl_vector_size(const gsl_vector* v)
{
return v->size;
}