equal
deleted
inserted
replaced
79 check(kruskalEdgeMap_IteratorOut(G, edge_cost_map, |
79 check(kruskalEdgeMap_IteratorOut(G, edge_cost_map, |
80 back_inserter(tree_edge_vec)) |
80 back_inserter(tree_edge_vec)) |
81 ==-31, |
81 ==-31, |
82 "Total cost should be -31."); |
82 "Total cost should be -31."); |
83 |
83 |
|
84 tree_edge_vec.clear(); |
|
85 |
|
86 //The above test could also be coded like this: |
|
87 check(kruskal(G, |
|
88 makeKruskalMapInput(G, edge_cost_map), |
|
89 makeKruskalSequenceOutput(back_inserter(tree_edge_vec))) |
|
90 ==-31, |
|
91 "Total cost should be -31."); |
|
92 |
84 check(tree_edge_vec.size()==5,"The tree should have 5 edges."); |
93 check(tree_edge_vec.size()==5,"The tree should have 5 edges."); |
85 |
94 |
86 check(tree_edge_vec[0]==e1 && |
95 check(tree_edge_vec[0]==e1 && |
87 tree_edge_vec[1]==e2 && |
96 tree_edge_vec[1]==e2 && |
88 tree_edge_vec[2]==e5 && |
97 tree_edge_vec[2]==e5 && |