pub enum Metric {
Cosine,
L2,
Dot,
}Expand description
Distance function of a collection. For every metric, smaller is closer.
Variants§
Cosine
1 - cos(a, b). Vectors are normalized when they are stored.
L2
Squared Euclidean distance.
Dot
Negative inner product.
Implementations§
Trait Implementations§
impl Copy for Metric
impl Eq for Metric
impl StructuralPartialEq for Metric
Auto Trait Implementations§
impl Freeze for Metric
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnsafeUnpin for Metric
impl UnwindSafe for Metric
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