Jordi Gutierrez Hermoso wrote:
I was expecting to find just such a method as a matrix view with a
clever little hack with the matrix's tda, but I cannot figure out how
to do this. Should I just use a number of for-loops with row or
column views, or use one of the gsl_matrix view functions for arrays,
or is there a more clever intended way of accomplishing this?

You will have to access the memory directly for that access pattern. The gsl_matrix type is designed so that it can always be passed to a BLAS function, which means that the rows of the matrix must have a "stride" of 1.

(Btw, I don't think I understand either the need for a
gsl_matrix_view struct, if all it holds is a pointer to a gsl_matrix;
is this simply to emphasise syntactically that the view owns the same
data as another matrix?)

The implementation allows views of both const and non-const objects without casting. If we had only non-const objects the extra "indirection" wouldn't be necessary.

--
Brian Gough
(GSL Maintainer)

Network Theory Ltd,
Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/


_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to