Patch discrete factor graph test to normalize expected result.

release/4.3a0
Kevin 2023-02-09 14:23:52 -05:00
parent 0710a8a893
commit 29358f826b
1 changed files with 3 additions and 0 deletions

View File

@ -119,6 +119,9 @@ TEST(DiscreteFactorGraph, test) {
// Check Factor
CHECK(newFactor);
DecisionTreeFactor expectedFactor(B & A, "10 6 6 10");
auto normalization = expectedFactor.sum(expectedFactor.size());
// Ensure normalization is correct.
expectedFactor = expectedFactor / *normalization;
EXPECT(assert_equal(expectedFactor, *newFactor));
// Test using elimination tree