Особое значение разложения значений Простой код в C
-
15-11-2019 - |
Вопрос
Я ищу код декомпозиции сингулярного значения (SVD) в C, не могли бы вы помочь мне?
Я нашел много источников, но я не могу запустить их, я ищу версию SVD-код, который предоставляет 3 матрицу S, V и U для меня.
Решение
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.
Другие советы
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.