This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Problem with Singular Value Decomposition Algorithm
Peter Schmitteckert writes:
> > Matrices are stored in row-major order, meaning that each row of elements
> > forms a contiguous block in memory. This is the standard "C-language
> > ordering" of two-dimensional arrays. Note that FORTRAN stores arrays in
> > column-major order. The number of rows is size1. The range of valid
>
> therefore, returnning vectors in the coulmn should be considered
> as a bug. Have I missed something ?
> Note, that the documentation says: "The matrix Q contains the elements of Q
> in untransposed form".
The routine does what the documentation says... so this is not a bug ;-)
GSL vectors use strides, so both rows and columns can be accessed as
vectors without problems.
As for efficiency -- that will depend on the application's access
pattern, which could be either row or column oriented, so there is
always a winner and a loser.
regards
Brian Gough