Claudenw commented on code in PR #320:
URL:
https://github.com/apache/commons-collections/pull/320#discussion_r933824666
##########
src/test/java/org/apache/commons/collections4/bloomfilter/AbstractHasherTest.java:
##########
@@ -78,12 +81,40 @@ public void testHashing(int k, int m) {
@Test
public void testUniqueIndex() {
- // create a hasher that produces duplicates with the specified shape.
- // this setup produces 5, 17, 29, 41, 53, 65 two times
- Shape shape = Shape.fromKM(12, 72);
- Hasher hasher = new SimpleHasher(5, 12);
- Set<Integer> set = new HashSet<>();
- assertTrue(hasher.uniqueIndices(shape).forEachIndex(set::add),
"Duplicate detected");
- assertEquals(6, set.size());
+ // @formatter:off
+ /*
+ * The probability of a collision when
Review Comment:
After thinking about it for a bit, it was pointless. Removed and replaced
with a much simpler explanation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]