This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gsl_vector_subvector


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]