src/math/fwd.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2019 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_math_fwd_hpp__
6 #define __pinocchio_math_fwd_hpp__
7 
8 #include "pinocchio/fwd.hpp"
9 #include <math.h>
10 #include <boost/math/constants/constants.hpp>
11 
12 namespace pinocchio
13 {
14 
15  template <typename T>
16  struct is_floating_point : boost::is_floating_point<T>
17  {
18  };
19 
25  template<typename Scalar>
26  const Scalar PI()
27  { return boost::math::constants::pi<Scalar>(); }
28 
30  template<typename Scalar> struct TaylorSeriesExpansion;
31 
32  namespace math
33  {
34 
35 #define PINOCCHIO_OVERLOAD_MATH_UNARY_OPERATOR(name) \
36  template<typename Scalar> \
37  Scalar name(const Scalar & value) \
38  { using std::name; return name(value); }
39 
40 #define PINOCCHIO_OVERLOAD_MATH_BINARY_OPERATOR(name) \
41  namespace internal \
42  { \
43  template<typename T1, typename T2> \
44  struct return_type_##name \
45  { \
46  typedef T1 type; \
47  }; \
48  template<typename T1, typename T2> \
49  struct call_##name \
50  { \
51  static inline typename return_type_##name<T1,T2>::type \
52  run(const T1 & a, const T2 & b) \
53  { using std::name; return name(a,b); } \
54  }; \
55  } \
56  template<typename T1, typename T2> \
57  inline typename internal::return_type_##name<T1,T2>::type name(const T1 & a, const T2 & b) \
58  { return internal::call_##name<T1,T2>::run(a,b); }
59 
67 
72  }
73 }
74 
75 #endif //#ifndef __pinocchio_math_fwd_hpp__
JointCollectionTpl const DataTpl< Scalar, Options, JointCollectionTpl > const Eigen::MatrixBase< Mat > & min
Definition: cholesky.hpp:71
#define PINOCCHIO_OVERLOAD_MATH_BINARY_OPERATOR(name)
AD< Scalar > max(const AD< Scalar > &x, const AD< Scalar > &y)
const Scalar PI()
Returns the value of PI according to the template parameters Scalar.
SE3::Scalar Scalar
Definition: conversions.cpp:13
#define PINOCCHIO_OVERLOAD_MATH_UNARY_OPERATOR(name)
Main pinocchio namespace.
Definition: timings.cpp:28


pinocchio
Author(s):
autogenerated on Fri Jun 23 2023 02:38:30