Registered Member
|
Hi!
I'd like to do a rowwise max reduction as in the matlab command
I tried changing the eigen example on the website:
where my change was to alter from
to
this gives an error. is there any way to do this operation? i.e. take the max over each row and return maximal value and it's index? thanks! |
Moderator
|
Currently that's not possible. You can only do:
int i; float x = mat.row(3).maxCoeff(&i); or VectorXf mat.rowwise().maxCoeff(); but not both. Feel free to add a feature request there: http://eigen.tuxfamily.org/bz and even try to propose a patch!! The relevant file is Eigen/src/Core/VectorwiseOp.h |
Registered Member
|
thanks! i'll check it out.
|
Registered Member
|
There already is request for this feature there: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=401 A patch would still be very welcome! |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]