pub fn l2_distance_batch<'a, T: L2>(
from: &'a [T],
to: &'a [T],
dimension: usize,
) -> Box<dyn Iterator<Item = f32> + 'a>
Expand description
Compute L2 distance between a vector and a batch of vectors.
Parameters
from
: the vector to compute distance from.to
: a list of vectors to compute distance to.dimension
: the dimension of the vectors.
Returns
An iterator of pair-wise distance between from
vector to each vector in the batch.