pub enum Distance {
Chebyshev,
Cosine,
Euclidean,
Hamming,
Jaccard,
Manhattan,
Minkowski(Number),
Pearson,
CosineNormalized,
InnerProduct,
}Variants§
Chebyshev
Chebyshev distance.
Cosine
Cosine distance.
Euclidean
Euclidean distance.
Hamming
Hamming distance.
Jaccard
Jaccard distance.
Manhattan
Manhattan distance.
Minkowski(Number)
Minkowski distance with the supplied order.
Pearson
Pearson similarity.
CosineNormalized
Cosine distance for already-normalized vectors.
InnerProduct
Inner product similarity, transformed into a distance score.
Trait Implementations§
impl Eq for Distance
Source§impl PartialOrd for Distance
impl PartialOrd for Distance
impl StructuralPartialEq for Distance
Auto Trait Implementations§
impl Freeze for Distance
impl RefUnwindSafe for Distance
impl Send for Distance
impl Sync for Distance
impl Unpin for Distance
impl UnsafeUnpin for Distance
impl UnwindSafe for Distance
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.