Verified Commit 36bcffd9 authored by Justin Carpentier's avatar Justin Carpentier Committed by Justin Carpentier
Browse files

[Math/AutoDiff] Add common sqrt

parent 39378677
......@@ -158,7 +158,7 @@ namespace se3
const Eigen::MatrixBase<ConfigVectorIn1> & q0,
const Eigen::MatrixBase<ConfigVectorIn2> & q1)
{
return std::sqrt(squaredDistance<LieGroup_t,Scalar,Options,JointCollectionTpl,ConfigVectorIn1,ConfigVectorIn2>(model, q0.derived(), q1.derived()).sum());
return math::sqrt(squaredDistance<LieGroup_t,Scalar,Options,JointCollectionTpl,ConfigVectorIn1,ConfigVectorIn2>(model, q0.derived(), q1.derived()).sum());
}
template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorIn1, typename ConfigVectorIn2>
......@@ -167,7 +167,7 @@ namespace se3
const Eigen::MatrixBase<ConfigVectorIn1> & q0,
const Eigen::MatrixBase<ConfigVectorIn2> & q1)
{
return std::sqrt(squaredDistance<LieGroupMap,Scalar,Options,JointCollectionTpl,ConfigVectorIn1,ConfigVectorIn2>(model, q0.derived(), q1.derived()).sum());
return math::sqrt(squaredDistance<LieGroupMap,Scalar,Options,JointCollectionTpl,ConfigVectorIn1,ConfigVectorIn2>(model, q0.derived(), q1.derived()).sum());
}
template<typename LieGroup_t,typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorIn1, typename ConfigVectorIn2>
......
......@@ -56,8 +56,11 @@ namespace se3
namespace math
{
using std::fabs;
using std::sqrt;
#ifdef PINOCCHIO_WITH_CPPAD_SUPPORT
using CppAD::fabs;
using CppAD::sqrt;
#endif
}
}
......
......@@ -284,7 +284,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return 2.*sqrt(sqrt(Eigen::NumTraits<Scalar>::epsilon()));
}
......
......@@ -526,7 +526,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return 2.*sqrt(sqrt(Eigen::NumTraits<Scalar>::epsilon()));
}
......
......@@ -517,7 +517,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return sqrt(Eigen::NumTraits<Scalar>::epsilon());
}
......
......@@ -557,7 +557,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return sqrt(Eigen::NumTraits<Scalar>::epsilon());
}
......
......@@ -531,7 +531,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return 2.*sqrt(sqrt(Eigen::NumTraits<Scalar>::epsilon()));
}
......
......@@ -149,7 +149,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return 2.*sqrt(sqrt(Eigen::NumTraits<Scalar>::epsilon()));
}
......
......@@ -627,7 +627,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return 2.*sqrt(sqrt(Eigen::NumTraits<Scalar>::epsilon()));
}
......
......@@ -411,7 +411,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return 2.*sqrt(sqrt(Eigen::NumTraits<Scalar>::epsilon()));
}
......
......@@ -482,7 +482,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return 2.*sqrt(sqrt(Eigen::NumTraits<Scalar>::epsilon()));
}
......
......@@ -546,7 +546,7 @@ namespace se3
Scalar finiteDifferenceIncrement() const
{
using std::sqrt;
using math::sqrt;
return sqrt(Eigen::NumTraits<Scalar>::epsilon());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment