32 constexpr int dimensions = 3;
58 Eigen::VectorXd inValues(9);
59 inValues << 1.0, 0.0, 0.0,
63 Eigen::VectorXd outValues(18);
64 outValues = Eigen::VectorXd::Zero(18);
69 mapping.
map(inSample, outValues);
76 BOOST_TEST(outValues(0) == inSample.values(0));
77 BOOST_TEST(outValues(1) == inSample.values(1));
78 BOOST_TEST(outValues(2) == inSample.values(2));
81 BOOST_TEST(outValues(3) == inSample.values(0));
82 BOOST_TEST(outValues(4) == inSample.values(1));
83 BOOST_TEST(outValues(5) == inSample.values(2));
86 BOOST_TEST(outValues(6) == inSample.values(3));
87 BOOST_TEST(outValues(7) == inSample.values(4));
88 BOOST_TEST(outValues(8) == inSample.values(5));
91 BOOST_TEST(outValues(9) == inSample.values(3));
92 BOOST_TEST(outValues(10) == inSample.values(4));
93 BOOST_TEST(outValues(11) == inSample.values(5));
96 BOOST_TEST(outValues(12) == inSample.values(6));
97 BOOST_TEST(outValues(13) == inSample.values(7));
98 BOOST_TEST(outValues(14) == inSample.values(8));
101 BOOST_TEST(outValues(15) == inSample.values(6));
102 BOOST_TEST(outValues(16) == inSample.values(7));
103 BOOST_TEST(outValues(17) == inSample.values(8));
116 constexpr int dimensions = 3;
142 Eigen::VectorXd inValues(9);
143 inValues << 1.0, 0.0, 0.0,
147 Eigen::VectorXd outValues(18);
148 outValues = Eigen::VectorXd::Zero(18);
152 mapping.
map(inSample, outValues);
158 BOOST_TEST(outValues(0) == inSample.values(0));
159 BOOST_TEST(outValues(1) == inSample.values(1));
160 BOOST_TEST(outValues(2) == inSample.values(2));
163 BOOST_TEST(outValues(3) == inSample.values(0));
164 BOOST_TEST(outValues(4) == inSample.values(1));
165 BOOST_TEST(outValues(5) == inSample.values(2));
168 BOOST_TEST(outValues(6) == inSample.values(3));
169 BOOST_TEST(outValues(7) == inSample.values(4));
170 BOOST_TEST(outValues(8) == inSample.values(5));
173 BOOST_TEST(outValues(9) == inSample.values(3));
174 BOOST_TEST(outValues(10) == inSample.values(4));
175 BOOST_TEST(outValues(11) == inSample.values(5));
178 BOOST_TEST(outValues(12) == inSample.values(6));
179 BOOST_TEST(outValues(13) == inSample.values(7));
180 BOOST_TEST(outValues(14) == inSample.values(8));
183 BOOST_TEST(outValues(15) == inSample.values(6));
184 BOOST_TEST(outValues(16) == inSample.values(7));
185 BOOST_TEST(outValues(16) == inSample.values(8));
198 constexpr int dimensions = 3;
224 Eigen::VectorXd inValues(18);
225 inValues << 1.0, 0.0, 0.0,
232 Eigen::VectorXd outValues(9);
233 outValues = Eigen::VectorXd::Zero(9);
237 mapping.
map(inSample, outValues);
243 BOOST_TEST(outValues(0) == (inSample.values(0) + inSample.values(3)) / 2);
244 BOOST_TEST(outValues(1) == 0.0);
245 BOOST_TEST(outValues(2) == 0.0);
248 BOOST_TEST(outValues(3) == (inSample.values(6) + inSample.values(9)) / 2);
249 BOOST_TEST(outValues(4) == 0.0);
250 BOOST_TEST(outValues(5) == 0.0);
253 BOOST_TEST(outValues(6) == (inSample.values(12) + inSample.values(15)) / 2);
254 BOOST_TEST(outValues(7) == 0.0);
255 BOOST_TEST(outValues(8) == 0.0);
267 constexpr int dimensions = 3;
293 Eigen::VectorXd inValues(18);
294 inValues << 1.0, 0.0, 0.0,
301 Eigen::VectorXd outValues(9);
302 outValues = Eigen::VectorXd::Zero(9);
306 mapping.
map(inSample, outValues);
312 BOOST_TEST(outValues(0) == (inSample.values(0) + inSample.values(3)) / 2);
313 BOOST_TEST(outValues(1) == 0.0);
314 BOOST_TEST(outValues(2) == 0.0);
317 BOOST_TEST(outValues(3) == (inSample.values(6) + inSample.values(9)) / 2);
318 BOOST_TEST(outValues(4) == 0.0);
319 BOOST_TEST(outValues(5) == 0.0);
322 BOOST_TEST(outValues(6) == (inSample.values(12) + inSample.values(15)) / 2);
323 BOOST_TEST(outValues(7) == 0.0);
324 BOOST_TEST(outValues(8) == 0.0);
boost::test_tools::predicate_result equals(const std::vector< float > &VectorA, const std::vector< float > &VectorB, float tolerance)
equals to be used in tests. Compares two std::vectors using a given tolerance. Prints both operands o...