C++ and C# SVD implementation
Singular Value DecompositionSingular Value Decomposition is generic tool that is used in many scientific applications. Many implementations can be found by Googling the term. The advantage of this application is convenience in usage. It is a conversion of SVDLIBC implementation from UNIX to Windows into C and C#.
C# version is sitting in a single file that can be included into any project and used immediately. Usage is reduced to calling of single function
where input and output data are exchanged via files. File formats are kept identical to SVDLIBC and can be identified from self-test application driver. Usually, when people see another SVD implementation, they wondering about size limit and performance. Unfortunately, this is not published and there is no chances to find that out without downloading and testing. When I finished this project I understood why. It is not possible to provide simple answer to this simple question. Regarding this program I can only say that rank and smallest size affect the time. For size and rank near 5000 the program needs about half an hour on regular laptop. For laptop the limit may be expected near the size of 10,000.
The matrices involved into decomposition are shown in the chart below
Matrix A can be sparse, only non-zero values plus its positions are recorded in data file. Result matrices U, VT are saved in transposed form. If rank is smaller than the size (like it is shown on the chart) the size of saved result is reduced to the level of the rank.