From 89dc6399e26bda00be7ac0b2570c79483890f665 Mon Sep 17 00:00:00 2001 From: lvzhaoyang Date: Tue, 23 Jun 2015 03:16:01 -0400 Subject: [PATCH] fix: correct a stupid test typo error. Jacobian is always fine, no issue --- gtsam/geometry/tests/testCal3_S2.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/gtsam/geometry/tests/testCal3_S2.cpp b/gtsam/geometry/tests/testCal3_S2.cpp index 668b69a55..8272760ef 100644 --- a/gtsam/geometry/tests/testCal3_S2.cpp +++ b/gtsam/geometry/tests/testCal3_S2.cpp @@ -80,26 +80,20 @@ Point2 calibrate_(const Cal3_S2& k, const Point2& pt) {return k.calibrate(pt); TEST(Cal3_S2, Dcalibrate1) { Matrix computed; - Point2 expected = K.calibrate(p_uv, computed, boost::none); - Matrix numerical = numericalDerivative21(calibrate_, K, p); - CHECK(assert_equal(numerical, computed, 1e-8)); + Point2 expected = K.calibrate2(p_uv, computed, boost::none); + Matrix numerical = numericalDerivative21(calibrate_, K, p_uv); CHECK(assert_equal(expected, p_xy, 1e-8)); -} - -/* ************************************************************************* */ -TEST(Cal3_S2, Dcalibrate1) -{ - Matrix computed; - Point2 expected = K.calibrate(p_uv, boost::none, computed); - Matrix numerical = numericalDerivative22(calibrate_, K, p); CHECK(assert_equal(numerical, computed, 1e-8)); - CHECK(assert_equal(expected, p_xy, 1e-8)); } /* ************************************************************************* */ TEST(Cal3_S2, Dcalibrate2) { - + Matrix computed; + Point2 expected = K.calibrate2(p_uv, boost::none, computed); + Matrix numerical = numericalDerivative22(calibrate_, K, p_uv); + CHECK(assert_equal(expected, p_xy, 1e-8)); + CHECK(assert_equal(numerical, computed, 1e-8)); } /* ************************************************************************* */