Problem with Singular Value Decomposition Algorithm

Brian Gough bjg@network-theory.co.uk
Wed Dec 19 13:20:00 GMT 2001


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



More information about the Gsl-discuss mailing list