Binary Indexing
Describe the feature you would like to be implemented:
This proposal implements meta-templated binary indexation. As requested by cantonios, the transformed indexset is storable (std::vector) to avoid recomputing the transformation when used multiple times.
Would such a feature be useful for other users? Why?
Some algorithms and workflows are strongly simplified when using binary indexing rather than actual indexes.
Ameliorations:
The below implementation works fine, but it's inelegant to have to flatten 2D matrix/Arrays explicitly (Mat.reshaped()( bin( MatMask ) ) ). I couldn't find how to do that in a smart way.
Feature implementation:
Edited by Stéphane T.