demo/kruskal_demo.cc
changeset 1582 5fd89def7cbc
parent 1578 1d3a1bcbc874
child 1583 2b329fd595ef
equal deleted inserted replaced
1:2a56ea80858a 2:d7d7d646e97d
    91     kruskal(g, edge_cost_map_2, std::back_inserter(tree_edge_vec)) <<std::endl;
    91     kruskal(g, edge_cost_map_2, std::back_inserter(tree_edge_vec)) <<std::endl;
    92 
    92 
    93   //The vector for the edges of the output tree.
    93   //The vector for the edges of the output tree.
    94   tree_edge_vec.clear();
    94   tree_edge_vec.clear();
    95 
    95 
    96   //Test with makeKruskalSequenceOutput and makeKruskalSequenceOutput.
    96   //Test with makeKruskalMapInput and makeKruskalSequenceOutput.
    97 
    97 
    98   std::cout << "The weight of the minimum spanning tree again is " << 
    98   std::cout << "The weight of the minimum spanning tree again is " << 
    99    kruskal(g,makeKruskalMapInput(g,edge_cost_map_2),makeKruskalSequenceOutput(std::back_inserter(tree_edge_vec)))<< std::endl;
    99    kruskal(g,makeKruskalMapInput(g,edge_cost_map_2),makeKruskalSequenceOutput(std::back_inserter(tree_edge_vec)))<< std::endl;
   100 
   100 
   101 
   101