lemon/kruskal.h
changeset 2259 da142c310d02
parent 2206 c3ff11b0025c
child 2260 4274224f8a7d
equal deleted inserted replaced
19:cc9bbf5541d8 20:3404ddd26fe8
    57   /// with the assigned cost. <em>They must be in a
    57   /// with the assigned cost. <em>They must be in a
    58   /// cost-ascending order.</em>
    58   /// cost-ascending order.</em>
    59   /// - Any readable Edge map. The values of the map indicate the edge costs.
    59   /// - Any readable Edge map. The values of the map indicate the edge costs.
    60   ///
    60   ///
    61   /// \retval out Here we also have a choise.
    61   /// \retval out Here we also have a choise.
    62   /// - Is can be a writable \c bool edge map. 
    62   /// - It can be a writable \c bool edge map. 
    63   /// After running the algorithm
    63   /// After running the algorithm
    64   /// this will contain the found minimum cost spanning tree: the value of an
    64   /// this will contain the found minimum cost spanning tree: the value of an
    65   /// edge will be set to \c true if it belongs to the tree, otherwise it will
    65   /// edge will be set to \c true if it belongs to the tree, otherwise it will
    66   /// be set to \c false. The value of each edge will be set exactly once.
    66   /// be set to \c false. The value of each edge will be set exactly once.
    67   /// - It can also be an iteraror of an STL Container with
    67   /// - It can also be an iteraror of an STL Container with
    68   /// <tt>GR::Edge</tt> as its <tt>value_type</tt>.
    68   /// <tt>GR::Edge</tt> as its <tt>value_type</tt>.
    69   /// The algorithm copies the elements of the found tree into this sequence.
    69   /// The algorithm copies the elements of the found tree into this sequence.
    70   /// For example, if we know that the spanning tree of the graph \c g has
    70   /// For example, if we know that the spanning tree of the graph \c g has
    71   /// say 53 edges, then
    71   /// say 53 edges, then
    72   /// we can put its edges into a STL vector \c tree with a code like this.
    72   /// we can put its edges into an STL vector \c tree with a code like this.
    73   ///\code
    73   ///\code
    74   /// std::vector<Edge> tree(53);
    74   /// std::vector<Edge> tree(53);
    75   /// kruskal(g,cost,tree.begin());
    75   /// kruskal(g,cost,tree.begin());
    76   ///\endcode
    76   ///\endcode
    77   /// Or if we don't know in advance the size of the tree, we can write this.
    77   /// Or if we don't know in advance the size of the tree, we can write this.
    80   /// kruskal(g,cost,std::back_inserter(tree));
    80   /// kruskal(g,cost,std::back_inserter(tree));
    81   ///\endcode
    81   ///\endcode
    82   ///
    82   ///
    83   /// \return The cost of the found tree.
    83   /// \return The cost of the found tree.
    84   ///
    84   ///
    85   /// \warning If kruskal is run on an
    85   /// \warning If kruskal runs on an
    86   /// \ref lemon::concept::UGraph "undirected graph", be sure that the
    86   /// \ref lemon::concept::UGraph "undirected graph", be sure that the
    87   /// map storing the tree is also undirected
    87   /// map storing the tree is also undirected
    88   /// (e.g. ListUGraph::UEdgeMap<bool>, otherwise the values of the
    88   /// (e.g. ListUGraph::UEdgeMap<bool>, otherwise the values of the
    89   /// half of the edges will not be set.
    89   /// half of the edges will not be set.
    90   ///
    90   ///
   389 //   \retval out This must be an iteraror of an STL Container with
   389 //   \retval out This must be an iteraror of an STL Container with
   390 //   <tt>GR::Edge</tt> as its <tt>value_type</tt>.
   390 //   <tt>GR::Edge</tt> as its <tt>value_type</tt>.
   391 //   The algorithm copies the elements of the found tree into this sequence.
   391 //   The algorithm copies the elements of the found tree into this sequence.
   392 //   For example, if we know that the spanning tree of the graph \c g has
   392 //   For example, if we know that the spanning tree of the graph \c g has
   393 //   say 53 edges, then
   393 //   say 53 edges, then
   394 //   we can put its edges into a STL vector \c tree with a code like this.
   394 //   we can put its edges into an STL vector \c tree with a code like this.
   395 //\code
   395 //\code
   396 //   std::vector<Edge> tree(53);
   396 //   std::vector<Edge> tree(53);
   397 //   kruskal(g,cost,tree.begin());
   397 //   kruskal(g,cost,tree.begin());
   398 //\endcode
   398 //\endcode
   399 //   Or if we don't know in advance the size of the tree, we can write this.
   399 //   Or if we don't know in advance the size of the tree, we can write this.