[][src]Trait hnsw::FloatingDistance

pub trait FloatingDistance {
    fn floating_distance(lhs: &Self, rhs: &Self) -> f32;
}

Implement this trait when your features have a floating point distance between them. You will take no performance penalty for doing so. Please ensure your distance satisfies the conditions on floating_distance.

Required methods

fn floating_distance(lhs: &Self, rhs: &Self) -> f32

This must compute the distance between two Self as a f32. The output must not be negative, infinity, or NaN. Subnormal numbers and zero are allowed.

Loading content...

Implementors

impl<'_> FloatingDistance for Euclidean<&'_ [f32]>[src]

Loading content...