Added missing "Lie group" unit tests to Point2

release/4.3a0
Richard Roberts 2011-08-27 00:59:18 +00:00
parent 02b45d5186
commit ee6569db29
1 changed files with 18 additions and 0 deletions

View File

@ -21,6 +21,24 @@
using namespace std;
using namespace gtsam;
/* ************************************************************************* */
TEST(Point2, Lie) {
Point2 p1(1,2);
Point2 p2(4,5);
Matrix H1, H2;
EXPECT(assert_equal(Point2(5,7), p1.compose(p2, H1, H2)));
EXPECT(assert_equal(eye(2), H1));
EXPECT(assert_equal(eye(2), H2));
EXPECT(assert_equal(Point2(3,3), p1.between(p2, H1, H2)));
EXPECT(assert_equal(-eye(2), H1));
EXPECT(assert_equal(eye(2), H2));
EXPECT(assert_equal(Point2(5,7), p1.expmap(Vector_(2, 4.,5.))));
EXPECT(assert_equal(Vector_(2, 3.,3.), p1.logmap(p2)));
}
/* ************************************************************************* */
TEST( Point2, expmap)
{