Skip to content

Commit ebc338c

Browse files
committed
Add min_matches method to GeoDiffCount
1 parent f6bc74b commit ebc338c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

crates/geo_filters/src/diff_count/sim_hash.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ impl SimHash {
4949
}
5050

5151
impl<C: GeoConfig<Diff>> GeoDiffCount<'_, C> {
52+
/// TODO document, and maybe get better name
53+
pub fn min_matches(&self) -> usize {
54+
SIM_BUCKETS / 2
55+
}
56+
5257
/// Given the expected size of a diff, this function returns the range of bucket ids which should
5358
/// be searched for in order to find geometric filters of the desired similarity. If at least half
5459
/// of the buckets in the range match, one found a match that has the expected diff size (or better).

0 commit comments

Comments
 (0)