Skip to content

Commit

Permalink
add some more jacs equality tests
Browse files Browse the repository at this point in the history
Signed-off-by: artivis <deray.jeremie@gmail.com>
  • Loading branch information
artivis committed Mar 19, 2024
1 parent 5cce04a commit bbf1f16
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion test/common_tester.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down Expand Up @@ -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; }

Expand Down

0 comments on commit bbf1f16

Please sign in to comment.