views:

113

answers:

2

Who can recoment stable and correct implementation SVD method in C++? Preferably standalone implementation (would not want to add large library for one method).

I use OpenCV... but openCV SVD return different decomposition(!) for single matrix. I understand, that exists more than one decomposition of simple matrix... but why openCV do like that? random basis? or what?

This instability causes the error in my calculations in some cases, and I can't understand why. However, the results are returned by mathlab or wolframalpha - always give correct calculations ....

+2  A: 

If you can't find a stand-alone implementation, you might try the eigen library which does SVD . It is pretty large, however it is template-only so you only have a compile-time dependency.

fschmitt
+2  A: 

GSL is great for SVD.

wok