Skip to main content

DistanceFunctionMut

Trait DistanceFunctionMut 

Source
pub trait DistanceFunctionMut<Left, Right, To = ()> {
    // Required method
    fn evaluate(&mut self, left: Left, right: Right) -> To;
}
Expand description

A mutable version of DistanceFunction that allows mutation of Self.

This trait is useful for computing distances where the distance functor holds mutable state (e.g., a buffer to accumulate per-vector scores).

Required Methods§

Source

fn evaluate(&mut self, left: Left, right: Right) -> To

Compute distances between the left and right arguments.

Implementors§