|Summary:||fast filter of outer dimension|
|Product:||Eigen||Reporter:||Joshua Pritikin <jpritikin>|
|Severity:||Feature Request||CC:||chtz, gael.guennebaud, jpritikin|
|Version:||3.3 (current stable)|
Description Joshua Pritikin 2015-12-08 19:29:44 UTC
I wrote some simple code that filters a sparse matrix using a std::vector<bool>. The outer dimension (columns for column major mode) are removed from the matrix when the corresponding mask in the vector is false. Other columns are unchanged. This operation can be really fast because we just rewrite the outerIndexPtr and account for the extra storage entries using innerNonZeroPtr. Would you accept this method as a contribution to SparseMatrix?
Comment 1 Gael Guennebaud 2015-12-09 14:07:18 UTC
Yes, and one could even think about applying a permutation of the columns "in-place" using this "trick" (as we manually do in SparseLU), but this case is more tricky because then the starting indices would not monotonically increase anymore. So let's focus on the mask first!
Comment 2 Joshua Pritikin 2015-12-09 18:42:59 UTC
Created attachment 634 [details] proposed change How does this look?
Comment 3 Joshua Pritikin 2015-12-21 14:55:04 UTC
Can somebody review my proposed patch?
Comment 4 Nobody 2019-12-04 15:15:44 UTC
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1130.