Beispiel #1
0
/* ************************************************************************* */
int main()
{
  int n = 50000000;
  cout << "NOTE:  Times are reported for " << n << " calls" << endl;

  Vector1 v; v << 0.1;
  Rot2 R = Rot2(0.4), R2(0.5), R3(0.6);

  TEST(Rot2_Expmap, Rot2::Expmap(v));
  TEST(Rot2_Retract, R.retract(v));
  TEST(Rot2_Logmap, Rot2::Logmap(R2));
  TEST(Rot2_between, R.between(R2));
  TEST(betweenDefault, Rot2betweenDefault(R, R2));
  TEST(betweenOptimized, Rot2betweenOptimized(R, R2));
  TEST(Rot2_localCoordinates, R.localCoordinates(R2));

  Matrix H1, H2;
  Matrix1 H1f, H2f;
  TEST(Rot2BetweenFactorEvaluateErrorDefault, Rot2BetweenFactorEvaluateErrorDefault(R3, R, R2, H1, H2));
  TEST(Rot2BetweenFactorEvaluateErrorOptimizedBetween, Rot2BetweenFactorEvaluateErrorOptimizedBetween(R3, R, R2, H1, H2));
  TEST(Rot2BetweenFactorEvaluateErrorOptimizedBetweenNoeye, Rot2BetweenFactorEvaluateErrorOptimizedBetweenNoeye(R3, R, R2, H1, H2));
  TEST(Rot2BetweenFactorEvaluateErrorOptimizedBetweenFixed, Rot2BetweenFactorEvaluateErrorOptimizedBetweenFixed(R3, R, R2, H1f, H2f));

  // Print timings
  tictoc_print_();

  return 0;
}
Beispiel #2
0
/* ************************************************************************* */
TEST( Rot2, expmap)
{
  Vector v = zero(1);
  CHECK(assert_equal(R.retract(v), R));
}