private void checkOnAbsentFalsePositive(int hashId, int numInsertions, final RetouchedBloomFilter filter, Digits digits, short removeSchema) { AbstractCollection<Key> falsePositives = FALSE_POSITIVE_UNDER_1000 .get(hashId); if (falsePositives == null) Assert.fail(String.format("false positives for hash %d not founded", hashId)); filter.addFalsePositive(falsePositives); for (int i = digits.getStart(); i < numInsertions; i += 2) { filter.add(new Key(Integer.toString(i).getBytes())); } for (Key key : falsePositives) { filter.selectiveClearing(key, removeSchema); } for (int i = 1 - digits.getStart(); i < numInsertions; i += 2) { assertFalse(" testRetouchedBloomFilterAddFalsePositive error " + i, filter.membershipTest(new Key(Integer.toString(i).getBytes()))); } }
private void checkOnAbsentFalsePositive(int hashId, int numInsertions, final RetouchedBloomFilter filter, Digits digits, short removeSchema) { AbstractCollection<Key> falsePositives = FALSE_POSITIVE_UNDER_1000 .get(hashId); if (falsePositives == null) Assert.fail(String.format("false positives for hash %d not founded", hashId)); filter.addFalsePositive(falsePositives); for (int i = digits.getStart(); i < numInsertions; i += 2) { filter.add(new Key(Integer.toString(i).getBytes())); } for (Key key : falsePositives) { filter.selectiveClearing(key, removeSchema); } for (int i = 1 - digits.getStart(); i < numInsertions; i += 2) { assertFalse(" testRetouchedBloomFilterAddFalsePositive error " + i, filter.membershipTest(new Key(Integer.toString(i).getBytes()))); } }