get dimension of prior factor with traits

release/4.3a0
Christian Forster 2014-12-01 12:10:45 -05:00
parent 1f171cf1a1
commit c472c86730
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ namespace gtsam {
/** vector of errors */
Vector evaluateError(const T& p, boost::optional<Matrix&> H = boost::none) const {
if (H) (*H) = eye(p.dim());
if (H) (*H) = eye(traits::dimension<T>());
// manifold equivalent of h(x)-z -> log(z,h(x))
DefaultChart<T> chart;
return chart.local(prior_,p);