pub struct Hamming {
pub truncate: bool,
}Expand description
Hamming distance is the number of positions at which the corresponding symbols are different.
Fields§
§truncate: boolIf false (default), the longer strings is truncated to the same length as the shorter one.
Trait Implementations§
Source§impl Algorithm<usize> for Hamming
impl Algorithm<usize> for Hamming
Source§fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<usize>
fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<usize>
Calculate distance/similarity for iterators. Read more
Source§fn for_vec<E>(&self, s1: &[E], s2: &[E]) -> Result<R>
fn for_vec<E>(&self, s1: &[E], s2: &[E]) -> Result<R>
Calculate distance/similarity for vectors. Read more
Source§fn for_str(&self, s1: &str, s2: &str) -> Result<R>
fn for_str(&self, s1: &str, s2: &str) -> Result<R>
Calculate distance/similarity for strings. Read more
Auto Trait Implementations§
impl Freeze for Hamming
impl RefUnwindSafe for Hamming
impl Send for Hamming
impl Sync for Hamming
impl Unpin for Hamming
impl UnwindSafe for Hamming
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