lance_index::vector::graph

Trait DistanceCalculator

Source
pub trait DistanceCalculator {
    // Required method
    fn compute_distances(&self, ids: &[u32]) -> Box<dyn Iterator<Item = f32>>;
}
Expand description

Distance calculator.

This trait is used to calculate a query vector to a stream of vector IDs.

Required Methods§

Source

fn compute_distances(&self, ids: &[u32]) -> Box<dyn Iterator<Item = f32>>

Compute distances between one query vector to all the vectors in the list of IDs.

Implementors§