fix some regressions

release/4.3a0
Varun Agrawal 2025-01-09 08:57:45 -05:00
parent 41280d4d1e
commit d4726cfd1f
3 changed files with 11 additions and 9 deletions

View File

@ -573,6 +573,8 @@ TEST(HybridBayesNet, Sampling) {
expected.insert({X(1), Vector1(-0.526464)}); expected.insert({X(1), Vector1(-0.526464)});
#endif #endif
std::cout << std::setprecision(12);
average_continuous.scale(1.0 / num_samples).print();
EXPECT(assert_equal(expected, average_continuous.scale(1.0 / num_samples))); EXPECT(assert_equal(expected, average_continuous.scale(1.0 / num_samples)));
} }

View File

@ -521,7 +521,7 @@ TEST(GaussianConditional, Print) {
" d = [ 20 40 ]\n" " d = [ 20 40 ]\n"
" mean: 1 elements\n" " mean: 1 elements\n"
" x0: 20 40\n" " x0: 20 40\n"
" logNormalizationConstant: -4.03510164\n" " logNormalizationConstant: -4.0351\n"
"isotropic dim=2 sigma=3\n"; "isotropic dim=2 sigma=3\n";
EXPECT(assert_print_equal(expected, conditional, "GaussianConditional")); EXPECT(assert_print_equal(expected, conditional, "GaussianConditional"));

View File

@ -207,15 +207,15 @@ TEST(ShonanAveraging3, CheckWithEigen) {
Matrix expected(4, 4); Matrix expected(4, 4);
#if __APPLE__ || _WIN32 #if __APPLE__ || _WIN32
expected << 0.0459224, -0.688689, -0.216922, 0.690321, // expected << 0.145767, -0.938445, 0.135713, -0.282233, //
0.92381, 0.191931, 0.255854, 0.21042, // 0.780348, -0.0104323, 0.266238, 0.565743, //
-0.376669, 0.301589, 0.687953, 0.542111, // -0.383624, 0.0434887, 0.917211, 0.0983088, //
-0.0508588, 0.630804, -0.643587, 0.43046; -0.471849, -0.342523, -0.263482, 0.768514;
#elif __linux__ #elif __linux__
expected << 0.0459224, -0.688689, -0.216922, 0.690321, // expected << 0.100724, -0.987231, 0.104092, 0.0662867, //
0.92381, 0.191931, 0.255854, 0.21042, // 0.571527, 0.0292782, 0.226546, -0.788147, //
-0.376669, 0.301589, 0.687953, 0.542111, // -0.349294, 0.064102, 0.93465, 0.0177471, //
-0.0508588, 0.630804, -0.643587, 0.43046; 0.735667, 0.142857, 0.253519, 0.611649;
#endif #endif
EXPECT(assert_equal(SOn(expected), initialQ4.at<SOn>(0), 1e-5)); EXPECT(assert_equal(SOn(expected), initialQ4.at<SOn>(0), 1e-5));