By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,797 Members | 1,848 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

library for SVD with m<n

P: n/a
Hi,

I need a c++ library, that can calculate a Singular Value
Decomposition for a Matrix A that has more columns then rows. m < n !
I have already tried TNT with Jama, and LinAlg. Both packages can only
calculate the SVD for m>=n!

If this is not implemented yet in C++, can somebody give me a recipe
for this algorithm, or a possibility how to modify the SVD algoritm
for m>=n to get it to work with m<n. I need both the U and the V
Matrix.
Thanks for any help.

han
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Han Solo wrote:


I need a c++ library, that can calculate a Singular Value
Decomposition for a Matrix A that has more columns then rows. m < n !
I have already tried TNT with Jama, and LinAlg. Both packages can only
calculate the SVD for m>=n!

If this is not implemented yet in C++, can somebody give me a recipe
for this algorithm, or a possibility how to modify the SVD algoritm
for m>=n to get it to work with m<n. I need both the U and the V
Matrix.



Let's see

A^T = UDV ==> A = V^TDU^T

Jul 22 '05 #2

P: n/a
Hi Han,
I need a c++ library, that can calculate a Singular Value
Decomposition for a Matrix A that has more columns then rows. m < n !
I have already tried TNT with Jama, and LinAlg. Both packages can only
calculate the SVD for m>=n!

If this is not implemented yet in C++, can somebody give me a recipe
for this algorithm, or a possibility how to modify the SVD algoritm
for m>=n to get it to work with m<n. I need both the U and the V
Matrix.


I am not quite sure, but I think the topic is OT and belongs in a group for
math or libraries.

For the C++ Side I use the uBlas library for matrices and the bindings to
LAPACK. The SVD-Calculation itself is in FORTRAN (LAPACK) or in C (CLAPACK)
but in this constellation wrapped by the bindings.
See:
http://www.boost.org
http://groups.yahoo.com/group/ublas-dev/
http://sourceforge.net/projects/ublas/

LAPACK itself has quite a lot of functions for several cases of the SVD and
if I remember right the cas m<n as well. LAPACK is very well suited for
dense matrices.
http://www.netlib.org/lapack/
http://www.netlib.org/lapack/lug/node29.html

Theoretically this should work as well with the GNU GSL (also C), but the
last version I used had just comments in the code that m<n is not
implemented yet.
http://www.gnu.org/software/gsl/
http://www.gnu.org/software/gsl/manu...13.html#SEC221

Regards,
Jabba
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.