This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Elements of sparse matrix products

Tags: None
(comma "," separated)
MarkoFranko
Registered Member
Posts
11
Karma
0
OS

Elements of sparse matrix products

Mon Jun 11, 2012 5:32 pm
Hello!

Following Problem:

I have to calculate a sum

Code: Select all
\sum_{k1,k2,k3,k4,k5} Mat1[k5,k1]*Mat2[k1,k2]*Mat3[k2,k3]*Mat4[k3,k4]*Mat5[k4,k5] * SomeFunction[k1,k2,k3,k4,k5]


Mat1,..,Mat5 are large matrices (dim 1000) but extremely sparse.

It is not possible to calculate the sum directly. But it were possible If I only had known the nonzeros of the product.

How to get only the nonzero elements of the elementwise products Mat1[k5,k1]*Mat2[k1,k2]*Mat3[k2,k3]*Mat4[k3,k4]*Mat5[k4,k5] if the matrices are stored as sparse matrices?

Thanks in advance! :)


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell