Creating a sparse matrix in CHOLMOD or SuiteSparseQR

In SparseSuiteQR, all the examples I can find use stdin or a file designed to create a sparse matrix. Can someone provide a simple example of how to create it directly in C ++?

Even better, the CHOLMOD documentation mentions the sparse2 function, available in matlab, which behaves just like a sparse one. Can this be used in C ++?

+4
source share
2 answers

I assume that you are trying to solve a linear system, see the Tim Davies CSparse package or increase the matrix libraries, which also have numerical bindings that are related to the umfpack interface and some lapack AFAIK functions ...

+1
source

The data structures used by SuiteSparseQR (for example, cholmod_sparse) are defined in the CHOLMOD library. You can find more information about this in the CHOLMOD documentation, which is much more than in SuiteSparseQR.

+1
source

All Articles