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: Jitse Niesen <jitseniesen@xxxxxxxxx>
- Date: Thu, 28 Aug 2014 21:31:44 +0100 (BST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1409257897; bh=PtHqyoHjH3ToMtMe7srwQ7cdi4oX0w5xU+8JMaNTnNE=; h=Received:Received:Received:DKIM-Signature:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Date:From:X-X-Sender:To:Subject:In-Reply-To:Message-ID:References:User-Agent:MIME-Version:Content-Type:From:Subject; b=Vs2T4D8LsoQZl61LLiHz0Tign3TXZJIXT3jEcew2hgLCs7umYfR0ho15mX2P3SmrKeKPdisXZLvdkFEPZ8sQ2GwhYi4cVVck9+OCGB27EfLVaBcnPkrqfAOyZKjdw5a7ed0hDXPZxJ3I463uWALrMDjt5xEXIBTPTEtPoLQ5ru3uuOKSy69newMagAfrwbBa8ssHNW35d2x1gWWwRm9Vs8IRdG5yOXqV3oCafkSUQyrEOgdvZnbkkrStDSP+llrMF/Gh3bKwFKYt4voM0KqUHBCjoTwPdBRThDE7VCCPFMpe7im1tlj854fKYPRbiozG1WCyUATFBiXcGmxV7nRemA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1409257897; bh=PtHqyoHjH3ToMtMe7srwQ7cdi4oX0w5xU+8JMaNTnNE=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Date:From:X-X-Sender:To:Subject:In-Reply-To:Message-ID:References:User-Agent:MIME-Version:Content-Type; b=kUOATs87jhyZ9WVZfzFucUKJr4cYw5J00iiwsCOQWXxnb1QRMqx+bNU1u2IVUrDiaRqLB5PjdntkplQW0MiE5jzeL5Xj6s6RzeTXDOrwCTZ3cycQtNEmkxqv03mqkx4tPMofRHfhJQDzjIIVZox5jFEhTSfwFDV17GVYa6D8kjw=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=flUbnsCW+0mvnMGwioDQSItKyBusXfs5ly2wFg0MCQm02ZB/v3YnuDJ8Zg+ptANUrgPpZpQgKhgDC6fDzwKe3wSNFo+zdkvugP7ATEcpT6fXAFXTBTnM0ZlO+W1IIOrhl7JvSQLuvbKvWE61J7vvhgCTc5f1a+Po2n0p3yNQkZvWm05FFzCWAYZp4/hMNCEokI/eDfLCidvyMuDxY4d5oYfBRw9HXW4net/mrhTTThZkrMPx5PlJYGgteScDh/7SJ5abIt1oA2ylBhCeTtQeF5r9gBGIJjAqEcNt9GvEzCcj1ypi12qRSM7w+kEMidmdj2F+kr4sB4Ih58VC/3CrOA==;
On Wed, 27 Aug 2014, Thomas Capricelli wrote:
Currently the unsupported LevenbergMarquardt module uses expressions of
the form |std::sqrt(ex)|. This is a problem if the type of |ex| is not
float or double. This pull request resolves this issue and allows
LevenbergMarquardt to be used with unsupported types such as mpreal.
Ok, sure. I just dont understand the need for sqrt_(). How different from
std::sqrt() is it ... ?
Sorry, I should probably have waited for your feedback instead of jumping
the gun and merging it.
The definition of sqrt_() is
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.
Jitse