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]

Re: Problem with Singular Value Decomposition Algorithm


Jim Love writes:
 > In every text that I have read dealing with the process of SVD, they have always placed the eigenvalues in a decreasing order.  The stated reason is to provide a standard solution and methodology.  Why would anybody build an API that does something different??  If you are using the SVD to find the least squares fit of a plane or a cylinder for example, order matters (if you want the right answer hehehe).  Yes I can add to my code to re-order the output, but so will most everybody else that uses this function.  So it should be done in the API.  Just a suggestion.
 > 

Thanks for the bug report.  

I'm pretty sure this is caused by me adding some new code to
explicitly handle the 2x2 case in the past few weeks.  I overlooked
the ordering of the singular values for that routine and I can see
that it will be unsorted. That would explain why the first two
elements are wrong --- they are handled by the 2x2 routine. I'll add
the appropriate sorting to that case.

regards
Brian Gough


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