This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1130 - fast filter of outer dimension
Summary: fast filter of outer dimension
Status: CONFIRMED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Feature Request
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-08 19:29 UTC by Joshua Pritikin
Modified: 2019-12-04 15:15 UTC (History)
3 users (show)



Attachments
proposed change (4.12 KB, patch)
2015-12-09 18:42 UTC, Joshua Pritikin
no flags Details | Diff

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.

Note You need to log in before you can comment on or make changes to this bug.