()
| 57 | #[allow(non_snake_case)] |
| 58 | #[test] |
| 59 | fn Kruskal_mst() { |
| 60 | let i = TINY_EWG; |
| 61 | let g = create_graph(i); |
| 62 | let mst = KruskalMST::new(g.as_ref()); |
| 63 | assert_relative_eq!(1.81, mst.weight()); |
| 64 | assert!(mst.check(g.as_ref()).is_ok()); |
| 65 | |
| 66 | // for e in mst.edges() { |
| 67 | // println!("{}", e.to_string()); |
| 68 | // } |
| 69 | } |
| 70 | |
| 71 | fn create_graph(i: &str) -> Box<dyn IEWGraph> { |
| 72 | Box::new(EWGraph::from(i)) |
nothing calls this directly
no test coverage detected