From 3d9d29d1c52779161d242e23c67f4ab3a1807ece Mon Sep 17 00:00:00 2001 From: dellaert Date: Fri, 28 Nov 2014 01:56:56 +0100 Subject: [PATCH] Now only accept functiosn that use new FixedRef type --- gtsam/nonlinear/Expression-inl.h | 4 +--- gtsam/nonlinear/Expression.h | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) 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); } };