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
- To: "Jim Love" <Jim dot Love at asml dot com>
- Subject: Re: Problem with Singular Value Decomposition Algorithm
- From: Brian Gough <bjg at network-theory dot co dot uk>
- Date: Wed, 12 Sep 2001 22:16:34 +0100 (BST)
- Cc: <jt at lanl dot gov>, <gsl-discuss at sources dot redhat dot com>
- References: <sb9f4602.003@wiltonhub.svg.com>
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