Skip to content
Snippets Groups Projects
Verified Commit 40957141 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

math/taylor-expansion: add support to CppAD and CppADCodeGen

parent 1e524b62
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
#ifndef __pinocchio_math_taylor_expansion_hpp__
#define __pinocchio_math_taylor_expansion_hpp__
#include <cmath>
#include "pinocchio/math/fwd.hpp"
#include <limits>
namespace pinocchio
......@@ -34,6 +34,27 @@ namespace pinocchio
}
}; // struct TaylorSeriesExpansion
#ifdef PINOCCHIO_WITH_CPPAD_SUPPORT
template<typename Scalar>
struct TaylorSeriesExpansion< CppAD::AD<Scalar> > : TaylorSeriesExpansion<Scalar>
{
typedef TaylorSeriesExpansion<Scalar> Base;
using Base::precision;
};
#if defined(PINOCCHIO_WITH_CPPADCG_SUPPORT) && defined(PINOCCHIO_WITH_CXX11_SUPPORT)
template<typename Scalar>
struct TaylorSeriesExpansion< CppAD::cg::CG<Scalar> > : TaylorSeriesExpansion<Scalar>
{
typedef TaylorSeriesExpansion<Scalar> Base;
using Base::precision;
};
#endif
#endif
}
#endif // ifndef __pinocchio_math_taylor_expansion_hpp__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment