From d5378679811d005db8f1007723f22a34c273931a Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Wed, 28 Dec 2022 15:28:50 -0500 Subject: [PATCH] Relaxed test --- gtsam/linear/tests/testGaussianBayesNet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam/linear/tests/testGaussianBayesNet.cpp b/gtsam/linear/tests/testGaussianBayesNet.cpp index 15f0d098a..771a24631 100644 --- a/gtsam/linear/tests/testGaussianBayesNet.cpp +++ b/gtsam/linear/tests/testGaussianBayesNet.cpp @@ -206,14 +206,14 @@ TEST(GaussianBayesNet, MonteCarloIntegration) { gbn.push_back(noisyBayesNet.at(1)); double sum = 0.0; - constexpr size_t N = 500; + constexpr size_t N = 1000; // loop for N samples: for (size_t i = 0; i < N; i++) { const auto X_i = gbn.sample(); sum += pow(X_i[_y_].x() - 5.0, 2.0); } // Expected is variance = 3*3 - EXPECT_DOUBLES_EQUAL(9.0, sum / N, 0.1); + EXPECT_DOUBLES_EQUAL(9.0, sum / N, 0.5); // Pretty high. } /* ************************************************************************* */