Views and maybe bugs
Brian Gough
bjg@network-theory.co.uk
Wed Dec 19 13:20:00 GMT 2001
Hi,
Thanks for the bug report.
> 1) The documentation for gsl_matrix_view_vector() says that it
> will create a matrix view m' of a vector with elements
>
> m'(i,j) = v->data[(i*n2+j)*v->stride]
> ...
> There are two possibilities to fix this: Adding a stride factor
> for the second index of matrices or disallowing non-unit strided
> vectors as input for those functions.
Right, this should have been an error for non-unit strides. I'll add
that.
> 2) (Maybe a bug.) The gsl_vector_const_view_array() family of
> functions don't exists in libgsl.a. A dump with nm confirms
> this. Possibly a bad installation on my part, but perhaps
> someone else could check their system?
Yes, these were missing. They were left out of the template, I'll
add them in now.
> 3) (Maybe a bug.) The const modifier isn't uniformly applied to
> some functions' input arguments. Some do, such as
> gsl_vector_fprintf(), but whole families of functions, such as
> gsl_vector_view_array() don't. This is an unpleasant surprise.
> IMHO, if a function's argument is only for input then it should
> be qualified const.
>
The gsl_vector_const_view_array() function was missing as in matrix/,
it was using the same template file as for the matrices. I'll add it
in.
regards
Brian
More information about the Gsl-discuss
mailing list