[][src]Trait tsp_rs::Metrizable

pub trait Metrizable {
    fn cost(&self, other: &Self) -> f64;
}

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

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

Loading content...

Implementors

impl Metrizable for Point[src]

Loading content...