Re: [eigen] Operations involving constants

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



On Thu, Oct 23, 2014 at 11:28 AM, Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Developer-question:
Is there a reason why we implement operator+(Scalar) as CwiseUnaryOp, but max(Scalar) as CwiseBinaryOp?

Maybe laziness to implement new functors when we added these max/man variants. A posteriori this might be a good thing as max is not always commutative, e.g., with NaN.
Another question is why having specialized functors for operator+(Scalar) and the likes, and the motivation was to ease compiler work. This also simplifies catching scalar multiples in sub-expressions.

gael


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