[][src]Trait rulinalg::norm::VectorMetric

pub trait VectorMetric<T> {
    fn metric(&self, v1: &Vector<T>, v2: &Vector<T>) -> T;
}

Trait for vector metrics.

Required methods

fn metric(&self, v1: &Vector<T>, v2: &Vector<T>) -> T

Computes the metric distance between two vectors.

Loading content...

Implementors

impl<U, T> VectorMetric<T> for U where
    U: VectorNorm<T>,
    T: Copy + Sub<T, Output = T>, 
[src]

The induced vector metric

Given a norm N, the induced vector metric M computes the metric distance, d, between two vectors v1 and v2 as follows:

d = M(v1, v2) = N(v1 - v2)

Loading content...