Trait Metrizable

Source
pub trait Metrizable {
    // Required method
    fn cost(&self, other: &Self) -> f64;
}
Expand description

Trait used by all algorithms to calculate the cost of moving along an edge

§Examples

An example implementation is found on tsp::point::Point, that implements standard euclidean distance as its metric.

Required Methods§

Source

fn cost(&self, other: &Self) -> f64

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§