[−][src]Crate tsp_rs
Crate of algorithms for solving the traveling salesman problem.
Example
use std::time; use tsp_rs::Tour; use tsp_rs::point::Point; let tour: Vec<Point> = vec![ Point::new(0., 0.), Point::new(0., 1.), Point::new(1., 0.), Point::new(1., 1.), ]; let mut tour = Tour::from(&tour); tour.optimize_kopt(std::time::Duration::from_secs(1));
Disclaimer:
This is not a work of art, nor is it perfect (or even good?) Rust. This was written alongside my first reading of the Rust book (https://doc.rust-lang.org/book/) while trying to learn the language.
Modules
point |
Structs
Tour | Represents a solution to the tsp for the items T |
Traits
Metrizable | Trait used by all algorithms to calculate the cost of moving along an edge |