From 4716040703be1ee906439385d20475dcddad5ce3 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 25 Oct 2010 10:15:22 -0400 Subject: bug #86 : use internal:: namespace instead of ei_ prefix --- unsupported/Eigen/AdolcForward | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'unsupported/Eigen/AdolcForward') diff --git a/unsupported/Eigen/AdolcForward b/unsupported/Eigen/AdolcForward index 8f1a00d20..1ecf98794 100644 --- a/unsupported/Eigen/AdolcForward +++ b/unsupported/Eigen/AdolcForward @@ -66,7 +66,7 @@ namespace Eigen { * see https://projects.coin-or.org/ADOL-C for more information. * It mainly consists in: * - a struct Eigen::NumTraits specialization - * - overloads of ei_* math function for adtl::adouble type. + * - overloads of internal::* math function for adtl::adouble type. * * Note that the maximal number of directions is controlled by * the preprocessor token NUMBER_DIRECTIONS. The default is 2. @@ -80,21 +80,25 @@ namespace Eigen { } // namespace Eigen // the Adolc's type adouble is defined in the adtl namespace -// therefore, the following ei_* functions *must* be defined +// therefore, the following internal::* functions *must* be defined // in the same namespace namespace adtl { - inline const adouble& ei_conj(const adouble& x) { return x; } - inline const adouble& ei_real(const adouble& x) { return x; } - inline adouble ei_imag(const adouble&) { return 0.; } - inline adouble ei_abs(const adouble& x) { return fabs(x); } - inline adouble ei_abs2(const adouble& x) { return x*x; } - inline adouble ei_sqrt(const adouble& x) { return sqrt(x); } - inline adouble ei_exp(const adouble& x) { return exp(x); } - inline adouble ei_log(const adouble& x) { return log(x); } - inline adouble ei_sin(const adouble& x) { return sin(x); } - inline adouble ei_cos(const adouble& x) { return cos(x); } - inline adouble ei_pow(const adouble& x, adouble y) { return pow(x, y); } + namespace internal { + + inline const adouble& internal::conj(const adouble& x) { return x; } + inline const adouble& internal::real(const adouble& x) { return x; } + inline adouble internal::imag(const adouble&) { return 0.; } + inline adouble internal::abs(const adouble& x) { return fabs(x); } + inline adouble internal::abs2(const adouble& x) { return x*x; } + inline adouble internal::sqrt(const adouble& x) { return sqrt(x); } + inline adouble internal::exp(const adouble& x) { return exp(x); } + inline adouble internal::log(const adouble& x) { return log(x); } + inline adouble internal::sin(const adouble& x) { return sin(x); } + inline adouble internal::cos(const adouble& x) { return cos(x); } + inline adouble internal::pow(const adouble& x, adouble y) { return pow(x, y); } + + } } @@ -140,7 +144,7 @@ public: void operator() (const InputType& x, ValueType* v, JacobianType* _jac) const { - ei_assert(v!=0); + eigen_assert(v!=0); if (!_jac) { Functor::operator()(x, v); -- cgit v1.2.3