forum.alglib.net
http://forum.alglib.net/

Sparse matrix multiplication
http://forum.alglib.net/viewtopic.php?f=2&t=3956
Page 1 of 1

Author:  Kookaburra88 [ Fri May 17, 2019 8:09 am ]
Post subject:  Sparse matrix multiplication

I'd like to multiplicate two sparse matrices (A & B)--> C = A * B (size: 307200x307200) which have been initialized similar to the matrix a below.
Did not find anything related in the documetation nor the forum, except of the function rmatrixgemm, which requires the matrices to be of the type real_2d_array. Thank you very much for helpful tips, reference & solution.


Code:
sparsematrix a;
sparsecreate(5, 5, a);
sparseset(a, 0, 0, 5.0);
sparseset(a, 0, 1, 1.0);
sparseset(a, 1, 0, 1.0);
sparseset(a, 1, 1, 7.0);
sparseset(a, 1, 2, 2.0);
sparseset(a, 2, 1, 2.0);
sparseset(a, 2, 2, 8.0);
sparseset(a, 4, 4, 4.0);

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/