Code simple de décomposition de la valeur singulière en C
-
15-11-2019 - |
Question
Je recherche un code de décomposition de valeur singulière (SVD) en C, voudriez-vous m'aider s'il vous plaît?
J'ai trouvé de nombreuses sources mais je ne peux pas les exécuter, je cherche une version SVD code fournissant 3 matrice de S, V et U pour moi.
La solution
You can use the Numerical recipies code for that svdcmp.c reference. Actually in my case I found more accurate the openCV one, but both work fine.
Autres conseils
Don't write it yourself, don't deal with trying to build someone else's source. Use a library that provides this function for you. There's probably already one available on your target platform.
Specifically, use the industry-standard LAPACK library or use the GSL or whatever other linear algebra library you want. They all have an SVD implementation.