undir_graphs.dox
changeset 50 72867897fcba
parent 47 c09d90659170
child 57 18404ec968ca
     1.1 --- a/undir_graphs.dox	Mon Feb 22 02:03:25 2010 +0100
     1.2 +++ b/undir_graphs.dox	Mon Feb 22 13:00:14 2010 +0100
     1.3 @@ -131,6 +131,8 @@
     1.4  
     1.5  [SEC]sec_undir_graph_algs[SEC] Undirected Graph Algorihtms
     1.6  
     1.7 +\todo This subsection is under construction.
     1.8 +
     1.9  If you would like to design an electric network minimizing the total length
    1.10  of wires, then you might be looking for a minimum spanning tree in an
    1.11  undirected graph.
    1.12 @@ -138,7 +140,7 @@
    1.13  
    1.14  Let us suppose that the network is stored in a \ref ListGraph object \c g
    1.15  with a cost map \c cost. We create a \c bool valued edge map \c tree_map or
    1.16 -a vector \c tree_vector for stroing the tree that is found by the algorithm.
    1.17 +a vector \c tree_vector for storing the tree that is found by the algorithm.
    1.18  After that, we could call the \ref kruskal() function. It gives back the weight
    1.19  of the minimum spanning tree and \c tree_map or \c tree_vector
    1.20  will contain the found spanning tree.
    1.21 @@ -167,7 +169,8 @@
    1.22    // Kruskal algorithm with edge vector
    1.23    std::vector<ListGraph::Edge> tree_vector;
    1.24    std::cout << "The weight of the minimum spanning tree is "
    1.25 -            << kruskal(g, cost_map, tree_vector) << std::endl;
    1.26 +            << kruskal(g, cost_map, std::back_inserter(tree_vector))
    1.27 +            << std::endl;
    1.28  
    1.29    // Print the results
    1.30    std::cout << "Edges of the tree: " << std::endl;