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

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen 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: https://bitbucket.org/eigen/eigen/commits/9e14a4c31187/

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

gael

 
Christoph


--
----------------------------------------------
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+ http://listengine.tuxfamily.org/