Re: [eigen] Operations involving constants

[ Thread Index | Date Index | More Archives ]

On Thu, Oct 23, 2014 at 11:28 AM, Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
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.


Mail converted by MHonArc 2.6.19+