MetricSpace

Trait MetricSpace 

Source
pub trait MetricSpace<S: Field>: NormedVectorSpace<S> {
    // Provided methods
    fn distance_squared(self, other: Self) -> S { ... }
    fn distance(self, other: Self) -> S
       where S: Sqrt { ... }
}
Expand description

Set of points with distance function

Provided Methods§

Source

fn distance_squared(self, other: Self) -> S

Source

fn distance(self, other: Self) -> S
where S: Sqrt,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S, T> MetricSpace<S> for T
where S: Field, T: NormedVectorSpace<S>,