minor
parent
df8dc1f99c
commit
94c2490b6f
|
@ -70,7 +70,8 @@ struct is_manifold: public boost::false_type {
|
|||
// defaults to dynamic, TODO makes sense ?
|
||||
typedef boost::integral_constant<int, Eigen::Dynamic> Dynamic;
|
||||
template<typename T>
|
||||
struct dimension: public Dynamic {
|
||||
//struct dimension: public Dynamic {
|
||||
struct dimension : public boost::integral_constant<int, 1> { // just temporary fix to minimize compiler errors while refactoring
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,7 +41,7 @@ template<typename T>
|
|||
struct dimension;
|
||||
}
|
||||
template <typename T> struct traits_x {
|
||||
// todo: remove anything in here ASAP.
|
||||
// TODO: remove anything in here ASAP.
|
||||
// This is just here during development to avoid compilation
|
||||
// errors while implmenting traits for everything.
|
||||
enum { dimension = traits::dimension<T>::value };
|
||||
|
|
|
@ -195,9 +195,9 @@ inline Matrix numericalDerivative21(Y (*h)(const X1&, const X2&), const X1& x1,
|
|||
template<class Y, class X1, class X2>
|
||||
Matrix numericalDerivative22(boost::function<Y(const X1&, const X2&)> h,
|
||||
const X1& x1, const X2& x2, double delta = 1e-5) {
|
||||
BOOST_STATIC_ASSERT_MSG(traits::is_manifold<Y>::value,
|
||||
"Template argument Y must be a manifold type.");
|
||||
BOOST_STATIC_ASSERT_MSG(traits::is_manifold<X2>::value,
|
||||
BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits_x<X1>::structure_category>::value),
|
||||
"Template argument X1 must be a manifold type.");
|
||||
BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits_x<X2>::structure_category>::value),
|
||||
"Template argument X2 must be a manifold type.");
|
||||
return numericalDerivative11<Y, X2>(boost::bind(h, x1, _1), x2, delta);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue