pub enum VectorDistance {
Cosine,
Euclidean,
}Variants§
Implementations§
Source§impl VectorDistance
impl VectorDistance
pub fn from_function_name(name: &str) -> Option<Self>
pub const fn function_name(self) -> &'static str
pub fn distance(self, left: VectorRef<'_>, right: VectorRef<'_>) -> Result<f64>
Sourcepub fn distance_with_work(
self,
left: VectorRef<'_>,
right: VectorRef<'_>,
checkpoint: impl FnMut() -> Result<()>,
) -> Result<f64>
pub fn distance_with_work( self, left: VectorRef<'_>, right: VectorRef<'_>, checkpoint: impl FnMut() -> Result<()>, ) -> Result<f64>
Cooperatively scores canonical values without copying their payloads.
Sourcepub fn distance_slices_with_work(
self,
left: &[f32],
right: &[f32],
checkpoint: impl FnMut() -> Result<()>,
) -> Result<f64>
pub fn distance_slices_with_work( self, left: &[f32], right: &[f32], checkpoint: impl FnMut() -> Result<()>, ) -> Result<f64>
Scores admitted raw projection vectors with the same mathematical contract as SQL/Cypher, without creating canonical payload copies.
pub fn evaluate( self, left: ValueRef<'_>, right: ValueRef<'_>, ) -> Result<Option<f64>>
Trait Implementations§
Source§impl Clone for VectorDistance
impl Clone for VectorDistance
impl Copy for VectorDistance
Source§impl Debug for VectorDistance
impl Debug for VectorDistance
impl Eq for VectorDistance
Source§impl Hash for VectorDistance
impl Hash for VectorDistance
Source§impl PartialEq for VectorDistance
impl PartialEq for VectorDistance
impl StructuralPartialEq for VectorDistance
Auto Trait Implementations§
impl Freeze for VectorDistance
impl RefUnwindSafe for VectorDistance
impl Send for VectorDistance
impl Sync for VectorDistance
impl Unpin for VectorDistance
impl UnsafeUnpin for VectorDistance
impl UnwindSafe for VectorDistance
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