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 ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Re: [Bitbucket] Pull request #80: Allow LevenbergMarquardt to work with non-standard types. (eigen/eigen)*From*: Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx>*Date*: Fri, 29 Aug 2014 18:18:15 +0200

On 29.08.2014 17:55, Thomas Capricelli wrote:

Il 28/08/2014 22:31, Jitse Niesen ha scritto:Sorry, I should probably have waited for your feedback instead of jumping the gun and merging it.No, it's ok, you did well.static Scalar sqrt_(const Scalar& x) { using std::sqrt; return sqrt(x); } If Scalar is a custom type like mpreal which is defined in its own namespace, then this function also looks for sqrt in that namespace (I think it's called argument-dependent lookup). For standard types there is no difference.You mean that { using std::sqrt; return sqrt(x); } will use std::sqrt() only when sqrt(someothertype) is not previously defined ?

wikipedia has an article about ADL (maybe the links show more details): http://en.wikipedia.org/wiki/Argument-dependent_name_lookup

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 ----------------------------------------------

**Follow-Ups**:

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

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

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

**Messages sorted by:**[ date | thread ]- Prev by Date:
- Next by Date:
- Previous by thread:
- Next by thread:

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