Vector and matrix views (and bug report)

Fabrice Rossi rossi@ufrmd.dauphine.fr
Fri Dec 3 06:22:00 GMT 1999


Brian Gough wrote:
> 
> Thanks. I will fix the bug and add those functions.

By the way, there is a bug in my code. I've used base->data rather than
base->block to allow a view to be extracted from a vector that has been itself
extracted from a block or a matrix. The problem is that I've not taken into
account the stride in the original vector. For gsl_vector_view_from_vector it
simply means that the function shall start with 

stride *= base->stride;

For gsl_matrix_view_from_vector, it is not possible to use such a feature,
because there is no support in the matrix structure for a stride on the column
index, so I guess base->stride should be tested to refuse the view if it's
different from 1.

Sorry for the error.

Fabrice Rossi


More information about the Gsl-discuss mailing list