Registered Member
|
Hey,
So I've been using Eigen for a while now and found my way around, but there's something I can't find, so I wanted to ask: Is there anything like Octave's / Matlab's find() in Eigen? E.g., like this >> A = [1 2 3 4 5] A = 1 2 3 4 5 >> find(A >= 3) ans = 3 4 5 >> find(A < 2) ans = 1 It returns a vector of indexes, for which the given boolean holds true. |
Moderator
|
We don't have that yet. We first have to support integer array as indices to make that feature useful. However, we have a (A > 3).select(E,F) mechanism which might be enough in your case?
|
Registered Member
|
Not exactly what I need, but I wrote some util function for my own purposes, not that important anyway.
As for the select() -- thanks, hadn't noticed that, I'm sure it'll come in handy. |
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]