fixed derivatives for transforms again

release/4.3a0
Alex Cunningham 2010-09-27 15:08:51 +00:00
parent 87465cb04b
commit fd5134b06d
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ namespace gtsam {
/* ************************************************************************* */
Point2 Point2::transform_from(const Point2& point,
boost::optional<Matrix&> H1, boost::optional<Matrix&> H2) const {
if (H1) *H1 = -eye(2);
if (H1) *H1 = eye(2);
if (H2) *H2 = eye(2);
return point + *this;
}

View File

@ -46,7 +46,7 @@ TEST( Point2, norm)
/* ************************************************************************* */
Point2 transform_from_proxy(const Point2& pose, const Point2& point) {
return pose.transform_to(point);
return pose.transform_from(point);
}
/* ************************************************************************* */
@ -54,7 +54,7 @@ Point2 transform_to_proxy(const Point2& pose, const Point2& point) {
return pose.transform_to(point);
}
Point2 offset(3.0, 4.0), pt(5.0, 6.0);
Point2 offset(3.0, 4.0), pt(-5.0, 6.0);
/* ************************************************************************* */
TEST( Point2, transforms ) {