10 #ifndef EIGEN_AUTODIFF_JACOBIAN_H 11 #define EIGEN_AUTODIFF_JACOBIAN_H 25 template<
typename T0,
typename T1>
27 template<
typename T0,
typename T1,
typename T2>
38 typedef typename JacobianType::Scalar
Scalar;
39 typedef typename JacobianType::Index
Index;
48 void operator() (
const InputType& x, ValueType*
v, JacobianType* _jac=0)
const 53 Functor::operator()(x, v);
57 JacobianType& jac = *_jac;
59 ActiveInput ax = x.template cast<ActiveScalar>();
60 ActiveValue av(jac.rows());
63 for (Index j=0; j<jac.rows(); j++)
64 av[j].derivatives().resize(this->inputs());
66 for (Index i=0; i<jac.cols(); i++)
67 ax[i].derivatives() = DerivativeType::Unit(this->inputs(),i);
69 Functor::operator()(ax, &av);
71 for (Index i=0; i<jac.rows(); i++)
73 (*v)[i] = av[i].value();
74 jac.row(i) = av[i].derivatives();
83 #endif // EIGEN_AUTODIFF_JACOBIAN_H
AutoDiffJacobian(const T0 &a0)
JacobianType::Index Index
Matrix< ActiveScalar, ValuesAtCompileTime, 1 > ActiveValue
A scalar type replacement with automatic differentation capability.
AutoDiffJacobian(const Functor &f)
iterative scaling algorithm to equilibrate rows and column norms in matrices
AutoDiffScalar< DerivativeType > ActiveScalar
Matrix< ActiveScalar, InputsAtCompileTime, 1 > ActiveInput
Functor::InputType InputType
Matrix< Scalar, InputsAtCompileTime, 1 > DerivativeType
AutoDiffJacobian(const T0 &a0, const T1 &a1, const T2 &a2)
Functor::ValueType ValueType
void operator()(const InputType &x, ValueType *v, JacobianType *_jac=0) const
JacobianType::Scalar Scalar
AutoDiffJacobian(const T0 &a0, const T1 &a1)
Functor::JacobianType JacobianType
The matrix class, also used for vectors and row-vectors.