pub enum Metric {
Dot,
Cosine,
L2,
}Expand description
A supported distance / similarity metric over dense vectors.
Variants§
Dot
Inner product — higher is more similar.
Cosine
Cosine similarity in [-1, 1] — higher is more similar.
L2
Squared Euclidean distance — lower is more similar.
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