diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-10-25 10:15:22 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-10-25 10:15:22 -0400 |
commit | 4716040703be1ee906439385d20475dcddad5ce3 (patch) | |
tree | 8efd3cf3007d8360e66f38e2d280127cbb70daa6 /unsupported/Eigen/AdolcForward | |
parent | ca85a1f6c5fc33ac382aa2d7ba2da63d55d3223e (diff) |
bug #86 : use internal:: namespace instead of ei_ prefix
Diffstat (limited to 'unsupported/Eigen/AdolcForward')
-rw-r--r-- | unsupported/Eigen/AdolcForward | 32 |
1 files changed, 18 insertions, 14 deletions
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<adtl::adouble> 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); |