pub struct Jaccard {}Expand description
Jaccard similarity is a ratio of intersection to union of two sets.
The metric works with the set of input elements, so strings “abc” and “bca” are the same if compared by letters.
The metric is always normalized on the interval from 0.0 to 1.0.
Trait Implementations§
Source§impl Algorithm<f64> for Jaccard
impl Algorithm<f64> for Jaccard
Source§fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<f64>
fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<f64>
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 Jaccard
impl RefUnwindSafe for Jaccard
impl Send for Jaccard
impl Sync for Jaccard
impl Unpin for Jaccard
impl UnwindSafe for Jaccard
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