pub enum DistanceMetric {
Euclidean,
Cosine,
}Expand description
Supported distance metrics for vector comparison
Variants§
Euclidean
Standard Euclidean distance
Cosine
Cosine similarity (converted to distance as 1 - 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<'de> Deserialize<'de> for DistanceMetric
impl<'de> Deserialize<'de> for DistanceMetric
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DistanceMetric
impl Serialize for DistanceMetric
impl Copy 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