10 #include <gtest/gtest.h> 23 {1.0, .0, 1.0, 1.0, 0.0},
24 {10.0, .0, 10.0, 1.0, 0.0}};
28 {0.0, 1.0, 0.0, 1.0, -0.5},
29 {0.0, 4.0, 0.0, 1.0, -0.125},
30 {0.0, 9.0, 0.0, 1.0, -0.0555556},
31 {1.0, 1.0, 0.828427, 0.707107, -0.176777},
32 {1.0, 4.0, 0.944272, 0.894427, -0.0894427},
33 {1.0, 9.0, 0.973666, 0.948683, -0.0474342},
34 {4.0, 1.0, 2.47214, 0.447214, -0.0447214},
35 {4.0, 4.0, 3.31371, 0.707107, -0.0441942},
36 {4.0, 9.0, 3.63331, 0.83205, -0.0320019}};
38 template <TRobustKernelType KERNEL_TYPE>
43 for (
size_t i = 0; i < N; i++)
45 const double e2 = table[i][0];
46 const double param2 = table[i][1];
49 rKernel.param_sq = param2;
50 double r2 = rKernel.eval(e2, rhop, rhopp);
52 const double expected_r2 = table[i][2];
53 const double expected_rhop = table[i][3];
54 const double expected_rhopp = table[i][4];
62 TEST(RobustKernels, PlainLeastSquares)
69 TEST(RobustKernels, PseudoHuber)
const double list_test_kernel_pshb[][5]
void tester_robust_kernel(const double table[][5], const size_t N)
This base provides a set of functions for maths stuff.
const double list_test_kernel_none[][5]
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
EXPECT_NEAR(out.cam_params.rightCameraPose.x, 0.1194, 0.005)
TEST(RobustKernels, PlainLeastSquares)