using chart.getDimsion() instead of traits::dim

release/4.3a0
Christian Forster 2014-12-01 21:18:09 -05:00
parent 0fcd76c9fd
commit 1d7c895031
1 changed files with 2 additions and 2 deletions

View File

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