![]() Registered Member ![]()
|
Suppose I have an Eigen Matrix like this:
And now I would like to produce a 2nd matrix which contains the indices of elements in the above matrix which compare equal to some condition (say, they compare equal to true). So if I have a matrix which looks like this: 0 0 1 0 1 0 I would want an output like this: 2 4 I can do this manually by looping through individual elements, but this would be cumbersome and would destroy any of the benefits of using Eigen (performance and simplicity). Is there some sort of functionality within Eigen that I can leverage to achieve something like this? |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]