Skip to main content

PreprocessedDistanceFunction

Trait PreprocessedDistanceFunction 

Source
pub trait PreprocessedDistanceFunction<Changing, To = f32> {
    // Required method
    fn evaluate_similarity(&self, changing: Changing) -> To;
}
Expand description

A distance function where one argument is static and interned within Self.

The method self.evaluate_similarity can then be invoked for arbitrarily many values of changing.

The main idea behind this trait is to enable distance functions where some amount of preprocessing on a query can be used to accelerate distance computations.

Required Methods§

Source

fn evaluate_similarity(&self, changing: Changing) -> To

Implementors§