pub enum AnchorMetric {
Cosine,
L2,
}Expand description
Distance metric for anchor projection.
Variants§
Cosine
Cosine distance: 1 - cos(v, anchor). Range [0, 2], typically [0, 1].
L2
L2 (Euclidean) distance.
Trait Implementations§
Source§impl Clone for AnchorMetric
impl Clone for AnchorMetric
Source§fn clone(&self) -> AnchorMetric
fn clone(&self) -> AnchorMetric
Returns a copy 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 AnchorMetric
impl Debug for AnchorMetric
Source§impl From<AnchorMetricSerde> for AnchorMetric
impl From<AnchorMetricSerde> for AnchorMetric
Source§fn from(m: AnchorMetricSerde) -> Self
fn from(m: AnchorMetricSerde) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AnchorMetric
impl PartialEq for AnchorMetric
impl Copy for AnchorMetric
impl StructuralPartialEq for AnchorMetric
Auto Trait Implementations§
impl Freeze for AnchorMetric
impl RefUnwindSafe for AnchorMetric
impl Send for AnchorMetric
impl Sync for AnchorMetric
impl Unpin for AnchorMetric
impl UnwindSafe for AnchorMetric
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