diff --git a/code/rust/src/main.rs b/code/rust/src/main.rs index 9fc48c5..f4482a3 100644 --- a/code/rust/src/main.rs +++ b/code/rust/src/main.rs @@ -14,10 +14,25 @@ use graphs::tarjan::tarjan_algorithm; // ---------------------------------------------------------------- fn main() { - let nodes: Vec<_> = vec![1,2,3,4,5,6,7]; - let edges: Vec<(_, _)> = vec![(1,2), (1,3), (2,3), (3,4), (4,5), (5,2), (5,6), (5,7), (6,7)]; + let nodes: Vec<_> = vec![1,2,3,4,5,6,7,8]; + let edges: Vec<(_, _)> = vec![ + (1,2), + (1,3), + (2,4), + (2,5), + (3,5), + (3,6), + (3,8), + (4,5), + (4,7), + (5,1), + (5,8), + (6,8), + (7,8), + (8,6), + ]; let gph = Graph::new(nodes, edges); - let components = tarjan_algorithm(&gph); + let components = tarjan_algorithm(&gph, true); println!("Components:"); for component in components { println!("{:?}", component);