MCPcopy Create free account
hub / github.com/douchuan/algorithm / Prim_mst

Function Prim_mst

tests/test_graph_mst.rs:45–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43#[allow(non_snake_case)]
44#[test]
45fn Prim_mst() {
46 let i = TINY_EWG;
47 let g = create_graph(i);
48 let mst = PrimMST::new(g.as_ref());
49 assert_relative_eq!(1.81, mst.weight());
50 assert!(mst.check(g.as_ref()).is_ok());
51
52 // for e in mst.edges() {
53 // println!("{}", e.to_string());
54 // }
55}
56
57#[allow(non_snake_case)]
58#[test]

Callers

nothing calls this directly

Calls 1

create_graphFunction · 0.70

Tested by

no test coverage detected