Re: [eigen] Re: [Bitbucket] Pull request #80: Allow LevenbergMarquardt to work with non-standard types. (eigen/eigen)

[ Thread Index | Date Index | More Archives ]

On Tue, Sep 2, 2014 at 2:32 PM, Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
On 02.09.2014 11:13, Gael Guennebaud wrote:
I would simply put "using std::sqrt;" in every functions making use of
sqrt, as we currently do everywhere else in Eigen, and remove this locally
defined sqrt_. This approach is future proof, simple, nothing is hidden.

I think the problem here is that sqrt is needed in an initializer list of a constructor. Of course, one could put using std::sqrt inside the class body.

ah, then I cleaned it up this way:

you might think that's a subtle change, but I prefer it to a member function called sqrt_.



Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252

Mail converted by MHonArc 2.6.19+