tsplib-parser 0.1.0

A parser for the TSPLIB format
Documentation
  • Coverage
  • 96.97%
    64 out of 66 items documented0 out of 10 items with examples
  • Size
  • Source code size: 70.35 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.87 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Kurorororo/tsplib-parser
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Kurorororo

Parser for the TSPLIB format in Rust

crates.io minimum rustc 1.76 License License: MIT

Warning: This crate is work in progress and is not comprehensively tested!

In addition to the specifications by TSPLIB95, the following features are supported:

Examples

use std::env;
use tsplib_parser::Instance;

fn main() {
    let mut args = env::args();
    args.next().unwrap();
    let input = args.next().unwrap();

    println!("Loading instance from file: {}", input);
    let instance = Instance::load(&input).unwrap();
    println!("{:?}", instance);

    let matrix = instance.get_full_distance_matrix().unwrap();
    println!("{:?}", matrix);
}