equal
deleted
inserted
replaced
3 #define HUGO_KRUSKAL_H |
3 #define HUGO_KRUSKAL_H |
4 |
4 |
5 #include <algorithm> |
5 #include <algorithm> |
6 #include <hugo/unionfind.h> |
6 #include <hugo/unionfind.h> |
7 |
7 |
|
8 /** |
|
9 @defgroup spantree Minimum Cost Spanning Tree Algorithms |
|
10 \brief This group containes the algorithms for finding a minimum cost spanning |
|
11 tree in a graph |
|
12 @ingroup galgs |
|
13 */ |
|
14 |
|
15 ///\ingroup spantree |
8 ///\file |
16 ///\file |
9 ///\brief Kruskal's algorithm to compute a minimum cost tree |
17 ///\brief Kruskal's algorithm to compute a minimum cost tree |
10 |
18 |
11 namespace hugo { |
19 namespace hugo { |
|
20 |
|
21 /// \addtogroup spantree |
|
22 /// @{ |
12 |
23 |
13 /// Kruskal's algorithm to find a minimum cost tree of a graph. |
24 /// Kruskal's algorithm to find a minimum cost tree of a graph. |
14 |
25 |
15 /// This function runs Kruskal's algorithm to find a minimum cost tree. |
26 /// This function runs Kruskal's algorithm to find a minimum cost tree. |
16 /// \param G The graph the algorithm runs on. |
27 /// \param G The graph the algorithm runs on. |
291 InputVec iv(G, edge_costs); |
302 InputVec iv(G, edge_costs); |
292 |
303 |
293 return kruskal(G, iv, out); |
304 return kruskal(G, iv, out); |
294 } |
305 } |
295 |
306 |
|
307 /// @} |
296 |
308 |
297 } //namespace hugo |
309 } //namespace hugo |
298 |
310 |
299 #endif //HUGO_KRUSKAL_H |
311 #endif //HUGO_KRUSKAL_H |