Registered Member
|
Dear Eigen users and developers,
I have a big VectorXd a. And a "mask" matrix (sparse matrix), with 0 and 1. They are the same sizes. Then I want a new matrix like this: VectorXd b; b = nonzero_coeff(a.array()*mask.array()) That is to say when the element in mask is not zero then pick the correspond coefficient in vector a and put it into vector b. (It seems there is no array element in sparsematrix, right?) Of course it can be by a loop but I just wondering if eigen provide a easy way to do it? Thanks. |
Registered Member
|
Gael indicated that this feature will be implemented.
viewtopic.php?f=74&t=97652 I'm hoping it happens soon as well |
Registered Member
|
Thanks for letting me know.
It is a good news. And, I have to say: thanks ggael. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]