Is there any sparse matrix library that can do these:
Can someone recommend some libraries for me? If you recommend, please tell me the advantages and disadvantages of it, and the reason why you recommend it.
By the way,I have searched many sparse matrix libraries on the internet and tested some of them. I found that each of them only supported very few operations(many of them can only solve linear algebraic equations and do matrix-vector multiplication) .Finally I found one named SparseLib++. It didn't support many operations, either.So I added a lot of basic matrix operations. Now it works. However, I just heard that SparseLib++ was too old and not fast. But my project is based on SparseLib++ and I have spent a lot of work on SparseLib++. So I am wondering whether to try another sparse matrix library or not.
CServer Side ProgrammingProgramming. In a given matrix, when most of the elements are zero then, we call it as sparse matrix. Example − 3 x3 matrix 1 1 0 0 0 2 0 0 0. In this matrix, most of the elements are zero, so it is sparse matrix.
A sparse matrix can be stored in full-matrix storage mode or a packed storage mode. When a sparse matrix is stored in full-matrix storage mode, all its elements, including its zero elements, are stored in an array.
The problem with representing these sparse matrices as dense matrices is that memory is required and must be allocated for each 32-bit or even 64-bit zero value in the matrix. This is clearly a waste of memory resources as those zero values do not contain any information.
The computational complexity of sparse matrix multiplication on AP is shown to be an O(nnz) where nnz is the number of nonzero elements. The AP is found to be especially efficient in binary sparse matrix multiplication. AP outperforms conventional solutions in power efficiency.
http://www.mcs.anl.gov/petsc/ has a lot of built in linear algebra and ca distribute matrices over a cluster when your data gets big. There's also an active following on https://scicomp.stackexchange.com/ when you have technical questions. The downside is that the learning curve is a bit steep.
Can someone recommend some libraries for me?
A quite detailed list with comparisons
Recommendations for a usable, fast C++ matrix library?
If you recommend, please tell me the advantages and disadvantages of it, and the reason why you recommend it.
When it comes to large-scale sparse stuff, I personally use the Harwell Subroutine library. It's written in Fortran and it is a pain to interface it with C++. Nevertheless, I use it because it is robust and fast.
Eigen library has good support for spars matrix manipulation, and the most appealing feature is that its style is like Matlab.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With