pub struct Simhash(/* private fields */);Implementations§
Source§impl Simhash
impl Simhash
pub fn new(value: u64) -> Self
pub fn from_text(text: &str) -> Self
pub fn from_tokens(tokens: &[String]) -> Self
pub fn hamming_distance(&self, other: &Simhash) -> u32
pub fn similarity(&self, other: &Simhash) -> f64
pub fn is_near_duplicate(&self, other: &Simhash, threshold: u32) -> bool
pub fn value(&self) -> u64
Trait Implementations§
impl Copy for Simhash
impl Eq for Simhash
impl StructuralPartialEq for Simhash
Auto Trait Implementations§
impl Freeze for Simhash
impl RefUnwindSafe for Simhash
impl Send for Simhash
impl Sync for Simhash
impl Unpin for Simhash
impl UnsafeUnpin for Simhash
impl UnwindSafe for Simhash
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