diff options
author | Gael Guennebaud <g.gael@free.fr> | 2012-11-06 15:25:50 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2012-11-06 15:25:50 +0100 |
commit | a76fbbf39777827200455477a9e3557b6063913f (patch) | |
tree | 6a03f8fcb163fa2c3dc2267c52fd1204f5490309 /unsupported/Eigen/src/NumericalDiff | |
parent | 959ef37006e60f68b9a9e667bf9da2e14eb0e8af (diff) |
Fix bug #314:
- remove most of the metaprogramming kung fu in MathFunctions.h (only keep functions that differs from the std)
- remove the overloads for array expression that were in the std namespace
Diffstat (limited to 'unsupported/Eigen/src/NumericalDiff')
-rw-r--r-- | unsupported/Eigen/src/NumericalDiff/NumericalDiff.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h index d848cb407..7ee30e18c 100644 --- a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h +++ b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h @@ -63,11 +63,13 @@ public: */ int df(const InputType& _x, JacobianType &jac) const { + using std::sqrt; + using std::abs; /* Local variables */ Scalar h; int nfev=0; const typename InputType::Index n = _x.size(); - const Scalar eps = internal::sqrt(((std::max)(epsfcn,NumTraits<Scalar>::epsilon() ))); + const Scalar eps = sqrt(((std::max)(epsfcn,NumTraits<Scalar>::epsilon() ))); ValueType val1, val2; InputType x = _x; // TODO : we should do this only if the size is not already known @@ -89,7 +91,7 @@ public: // Function Body for (int j = 0; j < n; ++j) { - h = eps * internal::abs(x[j]); + h = eps * abs(x[j]); if (h == 0.) { h = eps; } |