Registered Member
|
I am relatively new to Eigen and I am trying to perform an operation on sparse matrix as follows:
Is this the right way to do this? I am hoping that there is no dense matrix being computed along the way and that it is reasonable efficient? Thanks for your help. Luca |
Moderator
|
yes that's the right way. .pruned() only remove explicit zeros that may appear during the computation. The implicit zeros are never created!
|
Registered Member
|
Hi
I'm also new to Eigen and used sparse matrix multiplication with ".pruned()". However, the result is dense! I checked and zero values are not pruned. I have no idea in which part, I wrote wrong. Mehdi |
Moderator
|
How did you look at the matrix entries ? What about mat.nonZeros() ??
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]