[eigen] inconsistent cwise() support

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

I've just stumbled over a strange issue. I tried to normalize a matrix such that all its entries are between 0 and 1 and tried this.

a -= a.minCoeff();
a /= a.maxCoeff();

It did not compile.... then, I tried this

a.cwise() -= a.minCoeff();
a.cwise() /= a.maxCoeff();

again, it did not work. :)

What did work and this is rather confusing is the following:

a.cwise() -= a.minCoeff();
a /= a.maxCoeff();

I think this is a bit unintuitive. Do you think we can change this in the future?

Regards,
Hauke


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/