pub struct SimHash<H, S, const L: usize>where
H: SimHasher<T = S>,
S: SimHashBits,{ /* private fields */ }Implementations§
Source§impl<H, S, const L: usize> SimHash<H, S, L>where
H: SimHasher<T = S>,
S: SimHashBits,
impl<H, S, const L: usize> SimHash<H, S, L>where
H: SimHasher<T = S>,
S: SimHashBits,
pub fn new(hasher: H) -> Self
pub fn create_signature<T, U>(&self, iter: T) -> S
Sourcepub fn create_signature_weighted<T, U, W>(&self, iter: T) -> S
pub fn create_signature_weighted<T, U, W>(&self, iter: T) -> S
Weighted SimHash: each feature contributes ±w instead of ±1. If the i-th hash bit is 1, add -w; if 0, add +w. Final bit = sign(count).
pub fn create_centroid<T>(&self, signatures: T) -> Swhere
T: Iterator<Item = S>,
Auto Trait Implementations§
impl<H, S, const L: usize> Freeze for SimHash<H, S, L>where
H: Freeze,
impl<H, S, const L: usize> RefUnwindSafe for SimHash<H, S, L>where
H: RefUnwindSafe,
S: RefUnwindSafe,
impl<H, S, const L: usize> Send for SimHash<H, S, L>
impl<H, S, const L: usize> Sync for SimHash<H, S, L>
impl<H, S, const L: usize> Unpin for SimHash<H, S, L>
impl<H, S, const L: usize> UnwindSafe for SimHash<H, S, L>where
H: UnwindSafe,
S: UnwindSafe,
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