Hello, I have just started using Boost libraries, and I have 2 questions regarding use of sparse matrix: 1. The matrix should be large (about 3000 * 1500), and I need to make the insertion very efficient. When I use the regular insert function, it seems to work very slow. Is there a better way to insert objects into the sparse matrix? 2. I want to know if there is an efficient way to multiply the matrix with a vector. Regards, Golan.
Golan Green wrote:
1. The matrix should be large (about 3000 * 1500), and I need to make the insertion very efficient. When I use the regular
insert function, it seems to work very slow. Is there a better way to insert objects into the sparse matrix?
The most efficient way to build up the structure is the COO format. So I would advise to use the coordinate_matrix. One the structure is filled you might want to create a compressed-sparse-column (or compressed_matrix) matrix from the coordinate_matrix because operations on the CSC are faster than one the COO. t
participants (2)
-
Golan Green
-
Toon Knapen