[906] | 1 | /* -*- C++ -*- |
---|
| 2 | * |
---|
[1956] | 3 | * This file is a part of LEMON, a generic C++ optimization library |
---|
| 4 | * |
---|
| 5 | * Copyright (C) 2003-2006 |
---|
| 6 | * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
---|
[1359] | 7 | * (Egervary Research Group on Combinatorial Optimization, EGRES). |
---|
[906] | 8 | * |
---|
| 9 | * Permission to use, modify and distribute this software is granted |
---|
| 10 | * provided that this copyright notice appears in all copies. For |
---|
| 11 | * precise terms see the accompanying LICENSE file. |
---|
| 12 | * |
---|
| 13 | * This software is provided "AS IS" with no warranty of any kind, |
---|
| 14 | * express or implied, and with no claim as to its suitability for any |
---|
| 15 | * purpose. |
---|
| 16 | * |
---|
| 17 | */ |
---|
| 18 | |
---|
[921] | 19 | #ifndef LEMON_KRUSKAL_H |
---|
| 20 | #define LEMON_KRUSKAL_H |
---|
[810] | 21 | |
---|
| 22 | #include <algorithm> |
---|
[1942] | 23 | #include <vector> |
---|
[921] | 24 | #include <lemon/unionfind.h> |
---|
[1942] | 25 | #include <lemon/utility.h> |
---|
[810] | 26 | |
---|
| 27 | /** |
---|
| 28 | @defgroup spantree Minimum Cost Spanning Tree Algorithms |
---|
| 29 | @ingroup galgs |
---|
| 30 | \brief This group containes the algorithms for finding a minimum cost spanning |
---|
| 31 | tree in a graph |
---|
| 32 | |
---|
| 33 | This group containes the algorithms for finding a minimum cost spanning |
---|
| 34 | tree in a graph |
---|
| 35 | */ |
---|
| 36 | |
---|
| 37 | ///\ingroup spantree |
---|
| 38 | ///\file |
---|
| 39 | ///\brief Kruskal's algorithm to compute a minimum cost tree |
---|
| 40 | /// |
---|
| 41 | ///Kruskal's algorithm to compute a minimum cost tree. |
---|
[1557] | 42 | /// |
---|
| 43 | ///\todo The file still needs some clean-up. |
---|
[810] | 44 | |
---|
[921] | 45 | namespace lemon { |
---|
[810] | 46 | |
---|
| 47 | /// \addtogroup spantree |
---|
| 48 | /// @{ |
---|
| 49 | |
---|
| 50 | /// Kruskal's algorithm to find a minimum cost tree of a graph. |
---|
| 51 | |
---|
| 52 | /// This function runs Kruskal's algorithm to find a minimum cost tree. |
---|
[1557] | 53 | /// Due to hard C++ hacking, it accepts various input and output types. |
---|
| 54 | /// |
---|
[1555] | 55 | /// \param g The graph the algorithm runs on. |
---|
| 56 | /// It can be either \ref concept::StaticGraph "directed" or |
---|
[1909] | 57 | /// \ref concept::UGraph "undirected". |
---|
[1555] | 58 | /// If the graph is directed, the algorithm consider it to be |
---|
| 59 | /// undirected by disregarding the direction of the edges. |
---|
[810] | 60 | /// |
---|
[1557] | 61 | /// \param in This object is used to describe the edge costs. It can be one |
---|
| 62 | /// of the following choices. |
---|
| 63 | /// - An STL compatible 'Forward Container' |
---|
[824] | 64 | /// with <tt>std::pair<GR::Edge,X></tt> as its <tt>value_type</tt>, |
---|
[1557] | 65 | /// where \c X is the type of the costs. The pairs indicates the edges along |
---|
| 66 | /// with the assigned cost. <em>They must be in a |
---|
| 67 | /// cost-ascending order.</em> |
---|
| 68 | /// - Any readable Edge map. The values of the map indicate the edge costs. |
---|
[810] | 69 | /// |
---|
[1557] | 70 | /// \retval out Here we also have a choise. |
---|
| 71 | /// - Is can be a writable \c bool edge map. |
---|
[810] | 72 | /// After running the algorithm |
---|
| 73 | /// this will contain the found minimum cost spanning tree: the value of an |
---|
| 74 | /// edge will be set to \c true if it belongs to the tree, otherwise it will |
---|
| 75 | /// be set to \c false. The value of each edge will be set exactly once. |
---|
[1557] | 76 | /// - It can also be an iteraror of an STL Container with |
---|
| 77 | /// <tt>GR::Edge</tt> as its <tt>value_type</tt>. |
---|
| 78 | /// The algorithm copies the elements of the found tree into this sequence. |
---|
| 79 | /// For example, if we know that the spanning tree of the graph \c g has |
---|
[1603] | 80 | /// say 53 edges, then |
---|
[1557] | 81 | /// we can put its edges into a STL vector \c tree with a code like this. |
---|
[1946] | 82 | ///\code |
---|
[1557] | 83 | /// std::vector<Edge> tree(53); |
---|
| 84 | /// kruskal(g,cost,tree.begin()); |
---|
[1946] | 85 | ///\endcode |
---|
[1557] | 86 | /// Or if we don't know in advance the size of the tree, we can write this. |
---|
[1946] | 87 | ///\code |
---|
[1557] | 88 | /// std::vector<Edge> tree; |
---|
| 89 | /// kruskal(g,cost,std::back_inserter(tree)); |
---|
[1946] | 90 | ///\endcode |
---|
[810] | 91 | /// |
---|
| 92 | /// \return The cost of the found tree. |
---|
[1449] | 93 | /// |
---|
[1631] | 94 | /// \warning If kruskal is run on an |
---|
[1909] | 95 | /// \ref lemon::concept::UGraph "undirected graph", be sure that the |
---|
[1603] | 96 | /// map storing the tree is also undirected |
---|
[1909] | 97 | /// (e.g. ListUGraph::UEdgeMap<bool>, otherwise the values of the |
---|
[1603] | 98 | /// half of the edges will not be set. |
---|
| 99 | /// |
---|
[1449] | 100 | /// \todo Discuss the case of undirected graphs: In this case the algorithm |
---|
[1909] | 101 | /// also require <tt>Edge</tt>s instead of <tt>UEdge</tt>s, as some |
---|
[1449] | 102 | /// people would expect. So, one should be careful not to add both of the |
---|
[1909] | 103 | /// <tt>Edge</tt>s belonging to a certain <tt>UEdge</tt>. |
---|
[1570] | 104 | /// (\ref kruskal() and \ref KruskalMapInput are kind enough to do so.) |
---|
[810] | 105 | |
---|
[1557] | 106 | #ifdef DOXYGEN |
---|
[824] | 107 | template <class GR, class IN, class OUT> |
---|
| 108 | typename IN::value_type::second_type |
---|
[1547] | 109 | kruskal(GR const& g, IN const& in, |
---|
[1557] | 110 | OUT& out) |
---|
| 111 | #else |
---|
| 112 | template <class GR, class IN, class OUT> |
---|
| 113 | typename IN::value_type::second_type |
---|
| 114 | kruskal(GR const& g, IN const& in, |
---|
| 115 | OUT& out, |
---|
| 116 | // typename IN::value_type::first_type = typename GR::Edge() |
---|
| 117 | // ,typename OUT::Key = OUT::Key() |
---|
| 118 | // //,typename OUT::Key = typename GR::Edge() |
---|
| 119 | const typename IN::value_type::first_type * = |
---|
| 120 | (const typename IN::value_type::first_type *)(0), |
---|
| 121 | const typename OUT::Key * = (const typename OUT::Key *)(0) |
---|
| 122 | ) |
---|
| 123 | #endif |
---|
[810] | 124 | { |
---|
[824] | 125 | typedef typename IN::value_type::second_type EdgeCost; |
---|
| 126 | typedef typename GR::template NodeMap<int> NodeIntMap; |
---|
| 127 | typedef typename GR::Node Node; |
---|
[810] | 128 | |
---|
[1547] | 129 | NodeIntMap comp(g, -1); |
---|
[810] | 130 | UnionFind<Node,NodeIntMap> uf(comp); |
---|
| 131 | |
---|
| 132 | EdgeCost tot_cost = 0; |
---|
[824] | 133 | for (typename IN::const_iterator p = in.begin(); |
---|
[810] | 134 | p!=in.end(); ++p ) { |
---|
[1547] | 135 | if ( uf.join(g.target((*p).first), |
---|
| 136 | g.source((*p).first)) ) { |
---|
[810] | 137 | out.set((*p).first, true); |
---|
| 138 | tot_cost += (*p).second; |
---|
| 139 | } |
---|
| 140 | else { |
---|
| 141 | out.set((*p).first, false); |
---|
| 142 | } |
---|
| 143 | } |
---|
| 144 | return tot_cost; |
---|
| 145 | } |
---|
| 146 | |
---|
[1557] | 147 | |
---|
| 148 | /// @} |
---|
| 149 | |
---|
| 150 | |
---|
[810] | 151 | /* A work-around for running Kruskal with const-reference bool maps... */ |
---|
| 152 | |
---|
[885] | 153 | /// Helper class for calling kruskal with "constant" output map. |
---|
| 154 | |
---|
| 155 | /// Helper class for calling kruskal with output maps constructed |
---|
| 156 | /// on-the-fly. |
---|
[810] | 157 | /// |
---|
[885] | 158 | /// A typical examle is the following call: |
---|
[1547] | 159 | /// <tt>kruskal(g, some_input, makeSequenceOutput(iterator))</tt>. |
---|
[885] | 160 | /// Here, the third argument is a temporary object (which wraps around an |
---|
| 161 | /// iterator with a writable bool map interface), and thus by rules of C++ |
---|
| 162 | /// is a \c const object. To enable call like this exist this class and |
---|
| 163 | /// the prototype of the \ref kruskal() function with <tt>const& OUT</tt> |
---|
| 164 | /// third argument. |
---|
[824] | 165 | template<class Map> |
---|
[810] | 166 | class NonConstMapWr { |
---|
| 167 | const Map &m; |
---|
| 168 | public: |
---|
[1557] | 169 | typedef typename Map::Key Key; |
---|
[987] | 170 | typedef typename Map::Value Value; |
---|
[810] | 171 | |
---|
| 172 | NonConstMapWr(const Map &_m) : m(_m) {} |
---|
| 173 | |
---|
[987] | 174 | template<class Key> |
---|
| 175 | void set(Key const& k, Value const &v) const { m.set(k,v); } |
---|
[810] | 176 | }; |
---|
| 177 | |
---|
[824] | 178 | template <class GR, class IN, class OUT> |
---|
[810] | 179 | inline |
---|
[885] | 180 | typename IN::value_type::second_type |
---|
[1557] | 181 | kruskal(GR const& g, IN const& edges, OUT const& out_map, |
---|
| 182 | // typename IN::value_type::first_type = typename GR::Edge(), |
---|
| 183 | // typename OUT::Key = GR::Edge() |
---|
| 184 | const typename IN::value_type::first_type * = |
---|
| 185 | (const typename IN::value_type::first_type *)(0), |
---|
| 186 | const typename OUT::Key * = (const typename OUT::Key *)(0) |
---|
| 187 | ) |
---|
[810] | 188 | { |
---|
[824] | 189 | NonConstMapWr<OUT> map_wr(out_map); |
---|
[1547] | 190 | return kruskal(g, edges, map_wr); |
---|
[810] | 191 | } |
---|
| 192 | |
---|
| 193 | /* ** ** Input-objects ** ** */ |
---|
| 194 | |
---|
[1274] | 195 | /// Kruskal's input source. |
---|
[1557] | 196 | |
---|
[1274] | 197 | /// Kruskal's input source. |
---|
[810] | 198 | /// |
---|
[1570] | 199 | /// In most cases you possibly want to use the \ref kruskal() instead. |
---|
[810] | 200 | /// |
---|
| 201 | /// \sa makeKruskalMapInput() |
---|
| 202 | /// |
---|
[824] | 203 | ///\param GR The type of the graph the algorithm runs on. |
---|
[810] | 204 | ///\param Map An edge map containing the cost of the edges. |
---|
| 205 | ///\par |
---|
| 206 | ///The cost type can be any type satisfying |
---|
| 207 | ///the STL 'LessThan comparable' |
---|
| 208 | ///concept if it also has an operator+() implemented. (It is necessary for |
---|
| 209 | ///computing the total cost of the tree). |
---|
| 210 | /// |
---|
[824] | 211 | template<class GR, class Map> |
---|
[810] | 212 | class KruskalMapInput |
---|
[824] | 213 | : public std::vector< std::pair<typename GR::Edge, |
---|
[987] | 214 | typename Map::Value> > { |
---|
[810] | 215 | |
---|
| 216 | public: |
---|
[824] | 217 | typedef std::vector< std::pair<typename GR::Edge, |
---|
[987] | 218 | typename Map::Value> > Parent; |
---|
[810] | 219 | typedef typename Parent::value_type value_type; |
---|
| 220 | |
---|
| 221 | private: |
---|
| 222 | class comparePair { |
---|
| 223 | public: |
---|
| 224 | bool operator()(const value_type& a, |
---|
| 225 | const value_type& b) { |
---|
| 226 | return a.second < b.second; |
---|
| 227 | } |
---|
| 228 | }; |
---|
| 229 | |
---|
[1449] | 230 | template<class _GR> |
---|
[1909] | 231 | typename enable_if<typename _GR::UTag,void>::type |
---|
[1547] | 232 | fillWithEdges(const _GR& g, const Map& m,dummy<0> = 0) |
---|
[1449] | 233 | { |
---|
[1909] | 234 | for(typename GR::UEdgeIt e(g);e!=INVALID;++e) |
---|
[1679] | 235 | push_back(value_type(g.direct(e, true), m[e])); |
---|
[1449] | 236 | } |
---|
| 237 | |
---|
| 238 | template<class _GR> |
---|
[1909] | 239 | typename disable_if<typename _GR::UTag,void>::type |
---|
[1547] | 240 | fillWithEdges(const _GR& g, const Map& m,dummy<1> = 1) |
---|
[1449] | 241 | { |
---|
[1547] | 242 | for(typename GR::EdgeIt e(g);e!=INVALID;++e) |
---|
[1449] | 243 | push_back(value_type(e, m[e])); |
---|
| 244 | } |
---|
| 245 | |
---|
| 246 | |
---|
[810] | 247 | public: |
---|
| 248 | |
---|
| 249 | void sort() { |
---|
| 250 | std::sort(this->begin(), this->end(), comparePair()); |
---|
| 251 | } |
---|
| 252 | |
---|
[1547] | 253 | KruskalMapInput(GR const& g, Map const& m) { |
---|
| 254 | fillWithEdges(g,m); |
---|
[810] | 255 | sort(); |
---|
| 256 | } |
---|
| 257 | }; |
---|
| 258 | |
---|
| 259 | /// Creates a KruskalMapInput object for \ref kruskal() |
---|
| 260 | |
---|
[1274] | 261 | /// It makes easier to use |
---|
[810] | 262 | /// \ref KruskalMapInput by making it unnecessary |
---|
| 263 | /// to explicitly give the type of the parameters. |
---|
| 264 | /// |
---|
| 265 | /// In most cases you possibly |
---|
[1570] | 266 | /// want to use \ref kruskal() instead. |
---|
[810] | 267 | /// |
---|
[1547] | 268 | ///\param g The type of the graph the algorithm runs on. |
---|
[810] | 269 | ///\param m An edge map containing the cost of the edges. |
---|
| 270 | ///\par |
---|
| 271 | ///The cost type can be any type satisfying the |
---|
| 272 | ///STL 'LessThan Comparable' |
---|
| 273 | ///concept if it also has an operator+() implemented. (It is necessary for |
---|
| 274 | ///computing the total cost of the tree). |
---|
| 275 | /// |
---|
| 276 | ///\return An appropriate input source for \ref kruskal(). |
---|
| 277 | /// |
---|
[824] | 278 | template<class GR, class Map> |
---|
[810] | 279 | inline |
---|
[1547] | 280 | KruskalMapInput<GR,Map> makeKruskalMapInput(const GR &g,const Map &m) |
---|
[810] | 281 | { |
---|
[1547] | 282 | return KruskalMapInput<GR,Map>(g,m); |
---|
[810] | 283 | } |
---|
| 284 | |
---|
| 285 | |
---|
[885] | 286 | |
---|
| 287 | /* ** ** Output-objects: simple writable bool maps ** ** */ |
---|
[810] | 288 | |
---|
[885] | 289 | |
---|
| 290 | |
---|
[810] | 291 | /// A writable bool-map that makes a sequence of "true" keys |
---|
| 292 | |
---|
| 293 | /// A writable bool-map that creates a sequence out of keys that receives |
---|
| 294 | /// the value "true". |
---|
[885] | 295 | /// |
---|
| 296 | /// \sa makeKruskalSequenceOutput() |
---|
| 297 | /// |
---|
| 298 | /// Very often, when looking for a min cost spanning tree, we want as |
---|
| 299 | /// output a container containing the edges of the found tree. For this |
---|
| 300 | /// purpose exist this class that wraps around an STL iterator with a |
---|
| 301 | /// writable bool map interface. When a key gets value "true" this key |
---|
| 302 | /// is added to sequence pointed by the iterator. |
---|
| 303 | /// |
---|
| 304 | /// A typical usage: |
---|
[1946] | 305 | ///\code |
---|
[885] | 306 | /// std::vector<Graph::Edge> v; |
---|
| 307 | /// kruskal(g, input, makeKruskalSequenceOutput(back_inserter(v))); |
---|
[1946] | 308 | ///\endcode |
---|
[885] | 309 | /// |
---|
| 310 | /// For the most common case, when the input is given by a simple edge |
---|
| 311 | /// map and the output is a sequence of the tree edges, a special |
---|
| 312 | /// wrapper function exists: \ref kruskalEdgeMap_IteratorOut(). |
---|
| 313 | /// |
---|
[987] | 314 | /// \warning Not a regular property map, as it doesn't know its Key |
---|
[885] | 315 | |
---|
[824] | 316 | template<class Iterator> |
---|
[885] | 317 | class KruskalSequenceOutput { |
---|
[810] | 318 | mutable Iterator it; |
---|
| 319 | |
---|
| 320 | public: |
---|
[1942] | 321 | typedef typename std::iterator_traits<Iterator>::value_type Key; |
---|
[987] | 322 | typedef bool Value; |
---|
[810] | 323 | |
---|
[885] | 324 | KruskalSequenceOutput(Iterator const &_it) : it(_it) {} |
---|
[810] | 325 | |
---|
[987] | 326 | template<typename Key> |
---|
| 327 | void set(Key const& k, bool v) const { if(v) {*it=k; ++it;} } |
---|
[810] | 328 | }; |
---|
| 329 | |
---|
[824] | 330 | template<class Iterator> |
---|
[810] | 331 | inline |
---|
[885] | 332 | KruskalSequenceOutput<Iterator> |
---|
| 333 | makeKruskalSequenceOutput(Iterator it) { |
---|
| 334 | return KruskalSequenceOutput<Iterator>(it); |
---|
[810] | 335 | } |
---|
| 336 | |
---|
[885] | 337 | |
---|
| 338 | |
---|
[810] | 339 | /* ** ** Wrapper funtions ** ** */ |
---|
| 340 | |
---|
[1557] | 341 | // \brief Wrapper function to kruskal(). |
---|
| 342 | // Input is from an edge map, output is a plain bool map. |
---|
| 343 | // |
---|
| 344 | // Wrapper function to kruskal(). |
---|
| 345 | // Input is from an edge map, output is a plain bool map. |
---|
| 346 | // |
---|
| 347 | // \param g The type of the graph the algorithm runs on. |
---|
| 348 | // \param in An edge map containing the cost of the edges. |
---|
| 349 | // \par |
---|
| 350 | // The cost type can be any type satisfying the |
---|
| 351 | // STL 'LessThan Comparable' |
---|
| 352 | // concept if it also has an operator+() implemented. (It is necessary for |
---|
| 353 | // computing the total cost of the tree). |
---|
| 354 | // |
---|
| 355 | // \retval out This must be a writable \c bool edge map. |
---|
| 356 | // After running the algorithm |
---|
| 357 | // this will contain the found minimum cost spanning tree: the value of an |
---|
| 358 | // edge will be set to \c true if it belongs to the tree, otherwise it will |
---|
| 359 | // be set to \c false. The value of each edge will be set exactly once. |
---|
| 360 | // |
---|
| 361 | // \return The cost of the found tree. |
---|
[810] | 362 | |
---|
[824] | 363 | template <class GR, class IN, class RET> |
---|
[810] | 364 | inline |
---|
[987] | 365 | typename IN::Value |
---|
[1557] | 366 | kruskal(GR const& g, |
---|
| 367 | IN const& in, |
---|
| 368 | RET &out, |
---|
| 369 | // typename IN::Key = typename GR::Edge(), |
---|
| 370 | //typename IN::Key = typename IN::Key (), |
---|
| 371 | // typename RET::Key = typename GR::Edge() |
---|
| 372 | const typename IN::Key * = (const typename IN::Key *)(0), |
---|
| 373 | const typename RET::Key * = (const typename RET::Key *)(0) |
---|
| 374 | ) |
---|
| 375 | { |
---|
[1547] | 376 | return kruskal(g, |
---|
| 377 | KruskalMapInput<GR,IN>(g,in), |
---|
[810] | 378 | out); |
---|
| 379 | } |
---|
| 380 | |
---|
[1557] | 381 | // \brief Wrapper function to kruskal(). |
---|
| 382 | // Input is from an edge map, output is an STL Sequence. |
---|
| 383 | // |
---|
| 384 | // Wrapper function to kruskal(). |
---|
| 385 | // Input is from an edge map, output is an STL Sequence. |
---|
| 386 | // |
---|
| 387 | // \param g The type of the graph the algorithm runs on. |
---|
| 388 | // \param in An edge map containing the cost of the edges. |
---|
| 389 | // \par |
---|
| 390 | // The cost type can be any type satisfying the |
---|
| 391 | // STL 'LessThan Comparable' |
---|
| 392 | // concept if it also has an operator+() implemented. (It is necessary for |
---|
| 393 | // computing the total cost of the tree). |
---|
| 394 | // |
---|
| 395 | // \retval out This must be an iteraror of an STL Container with |
---|
| 396 | // <tt>GR::Edge</tt> as its <tt>value_type</tt>. |
---|
| 397 | // The algorithm copies the elements of the found tree into this sequence. |
---|
| 398 | // For example, if we know that the spanning tree of the graph \c g has |
---|
[1603] | 399 | // say 53 edges, then |
---|
[1557] | 400 | // we can put its edges into a STL vector \c tree with a code like this. |
---|
[1946] | 401 | //\code |
---|
[1557] | 402 | // std::vector<Edge> tree(53); |
---|
[1570] | 403 | // kruskal(g,cost,tree.begin()); |
---|
[1946] | 404 | //\endcode |
---|
[1557] | 405 | // Or if we don't know in advance the size of the tree, we can write this. |
---|
[1946] | 406 | //\code |
---|
[1557] | 407 | // std::vector<Edge> tree; |
---|
[1570] | 408 | // kruskal(g,cost,std::back_inserter(tree)); |
---|
[1946] | 409 | //\endcode |
---|
[1557] | 410 | // |
---|
| 411 | // \return The cost of the found tree. |
---|
| 412 | // |
---|
| 413 | // \bug its name does not follow the coding style. |
---|
[885] | 414 | |
---|
[824] | 415 | template <class GR, class IN, class RET> |
---|
[810] | 416 | inline |
---|
[987] | 417 | typename IN::Value |
---|
[1557] | 418 | kruskal(const GR& g, |
---|
| 419 | const IN& in, |
---|
| 420 | RET out, |
---|
| 421 | const typename RET::value_type * = |
---|
| 422 | (const typename RET::value_type *)(0) |
---|
| 423 | ) |
---|
[810] | 424 | { |
---|
[885] | 425 | KruskalSequenceOutput<RET> _out(out); |
---|
[1547] | 426 | return kruskal(g, KruskalMapInput<GR,IN>(g, in), _out); |
---|
[810] | 427 | } |
---|
[1557] | 428 | |
---|
[1942] | 429 | template <class GR, class IN, class RET> |
---|
| 430 | inline |
---|
| 431 | typename IN::Value |
---|
| 432 | kruskal(const GR& g, |
---|
| 433 | const IN& in, |
---|
| 434 | RET *out |
---|
| 435 | ) |
---|
| 436 | { |
---|
| 437 | KruskalSequenceOutput<RET*> _out(out); |
---|
| 438 | return kruskal(g, KruskalMapInput<GR,IN>(g, in), _out); |
---|
| 439 | } |
---|
| 440 | |
---|
[810] | 441 | /// @} |
---|
| 442 | |
---|
[921] | 443 | } //namespace lemon |
---|
[810] | 444 | |
---|
[921] | 445 | #endif //LEMON_KRUSKAL_H |
---|