COIN-OR::LEMON - Graph Library

Changeset 50:72867897fcba in lemon-tutorial for undir_graphs.dox


Ignore:
Timestamp:
02/22/10 13:00:14 (15 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Minor improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • undir_graphs.dox

    r47 r50  
    132132[SEC]sec_undir_graph_algs[SEC] Undirected Graph Algorihtms
    133133
     134\todo This subsection is under construction.
     135
    134136If you would like to design an electric network minimizing the total length
    135137of wires, then you might be looking for a minimum spanning tree in an
     
    139141Let us suppose that the network is stored in a \ref ListGraph object \c g
    140142with a cost map \c cost. We create a \c bool valued edge map \c tree_map or
    141 a vector \c tree_vector for stroing the tree that is found by the algorithm.
     143a vector \c tree_vector for storing the tree that is found by the algorithm.
    142144After that, we could call the \ref kruskal() function. It gives back the weight
    143145of the minimum spanning tree and \c tree_map or \c tree_vector
     
    168170  std::vector<ListGraph::Edge> tree_vector;
    169171  std::cout << "The weight of the minimum spanning tree is "
    170             << kruskal(g, cost_map, tree_vector) << std::endl;
     172            << kruskal(g, cost_map, std::back_inserter(tree_vector))
     173            << std::endl;
    171174
    172175  // Print the results
Note: See TracChangeset for help on using the changeset viewer.