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
fn dist(&self, left: &T, right: &T) -> u64
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
impl DistFn<i8> for SignedDistimpl DistFn<i16> for SignedDistimpl DistFn<i32> for SignedDistimpl DistFn<i64> for SignedDistimpl DistFn<isize> for SignedDistimpl DistFn<u8> for UnsignedDistimpl DistFn<u16> for UnsignedDistimpl DistFn<u32> for UnsignedDistimpl DistFn<u64> for UnsignedDistimpl DistFn<usize> for UnsignedDistimpl DistFn<f32> for FloatDistimpl DistFn<f32> for ScaledFloatDist<f32>impl DistFn<f64> for FloatDistimpl DistFn<f64> for ScaledFloatDist<f64>impl<'a> DistFn<&'a str> for Hammingimpl DistFn<String> for Hammingimpl<'a> DistFn<&'a str> for Levenshteinimpl DistFn<String> for Levenshteinimpl<'a> DistFn<&'a str> for DamerauLevenshteinimpl DistFn<String> for DamerauLevenshteinimpl<'a> DistFn<&'a str> for Jaroimpl DistFn<String> for Jaroimpl<'a> DistFn<&'a str> for JaroWinklerimpl DistFn<String> for JaroWinklerimpl<T, F> DistFn<T> for F where F: Fn(&T, &T) -> u64