Go to the documentation of this file.
5 #ifndef __pinocchio_autodiff_cppad_hpp__
6 #define __pinocchio_autodiff_cppad_hpp__
9 #define PINOCCHIO_WITH_CPPAD_SUPPORT
16 #define EIGEN_MATRIXBASE_PLUGIN <pinocchio/autodiff/cppad/math/eigen_plugin.hpp>
18 #include <cppad/cppad.hpp>
19 #include <Eigen/Dense>
29 template<
typename Scalar>
30 struct constant_pi<
CppAD::AD<Scalar> > : constant_pi<Scalar>
37 return ADScalar(constant_pi<Scalar>::get(
n));
40 #if BOOST_VERSION >= 107700
41 template <
class T, T value>
42 static inline ADScalar get(
const std::integral_constant<T, value> &
n)
44 return ADScalar(constant_pi<Scalar>::get(
n));
47 template <
class T, T value>
48 static inline ADScalar get(
const boost::integral_constant<T, value> &
n)
50 return ADScalar(constant_pi<Scalar>::get(
n));
64 template<
typename Scalar>
67 #if EIGEN_VERSION_AT_LEAST(3,2,90)
70 static inline Scalar run(
const CppAD::AD<Scalar> & x)
72 return CppAD::Value(
x);
81 template <
class Base>
struct NumTraits<
CppAD::AD<Base> >
83 typedef CppAD::AD<Base>
Real;
99 RequireInitialization = 1 ,
109 {
return CppAD::numeric_limits< CppAD::AD<Base> >::epsilon(); }
115 CppAD::numeric_limits< CppAD::AD<Base> >::epsilon();
120 {
return CppAD::numeric_limits< CppAD::AD<Base> >
::min(); }
124 {
return CppAD::numeric_limits< CppAD::AD<Base> >
::max(); }
128 {
return CppAD::numeric_limits< CppAD::AD<Base> >::digits10; }
139 template <
class Base>
const AD<Base>&
conj(
const AD<Base>& x)
141 template <
class Base>
const AD<Base>&
real(
const AD<Base>& x)
145 template <
class Base> AD<Base>
imag(
const AD<Base>& )
146 {
return CppAD::AD<Base>(0.); }
147 template <
class Base> AD<Base>
abs2(
const AD<Base>& x)
150 template<
typename Scalar>
151 AD<Scalar>
min(
const AD<Scalar>& x,
const AD<Scalar>& y)
158 template<
typename Scalar>
159 AD<Scalar>
max(
const AD<Scalar>& x,
const AD<Scalar>& y)
172 template<
typename Scalar>
181 return ADScalar(Base::template precision<degree>());
189 #include "pinocchio/autodiff/cppad/spatial/log.hxx"
195 #endif // #ifndef __pinocchio_autodiff_cppad_hpp__
static ADScalar precision()
AD< Base > imag(const AD< Base > &)
static CppAD::AD< Base > lowest(void)
static ADScalar get(const mpl::int_< N > &n)
AD< Base > abs2(const AD< Base > &x)
static CppAD::AD< Base > dummy_precision(void)
static CppAD::AD< Base > epsilon(void)
CppAD::AD< Scalar > ADScalar
CppAD::AD< Base > NonInteger
CppAD::AD< Scalar > ADScalar
static int digits10(void)
static Scalar run(const CppAD::AD< Scalar > &x)
const AD< Base > & conj(const AD< Base > &x)
const AD< Base > & real(const AD< Base > &x)
static ADScalar get(const boost::integral_constant< T, value > &n)
static CppAD::AD< Base > highest(void)
AD< Scalar > min(const AD< Scalar > &x, const AD< Scalar > &y)
if_then_else_impl< LhsType, RhsType, ThenType, ElseType >::ReturnType if_then_else(const ComparisonOperators op, const LhsType &lhs_value, const RhsType &rhs_value, const ThenType &then_value, const ElseType &else_value)
AD< Scalar > max(const AD< Scalar > &x, const AD< Scalar > &y)
CppAD::AD< Base > Literal
TaylorSeriesExpansion< Scalar > Base
#define EIGEN_DEVICE_FUNC
Main pinocchio namespace.
pinocchio
Author(s):
autogenerated on Tue Feb 13 2024 03:43:58