Metric

Trait Metric 

Source
pub trait Metric<T> {
    // Required methods
    fn distance(&self, point1: &[T], point2: &[T]) -> T;
    fn distance_squared(&self, point1: &[T], point2: &[T]) -> T;
}

Required Methods§

Source

fn distance(&self, point1: &[T], point2: &[T]) -> T

Source

fn distance_squared(&self, point1: &[T], point2: &[T]) -> T

Implementors§

Source§

impl<T> Metric<T> for Euclidean
where T: Float + Send + Sync,