equal
deleted
inserted
replaced
90 /// |
90 /// |
91 /// \todo Discuss the case of undirected graphs: In this case the algorithm |
91 /// \todo Discuss the case of undirected graphs: In this case the algorithm |
92 /// also require <tt>Edge</tt>s instead of <tt>UndirEdge</tt>s, as some |
92 /// also require <tt>Edge</tt>s instead of <tt>UndirEdge</tt>s, as some |
93 /// people would expect. So, one should be careful not to add both of the |
93 /// people would expect. So, one should be careful not to add both of the |
94 /// <tt>Edge</tt>s belonging to a certain <tt>UndirEdge</tt>. |
94 /// <tt>Edge</tt>s belonging to a certain <tt>UndirEdge</tt>. |
95 /// (\ref kruskalEdgeMap() and \ref KruskalMapInput are kind enough to do so.) |
95 /// (\ref kruskal() and \ref KruskalMapInput are kind enough to do so.) |
96 |
96 |
97 #ifdef DOXYGEN |
97 #ifdef DOXYGEN |
98 template <class GR, class IN, class OUT> |
98 template <class GR, class IN, class OUT> |
99 typename IN::value_type::second_type |
99 typename IN::value_type::second_type |
100 kruskal(GR const& g, IN const& in, |
100 kruskal(GR const& g, IN const& in, |
185 |
185 |
186 /// Kruskal's input source. |
186 /// Kruskal's input source. |
187 |
187 |
188 /// Kruskal's input source. |
188 /// Kruskal's input source. |
189 /// |
189 /// |
190 /// In most cases you possibly want to use the \ref kruskalEdgeMap() instead. |
190 /// In most cases you possibly want to use the \ref kruskal() instead. |
191 /// |
191 /// |
192 /// \sa makeKruskalMapInput() |
192 /// \sa makeKruskalMapInput() |
193 /// |
193 /// |
194 ///\param GR The type of the graph the algorithm runs on. |
194 ///\param GR The type of the graph the algorithm runs on. |
195 ///\param Map An edge map containing the cost of the edges. |
195 ///\param Map An edge map containing the cost of the edges. |
252 /// It makes easier to use |
252 /// It makes easier to use |
253 /// \ref KruskalMapInput by making it unnecessary |
253 /// \ref KruskalMapInput by making it unnecessary |
254 /// to explicitly give the type of the parameters. |
254 /// to explicitly give the type of the parameters. |
255 /// |
255 /// |
256 /// In most cases you possibly |
256 /// In most cases you possibly |
257 /// want to use the function kruskalEdgeMap() instead. |
257 /// want to use \ref kruskal() instead. |
258 /// |
258 /// |
259 ///\param g The type of the graph the algorithm runs on. |
259 ///\param g The type of the graph the algorithm runs on. |
260 ///\param m An edge map containing the cost of the edges. |
260 ///\param m An edge map containing the cost of the edges. |
261 ///\par |
261 ///\par |
262 ///The cost type can be any type satisfying the |
262 ///The cost type can be any type satisfying the |
389 // For example, if we know that the spanning tree of the graph \c g has |
389 // For example, if we know that the spanning tree of the graph \c g has |
390 // say 53 edges then |
390 // say 53 edges then |
391 // we can put its edges into a STL vector \c tree with a code like this. |
391 // we can put its edges into a STL vector \c tree with a code like this. |
392 // \code |
392 // \code |
393 // std::vector<Edge> tree(53); |
393 // std::vector<Edge> tree(53); |
394 // kruskalEdgeMap_IteratorOut(g,cost,tree.begin()); |
394 // kruskal(g,cost,tree.begin()); |
395 // \endcode |
395 // \endcode |
396 // Or if we don't know in advance the size of the tree, we can write this. |
396 // Or if we don't know in advance the size of the tree, we can write this. |
397 // \code |
397 // \code |
398 // std::vector<Edge> tree; |
398 // std::vector<Edge> tree; |
399 // kruskalEdgeMap_IteratorOut(g,cost,std::back_inserter(tree)); |
399 // kruskal(g,cost,std::back_inserter(tree)); |
400 // \endcode |
400 // \endcode |
401 // |
401 // |
402 // \return The cost of the found tree. |
402 // \return The cost of the found tree. |
403 // |
403 // |
404 // \bug its name does not follow the coding style. |
404 // \bug its name does not follow the coding style. |