pub struct Length {}Expand description
Length distance is the absolute difference between the lengths of the two sequences.
It’s a very dumb algorithm that says that “qwer” and “zxcv” are the same. Still, it works surprisingly well in some specific scenarios, especially on big sequences.
Trait Implementations§
Source§impl Algorithm<usize> for Length
impl Algorithm<usize> for Length
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 Length
impl RefUnwindSafe for Length
impl Send for Length
impl Sync for Length
impl Unpin for Length
impl UnwindSafe for Length
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