Skip to content

Commit

Permalink
fix some regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed Jan 9, 2025
1 parent 41280d4 commit d4726cf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions gtsam/hybrid/tests/testHybridBayesNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ TEST(HybridBayesNet, Sampling) {
expected.insert({X(1), Vector1(-0.526464)});
#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)));
}

Expand Down
2 changes: 1 addition & 1 deletion gtsam/linear/tests/testGaussianConditional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ TEST(GaussianConditional, Print) {
" d = [ 20 40 ]\n"
" mean: 1 elements\n"
" x0: 20 40\n"
" logNormalizationConstant: -4.03510164\n"
" logNormalizationConstant: -4.0351\n"
"isotropic dim=2 sigma=3\n";
EXPECT(assert_print_equal(expected, conditional, "GaussianConditional"));

Expand Down
16 changes: 8 additions & 8 deletions gtsam/sfm/tests/testShonanAveraging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ TEST(ShonanAveraging3, CheckWithEigen) {

Matrix expected(4, 4);
#if __APPLE__ || _WIN32
expected << 0.0459224, -0.688689, -0.216922, 0.690321, //
0.92381, 0.191931, 0.255854, 0.21042, //
-0.376669, 0.301589, 0.687953, 0.542111, //
-0.0508588, 0.630804, -0.643587, 0.43046;
expected << 0.145767, -0.938445, 0.135713, -0.282233, //
0.780348, -0.0104323, 0.266238, 0.565743, //
-0.383624, 0.0434887, 0.917211, 0.0983088, //
-0.471849, -0.342523, -0.263482, 0.768514;
#elif __linux__
expected << 0.0459224, -0.688689, -0.216922, 0.690321, //
0.92381, 0.191931, 0.255854, 0.21042, //
-0.376669, 0.301589, 0.687953, 0.542111, //
-0.0508588, 0.630804, -0.643587, 0.43046;
expected << 0.100724, -0.987231, 0.104092, 0.0662867, //
0.571527, 0.0292782, 0.226546, -0.788147, //
-0.349294, 0.064102, 0.93465, 0.0177471, //
0.735667, 0.142857, 0.253519, 0.611649;
#endif

EXPECT(assert_equal(SOn(expected), initialQ4.at<SOn>(0), 1e-5));
Expand Down

0 comments on commit d4726cf

Please sign in to comment.