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

Elementwise operation on SparseVectors

Tags: None
(comma "," separated)
pratikc
Registered Member
Posts
1
Karma
0
Can anyone please suggest a way to perform element-wise multiplication of two sparsevectors?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
You can use cwiseProduct from the Matrix-coefficient-wise-API (http://eigen.tuxfamily.org/dox-devel/gr ... tml#title6):

c = a.cwiseProduct(b);


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]