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]

Adding new Vector/Matrix accessor functions


I've run into a situation where it would be very convenient to be able
to get pointers to individual elements of GSL vector and matrices.
Currently I deal with this by using matrix and vector views of normal
C arrays.  However, if there were a pair of functions:
double *gsl_vector_get_ptr( gsl_vector *v, int offset )
double *gsl_matrix_get_ptr( gsl_vector *v, int row, int col )

This would make my code cleaner.  Does giving the user pointers to
single elements of the matrix/vector data break anything?

Stuart


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