[−][src]Trait rulinalg::norm::VectorMetric
Trait for vector metrics.
Required methods
fn metric(&self, v1: &Vector<T>, v2: &Vector<T>) -> T
Computes the metric distance between two vectors.
Implementors
impl<U, T> VectorMetric<T> for U where
U: VectorNorm<T>,
T: Copy + Sub<T, Output = T>, [src]
U: VectorNorm<T>,
T: Copy + Sub<T, Output = T>,
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)