pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
taylor-expansion.hpp
1//
2// Copyright (c) 2018-2021 INRIA
3//
4
5#ifndef __pinocchio_math_taylor_expansion_hpp__
6#define __pinocchio_math_taylor_expansion_hpp__
7
8#include "pinocchio/math/fwd.hpp"
9#include <limits>
10
11namespace pinocchio
12{
13
20 template<typename Scalar>
22 {
30 template<int degree>
31 static Scalar precision()
32 {
33 static Scalar value =
34 math::pow(std::numeric_limits<Scalar>::epsilon(), Scalar(1) / Scalar(degree + 1));
35 return value;
36 }
37
38 static Scalar precision(const int degree)
39 {
40 return math::pow(std::numeric_limits<Scalar>::epsilon(), Scalar(1) / Scalar(degree + 1));
41 }
42 }; // struct TaylorSeriesExpansion
43
44} // namespace pinocchio
45
46#endif // ifndef __pinocchio_math_taylor_expansion_hpp__
Main pinocchio namespace.
Definition treeview.dox:11
static Scalar precision()
Computes the expected tolerance of the argument of a Taylor series expansion for a certain degree acc...