diff --git a/gtsam/nonlinear/Expression-inl.h b/gtsam/nonlinear/Expression-inl.h index 08dd18ee3..a87d9896e 100644 --- a/gtsam/nonlinear/Expression-inl.h +++ b/gtsam/nonlinear/Expression-inl.h @@ -455,9 +455,7 @@ struct Jacobian { /// meta-function to generate JacobianTA optional reference template struct OptionalJacobian { - typedef Eigen::Matrix::value, - traits::dimension::value> Jacobian; - typedef boost::optional type; + typedef FixedRef::value, traits::dimension::value> type; }; /** diff --git a/gtsam/nonlinear/Expression.h b/gtsam/nonlinear/Expression.h index d44d21cd7..940ad1778 100644 --- a/gtsam/nonlinear/Expression.h +++ b/gtsam/nonlinear/Expression.h @@ -224,9 +224,8 @@ template struct apply_compose { typedef T result_type; static const int Dim = traits::dimension::value; - typedef Eigen::Matrix Jacobian; - T operator()(const T& x, const T& y, boost::optional H1, - boost::optional H2) const { + T operator()(const T& x, const T& y, FixedRef H1 = boost::none, + FixedRef H2 = boost::none) const { return x.compose(y, H1, H2); } };