Trait vec_vp_tree::dist::DistFn [] [src]

pub trait DistFn<T> {
    fn dist(&self, left: &T, right: &T) -> u64;
}

Describes a type which can act as a distance-function for T.

Implemented for Fn(&T, &T) -> u64.

Default implementations are provided for common numeric types.

Required Methods

Return the distance between left and right.

Note

It is a logic error for this method to return different values for the same operands, regardless of order (i.e. it is required to be idempotent and commutative).

Implementors