Vector and matrix views (and bug report)

Brian Gough bjg@network-theory.co.uk
Sun Dec 5 12:04:00 GMT 1999


Ok, I have checked in a fix for that. At some point we'll need to
write tests for the new matrix/vector functions. I have been adding
quite a few untested functions in there too.

Fabrice Rossi writes:
 > 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