[aGrUM] test for behaviour change : KL(P,Q) can be computed even if support(P) in support(Q)

parent ab191b8d
Pipeline #23556869 failed with stages
in 78 minutes 53 seconds
......@@ -881,10 +881,12 @@ namespace gum_tests {
TS_ASSERT_THROWS(res = p.KL(s), gum::InvalidArgument);
TS_ASSERT_THROWS(res = s.KL(p), gum::InvalidArgument);
TS_ASSERT_THROWS(res = p.KL(q), gum::FatalError);
TS_GUM_ASSERT_THROWS_NOTHING(res = p.KL(q));
TS_ASSERT_DELTA(res, 0.0 + 1.0 * log2(1.0 / 0.5), 1e-5);
TS_ASSERT_THROWS(res = q.KL(p), gum::FatalError);
TS_ASSERT_THROWS(res = p.KL(r), gum::FatalError);
TS_GUM_ASSERT_THROWS_NOTHING(res = p.KL(r));
TS_ASSERT_DELTA(res, 0.0 + 1.0 * log2(1.0 / 0.3), 1e-5);
TS_ASSERT_THROWS(res = r.KL(p), gum::FatalError);
TS_GUM_ASSERT_THROWS_NOTHING(res = q.KL(r));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment