pub trait DistanceCalculator { // Required method fn compute_distances(&self, ids: &[u32]) -> Box<dyn Iterator<Item = f32>>; }
Distance calculator.
This trait is used to calculate a query vector to a stream of vector IDs.
Compute distances between one query vector to all the vectors in the list of IDs.