lemon/kruskal.h
changeset 1946 17eb3eaad9f8
parent 1942 08834607d4db
child 1956 a055123339d5
equal deleted inserted replaced
11:026e5c2efced 12:acf6b716820a
    75   /// <tt>GR::Edge</tt> as its <tt>value_type</tt>.
    75   /// <tt>GR::Edge</tt> as its <tt>value_type</tt>.
    76   /// The algorithm copies the elements of the found tree into this sequence.
    76   /// The algorithm copies the elements of the found tree into this sequence.
    77   /// For example, if we know that the spanning tree of the graph \c g has
    77   /// For example, if we know that the spanning tree of the graph \c g has
    78   /// say 53 edges, then
    78   /// say 53 edges, then
    79   /// we can put its edges into a STL vector \c tree with a code like this.
    79   /// we can put its edges into a STL vector \c tree with a code like this.
    80   /// \code
    80   ///\code
    81   /// std::vector<Edge> tree(53);
    81   /// std::vector<Edge> tree(53);
    82   /// kruskal(g,cost,tree.begin());
    82   /// kruskal(g,cost,tree.begin());
    83   /// \endcode
    83   ///\endcode
    84   /// Or if we don't know in advance the size of the tree, we can write this.
    84   /// Or if we don't know in advance the size of the tree, we can write this.
    85   /// \code
    85   ///\code
    86   /// std::vector<Edge> tree;
    86   /// std::vector<Edge> tree;
    87   /// kruskal(g,cost,std::back_inserter(tree));
    87   /// kruskal(g,cost,std::back_inserter(tree));
    88   /// \endcode
    88   ///\endcode
    89   ///
    89   ///
    90   /// \return The cost of the found tree.
    90   /// \return The cost of the found tree.
    91   ///
    91   ///
    92   /// \warning If kruskal is run on an
    92   /// \warning If kruskal is run on an
    93   /// \ref lemon::concept::UGraph "undirected graph", be sure that the
    93   /// \ref lemon::concept::UGraph "undirected graph", be sure that the
   298   /// purpose exist this class that wraps around an STL iterator with a
   298   /// purpose exist this class that wraps around an STL iterator with a
   299   /// writable bool map interface. When a key gets value "true" this key
   299   /// writable bool map interface. When a key gets value "true" this key
   300   /// is added to sequence pointed by the iterator.
   300   /// is added to sequence pointed by the iterator.
   301   ///
   301   ///
   302   /// A typical usage:
   302   /// A typical usage:
   303   /// \code
   303   ///\code
   304   /// std::vector<Graph::Edge> v;
   304   /// std::vector<Graph::Edge> v;
   305   /// kruskal(g, input, makeKruskalSequenceOutput(back_inserter(v)));
   305   /// kruskal(g, input, makeKruskalSequenceOutput(back_inserter(v)));
   306   /// \endcode
   306   ///\endcode
   307   /// 
   307   /// 
   308   /// For the most common case, when the input is given by a simple edge
   308   /// For the most common case, when the input is given by a simple edge
   309   /// map and the output is a sequence of the tree edges, a special
   309   /// map and the output is a sequence of the tree edges, a special
   310   /// wrapper function exists: \ref kruskalEdgeMap_IteratorOut().
   310   /// wrapper function exists: \ref kruskalEdgeMap_IteratorOut().
   311   ///
   311   ///
   394 //   <tt>GR::Edge</tt> as its <tt>value_type</tt>.
   394 //   <tt>GR::Edge</tt> as its <tt>value_type</tt>.
   395 //   The algorithm copies the elements of the found tree into this sequence.
   395 //   The algorithm copies the elements of the found tree into this sequence.
   396 //   For example, if we know that the spanning tree of the graph \c g has
   396 //   For example, if we know that the spanning tree of the graph \c g has
   397 //   say 53 edges, then
   397 //   say 53 edges, then
   398 //   we can put its edges into a STL vector \c tree with a code like this.
   398 //   we can put its edges into a STL vector \c tree with a code like this.
   399 //   \code
   399 //\code
   400 //   std::vector<Edge> tree(53);
   400 //   std::vector<Edge> tree(53);
   401 //   kruskal(g,cost,tree.begin());
   401 //   kruskal(g,cost,tree.begin());
   402 //   \endcode
   402 //\endcode
   403 //   Or if we don't know in advance the size of the tree, we can write this.
   403 //   Or if we don't know in advance the size of the tree, we can write this.
   404 //   \code
   404 //\code
   405 //   std::vector<Edge> tree;
   405 //   std::vector<Edge> tree;
   406 //   kruskal(g,cost,std::back_inserter(tree));
   406 //   kruskal(g,cost,std::back_inserter(tree));
   407 //   \endcode
   407 //\endcode
   408 //  
   408 //  
   409 //   \return The cost of the found tree.
   409 //   \return The cost of the found tree.
   410 //  
   410 //  
   411 //   \bug its name does not follow the coding style.
   411 //   \bug its name does not follow the coding style.
   412 
   412