X-Git-Url: https://i11git.iti.kit.edu/anon-gitweb/?p=Mitarbeiter%2FTim-Zeitz%2Fstud-rust-base.git;a=blobdiff_plain;f=src%2Fmain.rs;fp=src%2Fmain.rs;h=0000000000000000000000000000000000000000;hp=c920768ec1d2af90ab1b6e7f25e8e3644c422a3b;hb=c56a14307218fbb51ad188826a431cd034cce473;hpb=dd14e61875eedc443d6004db819562a9b7f98a14 diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index c920768..0000000 --- a/src/main.rs +++ /dev/null @@ -1,33 +0,0 @@ -extern crate time as time_crate; - -mod index_heap; -mod io; -mod time; -mod types; - -use types::*; -use io::*; -use time::*; - -use std::{env, path::Path}; - -fn main() { - let mut args = env::args(); - args.next(); - - let arg = &args.next().expect("No directory arg given"); - let path = Path::new(arg); - - let first_out: Vec = Vec::load_from(path.join("first_out").to_str().unwrap()).expect("could not read first_out"); - let head: Vec = Vec::load_from(path.join("head").to_str().unwrap()).expect("could not read head"); - let travel_time: Vec = Vec::load_from(path.join("travel_time").to_str().unwrap()).expect("could not read travel_time"); - - report_time("iterating over arcs of some node", || { - let node_id = 42; - for &edge_id in &head[first_out[node_id] as usize .. first_out[node_id + 1] as usize] { - println!("There is an arc from {} to {} with weight {}", node_id, head[edge_id as usize], travel_time[edge_id as usize]); - } - }); - - vec![42; 42].write_to(path.join("distances").to_str().unwrap()).expect("could not write distances"); -}