pub trait DistanceFunction<Left, Right, To = f32> {
// Required method
fn evaluate_similarity(&self, x: Left, y: Right) -> To;
}Expand description
An overloadable, 2-argument distance function with a parameterized return type.
Unlike PureDistanceFunction, this takes a functor as the receiver. This allows
distance functors to contain auxiliary state required to do their job
(for example, access to some shared quantization tables).
Required Methods§
Sourcefn evaluate_similarity(&self, x: Left, y: Right) -> To
fn evaluate_similarity(&self, x: Left, y: Right) -> To
Perform a distance computation between the left-hand and right-hand arguments.