tags:

views:

1649

answers:

2

I'm looking to compute the Moore-Penrose pseudo-inverse of a matrix in C++, can someone point me to a library implementation or a numerical recipe?

Thanks!

+1  A: 

Seriously, did you even try?

Derek Park
that's what i said to myself.
Jose Vega
+4  A: 

You need 'Single Value Decomposition', from which you can find a C implementation here from Numerical Recipes in C.

This other site describes how to use single value decomposition to calculate the pseudo-inverse.

Kevin
numerical recipes implementation has licensing problems. I would suggest using LAPACK, which has an implementation of SVD (as well as a routine for the pseudo-inverse I guess)
Alexandre C.