# Changeset 1578:1d3a1bcbc874 in lemon-0.x for doc

Ignore:
Timestamp:
07/21/05 00:36:37 (17 years ago)
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2079
Message:

kruskal_demo corrected, quicktour filled with kruskal

File:
1 edited

Unmodified
Removed
• ## doc/quicktour.dox

 r1541
• If you want to design a network and want to minimize the total length of wires then you might be looking for a minimum spanning tree in an undirected graph. This can be found using the Kruskal algorithm: the function \ref lemon::kruskal "LEMON Kruskal ..." does this job for you. The following code fragment shows an example: Ide Zsuzska fog irni!
• If you want to design a network and want to minimize the total length of wires then you might be looking for a minimum spanning tree in an undirected graph. This can be found using the Kruskal algorithm: the function \ref lemon::kruskal "LEMON Kruskal " does this job for you.  After we had a graph \c g and a cost map \c edge_cost_map , the following code fragment shows an example how to get weight of the minmum spanning tree, if the costs are uniform: \dontinclude kruskal_demo.cc \skip std::cout \until kruskal It gives back a edge bool map, which contains the edges of the tree. If the costs are non-uniform, for example  the cost is given by \c edge_cost_map_2 , or the edges of the tree are have to be given in a vector, then we can give to the kruskal a vector \c tree_edge_vec , instead of an edge bool map: \skip edge_cost_map_2 \until edge_cost_map_2, std::back_inserter And finally the next fragment shows how to use the functions \c makeKruskalMapInput and \c makeKruskalSequenceOutPut: \skip makeKruskalSequenceOutput \until tree_edge_vec See the whole program in \ref kruskal_demo.cc.
• Many problems in network optimization can be formalized by means
Note: See TracChangeset for help on using the changeset viewer.