Struct vec_vp_tree::dist::num::UnsignedDist
[−]
[src]
pub struct UnsignedDist;
Distance function for unsigned integers.
Returns if left < right { left - right } else { right - left } as u64
Trait Implementations
impl Copy for UnsignedDist[src]
impl Clone for UnsignedDist[src]
fn clone(&self) -> UnsignedDist
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl DistFn<u8> for UnsignedDist[src]
fn dist(&self, left: &u8, right: &u8) -> u64
Returns if left < right { left - right } else { right - left } as u64
impl DistFn<u16> for UnsignedDist[src]
fn dist(&self, left: &u16, right: &u16) -> u64
Returns if left < right { left - right } else { right - left } as u64
impl DistFn<u32> for UnsignedDist[src]
fn dist(&self, left: &u32, right: &u32) -> u64
Returns if left < right { left - right } else { right - left } as u64
impl DistFn<u64> for UnsignedDist[src]
fn dist(&self, left: &u64, right: &u64) -> u64
Returns if left < right { left - right } else { right - left } as u64