From bbf1f16313c3fb801cdbaea4a788fd3e00418003 Mon Sep 17 00:00:00 2001 From: artivis Date: Tue, 19 Mar 2024 10:18:49 +0100 Subject: [PATCH] add some more jacs equality tests Signed-off-by: artivis --- test/common_tester.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/test/common_tester.h b/test/common_tester.h index 113846bb..938e77e1 100644 --- a/test/common_tester.h +++ b/test/common_tester.h @@ -168,7 +168,12 @@ TEST_P(manifold##JacobiansTester, TEST_##manifold##_PLUS_T_JACOBIANS) \ { evalTanPlusTanJac(); } \ TEST_P(manifold##JacobiansTester, TEST_##manifold##_MINUS_T_JACOBIANS) \ - { evalTanMinusTanJac(); } + { evalTanMinusTanJac(); } \ + TEST_P(manifold##JacobiansTester, TEST_##manifold##_JL_MJLINV_ADJ_JACOBIANS) \ + { evalJlmJlinvAjd(); } \ + TEST_P(manifold##JacobiansTester, TEST_##manifold##_JR_JR_COMP_JL_JACOBIANS) \ + { evalJrJrcompJl(); } + #define MANIF_TEST_MAP(manifold) \ @@ -1155,6 +1160,19 @@ class JacobianTester EXPECT_MANIF_NEAR(delta_pert, delta_lin, tol_); } + void evalJlmJlinvAjd() { + const Tangent& delta = getDelta(); + const Tangent mdelta = -delta; + + EXPECT_EIGEN_NEAR(delta.exp().adj(), delta.ljac()*mdelta.ljacinv()); + } + + void evalJrJrcompJl() { + const Tangent& delta = getDelta(); + + EXPECT_EIGEN_NEAR(delta.exp().inverse().adj() * delta.ljac(), (-delta).ljac()); + } + void setOmegaOrder(const double w_order) { w_order_ = w_order; } void setTolerance(const double tol) { tol_ = tol; }