update unit test to also check for GaussianBayesNet::logNormalizationConstant

release/4.3a0
Varun Agrawal 2024-08-20 16:45:19 -04:00
parent 8d54c4abe0
commit a78ffe19e8
1 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,8 @@ TEST(GaussianBayesNet, Evaluate1) {
smallBayesNet.at(0)->logNormalizationConstant() +
smallBayesNet.at(1)->logNormalizationConstant(),
1e-9);
EXPECT_DOUBLES_EQUAL(log(constant), smallBayesNet.logNormalizationConstant(),
1e-9);
const double actual = smallBayesNet.evaluate(mean);
EXPECT_DOUBLES_EQUAL(constant, actual, 1e-9);
}