gsl_vector_subvector

E. Robert Tisdale edwin@netwood.net
Tue Jul 18 19:51:00 GMT 2000


There is a documentation error for

    gsl_vector gsl_vector_subvector(gsl_vector* v,
      size_t i, size_t n);

It says

    v'(i) = v-->data[(offset + i)*v->stride]

but, of course, there is no offset except i.

It seems strange that the GSL would define a function

    gsl_vector gsl_vector_subvector(gsl_vector* v,
      size_t i, size_t n);

which returns a gsl_vector object for subvectors
and a function

    gsl_vector* gsl_vector_alloc(size_t n);

which returns a pointer to a gsl_vector for vectors.
Does anybody know why?

If gsl_vector_subvector returned a pointer to a gsl_vector object,
it might be practical to implement reference counting.



More information about the Gsl-discuss mailing list