Enum lance_linalg::distance::DistanceType
source · pub enum DistanceType {
L2,
Cosine,
Dot,
}Expand description
Distance metrics type.
Variants§
Implementations§
source§impl DistanceType
impl DistanceType
sourcepub fn arrow_batch_func(&self) -> ArrowBatchDistanceFunc
pub fn arrow_batch_func(&self) -> ArrowBatchDistanceFunc
Compute the distance from one vector to a batch of vectors.
This propagates nulls to the output.
sourcepub fn func(&self) -> DistanceFunc
pub fn func(&self) -> DistanceFunc
Returns the distance function between two vectors.
Trait Implementations§
source§impl Clone for DistanceType
impl Clone for DistanceType
source§fn clone(&self) -> DistanceType
fn clone(&self) -> DistanceType
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 DistanceType
impl Debug for DistanceType
source§impl Display for DistanceType
impl Display for DistanceType
source§impl PartialEq for DistanceType
impl PartialEq for DistanceType
source§fn eq(&self, other: &DistanceType) -> bool
fn eq(&self, other: &DistanceType) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<&str> for DistanceType
impl TryFrom<&str> for DistanceType
impl Copy for DistanceType
impl StructuralPartialEq for DistanceType
Auto Trait Implementations§
impl RefUnwindSafe for DistanceType
impl Send for DistanceType
impl Sync for DistanceType
impl Unpin for DistanceType
impl UnwindSafe for DistanceType
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