mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #86 : use internal:: namespace instead of ei_ prefix
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user