Hello I know there are a lot of questions on sparse matrix multiplication, but many of the answers say to just use libraries. I want to do it without using library functions. So far I've done the easy part, getting my matrices into the form of
element array
column array
row array.
What I need help with is the logic portion. If matrix A is M*N and matrix B is N*P, how do I do this? I considered iterating over the elements in matrix A and checking if it's rowA== colB, and if so if colA==rowB and if that's true then multiply. I currently know my version is wrong, but I can't think of a way to make it right.
for(int i = 0; i
以上就是Sparse Matrix multiplication in Java的详细内容,更多请关注web前端其它相关文章!