Go to the documentation of this file.
10 #ifndef EIGEN_FINITEDIFF_CHAIN_JACOBIAN_H_
11 #define EIGEN_FINITEDIFF_CHAIN_JACOBIAN_H_
20 template <
typename Functor, NumericalDiffMode mode = Forward>
26 typedef typename ValueType::Scalar
Scalar;
35 typedef Matrix<Scalar, ValuesAtCompileTime, JacobianInputsAtCompileTime>
JacobianType;
37 typedef typename JacobianType::Index
Index;
48 #if EIGEN_HAS_VARIADIC_TEMPLATES
49 template <
typename... T>
53 template <
typename... T>
58 template <
typename T0>
62 template <
typename T0,
typename T1>
66 template <
typename T0,
typename T1,
typename T2>
71 template <
typename T0>
75 template <
typename T0,
typename T1>
79 template <
typename T0,
typename T1,
typename T2>
85 #if EIGEN_HAS_VARIADIC_TEMPLATES
97 template <
typename... ParamsType>
106 template <
typename... ParamsType>
126 const typename InputJacobianRowType::Index
n = _jx.size();
127 const Scalar eps = sqrt(((std::max)(
epsfcn_, NumTraits<Scalar>::epsilon())));
133 val1.resize(v.rows());
134 val2.resize(v.rows());
137 #if EIGEN_HAS_VARIADIC_TEMPLATES
139 Functor::operator()(
x, v, Params...);
143 Functor::operator()(
x, v);
161 for (
int j = 0; j <
n; ++j)
163 h = eps * abs(jx[j]);
172 #if EIGEN_HAS_VARIADIC_TEMPLATES
174 Functor::operator()(
x, val2, Params...);
178 Functor::operator()(
x, val2);
182 jac.col(j) = (val2 - val1) / h;
186 #if EIGEN_HAS_VARIADIC_TEMPLATES
188 Functor::operator()(
x, val2, Params...);
192 Functor::operator()(
x, val2);
196 #if EIGEN_HAS_VARIADIC_TEMPLATES
198 Functor::operator()(
x, val1, Params...);
202 Functor::operator()(
x, val1);
206 jac.col(j) = (val2 - val1) / (2 * h);
217 #endif // EIGEN_FINITEDIFF_CHAIN_JACOBIAN_H_
std::function< void(const InputJacobianRowType &, InputType &)> UpdateFunctionCallbackType
FiniteDiffChainJacobian(const Functor &f, Scalar epsfcn=0.)
JacobianType::Index Index
FunctorBase< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic > Functor
Matrix< Scalar, ValuesAtCompileTime, JacobianInputsAtCompileTime > JacobianType
Functor::ValueType ValueType
FiniteDiffChainJacobian(const T0 &a0, Scalar epsfcn=0.)
void update(const std::string &key, const XmlRpc::XmlRpcValue &v)
FiniteDiffChainJacobian(UpdateFunctionCallbackType update, Scalar epsfcn=0., const T0 &a0, const T1 &a1, const T2 &a2)
Functor::InputType InputType
int operator()(const InputJacobianRowType &_jx, ValueType &v, JacobianType &jac) const
Matrix< Scalar, JacobianInputsAtCompileTime, 1 > InputJacobianRowType
FiniteDiffChainJacobian(const T0 &a0, const T1 &a1, const T2 &a2, Scalar epsfcn=0.)
FiniteDiffChainJacobian(const Functor &f, UpdateFunctionCallbackType update, Scalar epsfcn=0.)
EIGEN_STRONG_INLINE int operator()(const InputJacobianRowType &_jx, ValueType &v) const
FiniteDiffChainJacobian(UpdateFunctionCallbackType update, Scalar epsfcn=0., const T0 &a0, const T1 &a1)
FiniteDiffChainJacobian(UpdateFunctionCallbackType update, Scalar epsfcn=0., const T0 &a0)
FiniteDiffChainJacobian(const T0 &a0, const T1 &a1, Scalar epsfcn=0.)
UpdateFunctionCallbackType update_
@ JacobianInputsAtCompileTime
FiniteDiffChainJacobian(Scalar epsfcn=0.)
exotica_core
Author(s): Yiming Yang, Michael Camilleri
autogenerated on Fri Aug 2 2024 08:43:02