Now only accept functiosn that use new FixedRef type

release/4.3a0
dellaert 2014-11-28 01:56:56 +01:00
parent 1e4905ef04
commit 3d9d29d1c5
2 changed files with 3 additions and 6 deletions

View File

@ -455,9 +455,7 @@ struct Jacobian {
/// meta-function to generate JacobianTA optional reference
template<class T, class A>
struct OptionalJacobian {
typedef Eigen::Matrix<double, traits::dimension<T>::value,
traits::dimension<A>::value> Jacobian;
typedef boost::optional<Jacobian&> type;
typedef FixedRef<traits::dimension<T>::value, traits::dimension<A>::value> type;
};
/**

View File

@ -224,9 +224,8 @@ template<class T>
struct apply_compose {
typedef T result_type;
static const int Dim = traits::dimension<T>::value;
typedef Eigen::Matrix<double, Dim, Dim> Jacobian;
T operator()(const T& x, const T& y, boost::optional<Jacobian&> H1,
boost::optional<Jacobian&> H2) const {
T operator()(const T& x, const T& y, FixedRef<Dim, Dim> H1 = boost::none,
FixedRef<Dim, Dim> H2 = boost::none) const {
return x.compose(y, H1, H2);
}
};