1 use stud_rust_base::{io::*, time::report_time, types::*};
3 use std::{env, error::Error, path::Path};
5 fn main() -> Result<(), Box<dyn Error>> {
6 let mut args = env::args();
9 let arg = &args.next().expect("No directory arg given");
10 let path = Path::new(arg);
12 let first_out = Vec::<EdgeId>::load_from(path.join("first_out"))?;
13 let head = Vec::<NodeId>::load_from(path.join("head"))?;
14 let travel_time = Vec::<Weight>::load_from(path.join("travel_time"))?;
16 report_time("iterating over arcs of some node", || {
18 for edge_id in first_out[node_id]..first_out[node_id + 1] {
20 "There is an arc from {} to {} with weight {}",
21 node_id, head[edge_id as usize], travel_time[edge_id as usize]
26 vec![42; 42].write_to(&path.join("distances"))?;