pub enum DistanceMetric {
L2,
InnerProduct,
Cosine,
}Expand description
Distance metric used for vector similarity search.
Variants§
L2
Squared Euclidean distance (L2).
InnerProduct
Inner (dot) product distance (negated).
Cosine
Cosine distance (1 - cosine_similarity).
Trait Implementations§
Source§impl Clone for DistanceMetric
impl Clone for DistanceMetric
Source§fn clone(&self) -> DistanceMetric
fn clone(&self) -> DistanceMetric
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DistanceMetric
impl Debug for DistanceMetric
Source§impl Default for DistanceMetric
impl Default for DistanceMetric
Source§fn default() -> DistanceMetric
fn default() -> DistanceMetric
Returns the “default value” for a type. Read more
Source§impl PartialEq for DistanceMetric
impl PartialEq for DistanceMetric
impl Copy for DistanceMetric
impl Eq for DistanceMetric
impl StructuralPartialEq for DistanceMetric
Auto Trait Implementations§
impl Freeze for DistanceMetric
impl RefUnwindSafe for DistanceMetric
impl Send for DistanceMetric
impl Sync for DistanceMetric
impl Unpin for DistanceMetric
impl UnwindSafe for DistanceMetric
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