Re: [eigen] unpleasant surprise mit math functions

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


Hi,

On Thu, Sep 27, 2012 at 12:01 PM, Christoph Hertzberg
<chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> I don't think anybody (at least not me) argued for removing
> sin(ArrayBase<...>);

Ok. I should have taken a closer look at the code. Removing the
functions you mentioned before seems fine to me.

> It might be even wise to define the other Eigen::internal::sin as
> Eigen::sin, that would make both Eigen::sin(array) and sin(array) work.
> I'm not very comfortable with allowing std::sin(array), but I'm ok with that
> for not breaking the API.
> In most applications you would be fine with
> {using std::sin; sin(x); /* x can be scalar or Eigen::ArrayBase<> */ }

That would be fine with me, too. On the other hand side I never quite
manage to come up with a really good reason for not overloading free
functions in namespace std.

Regards,
Hauke



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