Skip to content

Commit

Permalink
Merging (Identically Specified) MinHashLSH objects
Browse files Browse the repository at this point in the history
Fixes #205
  • Loading branch information
rupeshkumaar committed Jan 22, 2024
1 parent d96b6e7 commit 6628db8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datasketch/lsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,14 @@ def _insert(
def __equivalent(self, other:MinHashLSH) -> bool:
"""
Returns:
bool: If the two MinHashLSH has equal num_perm, band size and size of each bands then two are equivalent.
bool: If the two MinHashLSH have equal num_perm, number of bands, size of each band and hashfunc (if provided) then two are equivalent.
"""
return (
type(self) is type(other) and
self.h == other.h and
self.b == other.b and
self.r == other.r
self.r == other.r and
type(self.hashfunc) == type(other.hashfunc)
)

def _merge(
Expand Down

0 comments on commit 6628db8

Please sign in to comment.