Svd


boring7fordy7
03-26-2002, 03:02 AM
hello,
I would like to implement the SVD in C++, but i want to make it to more c style.
and i get alil problems cos i dont know exactly how it works and i am searching for more information.
i am thankful for any hint or link

best regards
b7f7

on Question more.
scale= fabs(A(i,k)) is in literatur mentioned to normalize with the eucledian norm.in the Householdering it is not nessesary to do it exact?

btw.
why dont we use the matrix normalform?
AtA? its symetric and its shaped n x n
then we can decompose to

A = P*A'*Pt

we get a right and left asymetric orthogonal Householder matrix P and A' a diagonal form having the singularities too?
or am i wrong?

boring7fordy7
03-27-2002, 08:49 PM
yes its possible this way
you can decompose A -> PR * A'*PL from normalform
using succesive Housholdering from right and left,
but PR!=PL.transpose as i asumtioned.
the way is
decompose a left H this leads to P1 and a upperTriangular matrix
then decompose out the right one do this as long till you get a mostly diagonal matrix and save the left and right transformations.
then you can use all the simple things to invert the A matrix.

Bill Press
03-27-2002, 09:01 PM
Great when you can answer your own question!
This helps other people.

I just want to put in a plug that if you are looking for SVD in C++ that is more "C-like" (for example, zero-based matrix indices and the ability to use other existing matrix class libraries) then ... try the SVD routine in the NEW version of Numerical Recipes, Numerical Recipes in C++.

Alas ;) this is not available for free, but it is printed in the new book version and included in the downloadable version that can be purchased from the NR On-Line Software Store (http://www.nr.com/com/storefront.html).

This message is brought to you by your sponsor, Numerical Recipes Software :)

boring7fordy7
03-28-2002, 06:30 AM
i have already ordered the book cos in further assignments it will sure be hlepful. but by now i just had to start and use what i had as resources to make this ll equationsolver thing.(i have not the Ents time :O))
so Alas
B7F7