Struct vec_vp_tree::dist::num::ScaledFloatDist
[−]
[src]
pub struct ScaledFloatDist<T>(pub T);
Implements DistFn for floating-point numbers with a scaling factor.
Returns ((left - right) * self.0).abs().round() as u64
Trait Implementations
impl<T: Copy> Copy for ScaledFloatDist<T>[src]
impl<T: Clone> Clone for ScaledFloatDist<T>[src]
fn clone(&self) -> ScaledFloatDist<T>
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<f32> for ScaledFloatDist<f32>[src]
fn dist(&self, left: &f32, right: &f32) -> u64
Returns ((left - right) * self.0).abs().round() as u64