pub struct MinHash { /* private fields */ }Expand description
MinHash for similarity estimation
Implementations§
Source§impl MinHash
impl MinHash
Sourcepub fn new(hash_functions: usize) -> Self
pub fn new(hash_functions: usize) -> Self
Create a new MinHash with specified number of hash functions
Sourcepub fn jaccard_similarity(&self, other: &MinHash) -> f64
pub fn jaccard_similarity(&self, other: &MinHash) -> f64
Estimate Jaccard similarity with another MinHash
Sourcepub fn stats(&self) -> MinHashStats
pub fn stats(&self) -> MinHashStats
Get MinHash statistics
Auto Trait Implementations§
impl Freeze for MinHash
impl RefUnwindSafe for MinHash
impl Send for MinHash
impl Sync for MinHash
impl Unpin for MinHash
impl UnwindSafe for MinHash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more