[−][src]Trait hnsw::FloatingDistance
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.