pub struct FastSimHash<H, S, const L: usize, const BULK: usize = 3>where
H: SimHasher<T = u64>,
S: SimHashBits,{ /* private fields */ }Implementations§
Source§impl<H, S, const L: usize, const BULK: usize> FastSimHash<H, S, L, BULK>where
H: SimHasher<T = u64>,
S: SimHashBits,
impl<H, S, const L: usize, const BULK: usize> FastSimHash<H, S, L, BULK>where
H: SimHasher<T = u64>,
S: SimHashBits,
pub fn new(hasher: H) -> Self
pub fn create_signature<T, U>(&self, iter: T) -> Swhere
T: IntoIterator<Item = U>,
U: Hash,
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 variant: uses signed float counters. This keeps per-feature random bits from Xoroshiro but does not use the packed-counter bit-hack. Still quite fast; O(#features * L/64).
Auto Trait Implementations§
impl<H, S, const L: usize, const BULK: usize> Freeze for FastSimHash<H, S, L, BULK>where
H: Freeze,
impl<H, S, const L: usize, const BULK: usize> RefUnwindSafe for FastSimHash<H, S, L, BULK>where
H: RefUnwindSafe,
S: RefUnwindSafe,
impl<H, S, const L: usize, const BULK: usize> Send for FastSimHash<H, S, L, BULK>
impl<H, S, const L: usize, const BULK: usize> Sync for FastSimHash<H, S, L, BULK>
impl<H, S, const L: usize, const BULK: usize> Unpin for FastSimHash<H, S, L, BULK>
impl<H, S, const L: usize, const BULK: usize> UnwindSafe for FastSimHash<H, S, L, BULK>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