This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
gsl_vector_subvector
- To: gsl-discuss at sourceware dot cygnus dot com
- Subject: gsl_vector_subvector
- From: "E. Robert Tisdale" <edwin at netwood dot net>
- Date: Wed, 19 Jul 2000 01:49:16 +0000
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.