one more test
diff --git a/tuple/test/theta_jaccard_similarity_test.cpp b/tuple/test/theta_jaccard_similarity_test.cpp
index 37f5b5d..d3c15e4 100644
--- a/tuple/test/theta_jaccard_similarity_test.cpp
+++ b/tuple/test/theta_jaccard_similarity_test.cpp
@@ -80,4 +80,25 @@
REQUIRE(jc == std::array<double, 3>{0, 0, 0});
}
+TEST_CASE("theta jaccard: half overlap estimation mode", "[theta_sketch]") {
+ auto sk_a = update_theta_sketch::builder().build();
+ auto sk_b = update_theta_sketch::builder().build();
+ for (int i = 0; i < 10000; ++i) {
+ sk_a.update(i);
+ sk_b.update(i + 5000);
+ }
+
+ // update sketches
+ auto jc = theta_jaccard_similarity::jaccard(sk_a, sk_b);
+ REQUIRE(jc[0] == Approx(0.33).margin(0.01));
+ REQUIRE(jc[1] == Approx(0.33).margin(0.01));
+ REQUIRE(jc[2] == Approx(0.33).margin(0.01));
+
+ // compact sketches
+ jc = theta_jaccard_similarity::jaccard(sk_a.compact(), sk_b.compact());
+ REQUIRE(jc[0] == Approx(0.33).margin(0.01));
+ REQUIRE(jc[1] == Approx(0.33).margin(0.01));
+ REQUIRE(jc[2] == Approx(0.33).margin(0.01));
+}
+
} /* namespace datasketches */