diff --git a/src/main.rs b/src/main.rs index 2f2d0e1..36cb0af 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,8 +4,8 @@ mod quick_sort; mod ssc; mod util; -use std::cmp::min; use crate::util::read_to_graph; +use std::cmp::min; use crate::merge_sort::merge_sort_inversions; use crate::min_cut::min_cut; @@ -27,11 +27,7 @@ fn c1a3() { let mut comp_acc: usize = 0; quick_sort(&mut vec, &mut comp_acc); println!("course 1 assignment 3: {:?}", comp_acc); - /* - 1: 162085 - 2: 164123 - 3: 138382 - */ + // 1: 162085, 2: 164123, 3: 138382 } #[allow(dead_code)] @@ -45,18 +41,18 @@ fn c1a4() { smalles_min_cut = new_min_cut; } } - /* 17 */ + // 17 println!("course 1 assignment 4: {:?}", smalles_min_cut); } #[allow(dead_code)] fn c2a1() { - // I have not checked in the graph file, because it has 70MB. - // let g = read_to_directed_graph("data/course_2_assignment_1.txt").unwrap(); + // I have not checked in the graph file, because it has 70MB. This is a tiny test example. let g = read_to_directed_graph("data/course_2_assignment_1_test.txt").unwrap(); let sizes = ssc(g.0, g.1); let max_size = min(sizes.len(), 5); println!("{:?}", &sizes[0..max_size]); + // [434821, 968, 459, 313, 211] } fn main() {