1.1 --- a/src/work/athos/kruskal.h Sun Apr 17 18:57:22 2005 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,61 +0,0 @@
1.4 -/*
1.5 -Kruskal's algorithm to find a spanning tree of minimum weight
1.6 -If the graph is not connected, it gives a forest.
1.7 -*/
1.8 -#ifndef KRUSKAL_H
1.9 -#define KRUSKAL_H
1.10 -
1.11 -#include <union_find.h>
1.12 -
1.13 -namespace lemon {
1.14 -
1.15 - template <typename graph_type, typename T>
1.16 - class Kruskal {
1.17 -
1.18 -
1.19 - //Hasznos typedef-ek
1.20 - typedef typename graph_type::NodeIt NodeIt;
1.21 - typedef typename graph_type::EdgeIt EdgeIt;
1.22 - typedef typename graph_type::EachNodeIt EachNodeIt;
1.23 - typedef typename graph_type::EachEdgeIt EachEdgeIt;
1.24 - typedef typename graph_type::SymEdgeIt SymEdgeIt;
1.25 -
1.26 - //input
1.27 - graph_type& G;
1.28 - typename graph_type::EdgeMap<T> &weight;
1.29 -
1.30 - //Auxilliary variables
1.31 - typename graph_type::NodeMap<int> component(flowG);
1.32 -
1.33 - Kruskal(
1.34 - graph_type& _G,
1.35 - typename graph_type::EdgeMap<T> & _weight)
1.36 - : G(_G),
1.37 - weight(_weight),
1.38 - component(-1)
1.39 - {
1.40 - }
1.41 -
1.42 - /*Originally by Misi.*/
1.43 - struct Edge_comp
1.44 - {
1.45 - NodeMap<graph_type, T> &d;
1.46 - Node_dist_comp(NodeMap<graph_type, T> &_d) : d(_d) {}
1.47 -
1.48 - bool operator()(const NodeIt& u, const NodeIt& v) const
1.49 - { return d.get(u) < d.get(v); }
1.50 - };
1.51 -
1.52 -
1.53 - //Runs the algorithm
1.54 - void run() {
1.55 -
1.56 -
1.57 -
1.58 - }
1.59 -
1.60 - }
1.61 -
1.62 -}//namespacc lemon
1.63 -
1.64 -#endif