bip matching comparison
authormarci
Tue, 11 May 2004 21:26:29 +0000
changeset 617dc17013b0e52
parent 616 31879aac4dc3
child 618 e944d741f472
bip matching comparison
src/work/makefile
src/work/marci/leda/comparison.cc
src/work/marci/leda/leda_graph_wrapper.h
src/work/marci/leda/makefile
     1.1 --- a/src/work/makefile	Tue May 11 20:20:41 2004 +0000
     1.2 +++ b/src/work/makefile	Tue May 11 21:26:29 2004 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4  INCLUDEDIRS ?= -I../include -I. -I./{marci,jacint,alpar,klao,akos}
     1.5 -CXXFLAGS = -g -O0 -W -Wall $(INCLUDEDIRS) -ansi -pedantic
     1.6 +CXXFLAGS = -g -O3 -W -Wall $(INCLUDEDIRS) -ansi -pedantic
     1.7  
     1.8  BINARIES ?= bin_heap_demo
     1.9  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/src/work/marci/leda/comparison.cc	Tue May 11 21:26:29 2004 +0000
     2.3 @@ -0,0 +1,170 @@
     2.4 +// -*- c++ -*-
     2.5 +#include <iostream>
     2.6 +#include <fstream>
     2.7 +#include <vector>
     2.8 +#include <cstdlib>
     2.9 +
    2.10 +#include <LEDA/graph.h>
    2.11 +#include <LEDA/mcb_matching.h>
    2.12 +#include <LEDA/list.h>
    2.13 +#include <LEDA/graph_gen.h>
    2.14 +
    2.15 +#include <leda_graph_wrapper.h>
    2.16 +#include <list_graph.h>
    2.17 +//#include <smart_graph.h>
    2.18 +//#include <dimacs.h>
    2.19 +#include <hugo/time_measure.h>
    2.20 +#include <for_each_macros.h>
    2.21 +#include <hugo/graph_wrapper.h>
    2.22 +#include <bipartite_graph_wrapper.h>
    2.23 +#include <hugo/maps.h>
    2.24 +#include <max_flow.h>
    2.25 +
    2.26 +/**
    2.27 + * Inicializalja a veletlenszamgeneratort.
    2.28 + * Figyelem, ez nem jo igazi random szamokhoz,
    2.29 + * erre ne bizzad a titkaidat!
    2.30 + */
    2.31 +void random_init()
    2.32 +{
    2.33 +	unsigned int seed = getpid();
    2.34 +	seed |= seed << 15;
    2.35 +	seed ^= time(0);
    2.36 +
    2.37 +	srand(seed);
    2.38 +}
    2.39 +
    2.40 +/**
    2.41 + * Egy veletlen int-et ad vissza 0 es m-1 kozott.
    2.42 + */
    2.43 +int random(int m)
    2.44 +{
    2.45 +  return int( double(m) * rand() / (RAND_MAX + 1.0) );
    2.46 +}
    2.47 +
    2.48 +using namespace hugo;
    2.49 +
    2.50 +int main() {
    2.51 +  //for leda graph
    2.52 +  leda::graph lg;
    2.53 +  //lg.make_undirected();
    2.54 +  typedef LedaGraphWrapper<leda::graph> Graph;
    2.55 +  Graph g(lg);
    2.56 +
    2.57 +  //for UndirListGraph
    2.58 +  //typedef UndirListGraph Graph; 
    2.59 +  //Graph g;
    2.60 +
    2.61 +  typedef Graph::Node Node;
    2.62 +  typedef Graph::NodeIt NodeIt;
    2.63 +  typedef Graph::Edge Edge;
    2.64 +  typedef Graph::EdgeIt EdgeIt;
    2.65 +  typedef Graph::OutEdgeIt OutEdgeIt;
    2.66 +
    2.67 +  std::vector<Graph::Node> s_nodes;
    2.68 +  std::vector<Graph::Node> t_nodes;
    2.69 +
    2.70 +  int a;
    2.71 +  std::cout << "number of nodes in the first color class=";
    2.72 +  std::cin >> a; 
    2.73 +  int b;
    2.74 +  std::cout << "number of nodes in the second color class=";
    2.75 +  std::cin >> b; 
    2.76 +  int m;
    2.77 +  std::cout << "number of edges=";
    2.78 +  std::cin >> m; 
    2.79 +  int k;
    2.80 +  std::cout << "A bipartite graph is a random group graph if the color classes \nA and B are partitiones to A_0, A_1, ..., A_{k-1} and B_0, B_1, ..., B_{k-1} \nas equally as possible \nand the edges from A_i goes to A_{i-1 mod k} and A_{i+1 mod k}.\n";
    2.81 +  std::cout << "number of groups in LEDA random group graph=";
    2.82 +  std::cin >> k; 
    2.83 +  std::cout << std::endl;
    2.84 +  
    2.85 +  leda_list<leda_node> lS;
    2.86 +  leda_list<leda_node> lT;
    2.87 +  random_bigraph(lg, a, b, m, lS, lT, k);
    2.88 +
    2.89 +  Graph::NodeMap<int> ref_map(g, -1);
    2.90 +  IterableBoolMap< Graph::NodeMap<int> > bipartite_map(ref_map);
    2.91 +
    2.92 +  //generating leda random group graph
    2.93 +  leda_node ln;
    2.94 +  forall(ln, lS) bipartite_map.insert(ln, false);
    2.95 +  forall(ln, lT) bipartite_map.insert(ln, true);
    2.96 +
    2.97 +  //making bipartite graph
    2.98 +  typedef BipartiteGraphWrapper<Graph> BGW;
    2.99 +  BGW bgw(g, bipartite_map);
   2.100 +
   2.101 +
   2.102 +  //st-wrapper
   2.103 +  typedef stGraphWrapper<BGW> stGW;
   2.104 +  stGW stgw(bgw);
   2.105 +  ConstMap<stGW::Edge, int> const1map(1);
   2.106 +  stGW::EdgeMap<int> flow(stgw);
   2.107 +
   2.108 +  Timer ts;
   2.109 +
   2.110 +  ts.reset();
   2.111 +  FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0);
   2.112 +  MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> > 
   2.113 +    max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow/*, true*/);
   2.114 +  max_flow_test.run();
   2.115 +  std::cout << "HUGO max matching algorithm based on preflow." << std::endl 
   2.116 +	    << "Size of matching: " 
   2.117 +	    << max_flow_test.flowValue() << std::endl;
   2.118 +  std::cout << "elapsed time: " << ts << std::endl << std::endl;
   2.119 +
   2.120 +  ts.reset();  
   2.121 +  leda_list<leda_edge> ml=MAX_CARD_BIPARTITE_MATCHING(lg);
   2.122 +  std::cout << "LEDA max matching algorithm." << std::endl 
   2.123 +	    << "Size of matching: " 
   2.124 +	    << ml.size() << std::endl;
   2.125 +  std::cout << "elapsed time: " << ts << std::endl << std::endl;
   2.126 +
   2.127 +//   ts.reset();
   2.128 +//   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0);
   2.129 +//   typedef ListGraph MutableGraph;
   2.130 +//   while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { }
   2.131 +//   std::cout << "HUGO max matching algorithm based on blocking flow augmentation." 
   2.132 +// 	    << std::endl << "Matching size: " 
   2.133 +// 	    << max_flow_test.flowValue() << std::endl;
   2.134 +//   std::cout << "elapsed time: " << ts << std::endl << std::endl;
   2.135 +
   2.136 +  {
   2.137 +  ListGraph hg;
   2.138 +  ListGraph::Node s=hg.addNode();  
   2.139 +  ListGraph::Node t=hg.addNode();
   2.140 +  BGW::NodeMap<ListGraph::Node> b_s_nodes(bgw);  
   2.141 +  BGW::NodeMap<ListGraph::Node> b_t_nodes(bgw);
   2.142 +  
   2.143 +  FOR_EACH_INC_LOC(BGW::ClassNodeIt, n, bgw, BGW::S_CLASS) {
   2.144 +    b_s_nodes.set(n, hg.addNode());
   2.145 +    hg.addEdge(s, b_s_nodes[n]);
   2.146 +  }
   2.147 +  FOR_EACH_INC_LOC(BGW::ClassNodeIt, n, bgw, BGW::T_CLASS) {
   2.148 +    b_t_nodes.set(n, hg.addNode());
   2.149 +    hg.addEdge(b_t_nodes[n], t);
   2.150 +  }
   2.151 +
   2.152 +  FOR_EACH_LOC(BGW::EdgeIt, e, bgw) 
   2.153 +    hg.addEdge(b_s_nodes[bgw.tail(e)], b_t_nodes[bgw.head(e)]);
   2.154 +
   2.155 +  ConstMap<ListGraph::Edge, int> cm(1);
   2.156 +  ListGraph::EdgeMap<int> flow(hg); //0
   2.157 +  
   2.158 +  Timer ts;
   2.159 +
   2.160 +  ts.reset();
   2.161 +  MaxFlow<ListGraph, int, ConstMap<ListGraph::Edge, int>, 
   2.162 +    ListGraph::EdgeMap<int> > 
   2.163 +    max_flow_test(hg, s, t, cm, flow);
   2.164 +  max_flow_test.run();
   2.165 +  std::cout << "HUGO max matching algorithm on ListGraph by copying the graph, based on preflow." 
   2.166 +	    << std::endl 
   2.167 +	    << "Size of matching: " 
   2.168 +	    << max_flow_test.flowValue() << std::endl;
   2.169 +  std::cout << "elapsed time: " << ts << std::endl << std::endl;
   2.170 +  }
   2.171 +
   2.172 +  return 0;
   2.173 +}
     3.1 --- a/src/work/marci/leda/leda_graph_wrapper.h	Tue May 11 20:20:41 2004 +0000
     3.2 +++ b/src/work/marci/leda/leda_graph_wrapper.h	Tue May 11 21:26:29 2004 +0000
     3.3 @@ -16,42 +16,27 @@
     3.4  
     3.5  #include <hugo/invalid.h>
     3.6  
     3.7 -/// The namespace of HugoLib
     3.8  namespace hugo {
     3.9  
    3.10 -  // @defgroup empty_graph The LedaGraphWrapper class
    3.11 -  // @{
    3.12 -
    3.13 -  /// A graph wrapperstructure for wrapping LEDA graphs in HUGO.
    3.14 -  
    3.15 -  /// This graph wrapper class wraps LEDA graph and LEDA parametrized graph
    3.16 -  /// and then the generic algorithms and wrappers of HUGO can be used 
    3.17 +  /// \brief A graph wrapper structure for wrapping LEDA graphs in HUGO.
    3.18 +  ///
    3.19 +  /// This graph wrapper class wraps LEDA graphs and LEDA parametrized graphs
    3.20 +  /// to satisfy HUGO graph concepts.
    3.21 +  /// Then the generic HUGOlib algorithms and wrappers can be used 
    3.22    /// with LEDA graphs. 
    3.23 -  /// This class provides all the common features of a grapf structure,
    3.24 -  /// however completely without implementations or real data structures
    3.25 -  /// behind the interface.
    3.26 -  /// All graph algorithms should compile with this class, but it will not
    3.27 -  /// run properly, of course.
    3.28 -  ///
    3.29 -  /// It can be used for checking the interface compatibility,
    3.30 -  /// or it can serve as a skeleton of a new graph structure.
    3.31 -  /// 
    3.32 -  /// Also, you will find here the full documentation of a certain graph
    3.33 -  /// feature, the documentation of a real graph imlementation
    3.34 -  /// like @ref ListGraph or
    3.35 -  /// @ref SmartGraph will just refer to this structure.
    3.36 +  /// \ingroup gwrapper
    3.37    template<typename Graph>
    3.38    class LedaGraphWrapper
    3.39    {
    3.40    protected:
    3.41 -    Graph* _graph;
    3.42 -    LedaGraphWrapper() : _graph(0) { }
    3.43 -    void setGraph(Graph& __graph) { _graph=&__graph; }
    3.44 +    Graph* l_graph;
    3.45 +    LedaGraphWrapper() : l_graph(0) { }
    3.46 +    void setGraph(Graph& _l_graph) { l_graph=&_l_graph; }
    3.47    public:
    3.48     
    3.49          //LedaGraphWrapper() { }
    3.50 -    LedaGraphWrapper(Graph& __graph) : _graph(&__graph) { }
    3.51 -    LedaGraphWrapper(const LedaGraphWrapper &G) : _graph(G._graph) { }
    3.52 +    LedaGraphWrapper(Graph& _l_graph) : l_graph(&_l_graph) { }
    3.53 +    LedaGraphWrapper(const LedaGraphWrapper &G) : l_graph(G.l_graph) { }
    3.54  
    3.55      template <typename T> class NodeMap;
    3.56      template <typename T> class EdgeMap;
    3.57 @@ -72,19 +57,19 @@
    3.58        friend class OutEdgeIt;
    3.59      protected:
    3.60        template <typename T> friend class NodeMap;
    3.61 -      leda_node _n;
    3.62 +      leda_node l_n;
    3.63      public: //FIXME
    3.64 -      Node(leda_node __n) : _n(__n) { } 
    3.65 +      Node(leda_node _l_n) : l_n(_l_n) { } 
    3.66      public:
    3.67        /// @warning The default constructor sets the iterator
    3.68        /// to an undefined value.
    3.69        Node() {}   //FIXME
    3.70        /// Initialize the iterator to be invalid
    3.71 -      Node(Invalid) : _n(0) { }
    3.72 +      Node(Invalid) : l_n(0) { }
    3.73        //Node(const Node &) {} 
    3.74 -      bool operator==(Node n) const { return _n==n._n; } //FIXME
    3.75 -      bool operator!=(Node n) const { return _n!=n._n; } //FIXME
    3.76 -      operator leda_node () { return _n; }
    3.77 +      bool operator==(Node n) const { return l_n==n.l_n; } //FIXME
    3.78 +      bool operator!=(Node n) const { return l_n!=n.l_n; } //FIXME
    3.79 +      operator leda_node () { return l_n; }
    3.80      };
    3.81      
    3.82      /// This iterator goes through each node.
    3.83 @@ -96,7 +81,7 @@
    3.84        /// Initialize the iterator to be invalid
    3.85        NodeIt(Invalid i) : Node(i) {}
    3.86        /// Sets the iterator to the first node of \c G.
    3.87 -      NodeIt(const LedaGraphWrapper &G) : Node(G._graph->first_node()) { }
    3.88 +      NodeIt(const LedaGraphWrapper &G) : Node(G.l_graph->first_node()) { }
    3.89        //NodeIt(const NodeIt &) {} //FIXME
    3.90      };
    3.91      
    3.92 @@ -105,19 +90,19 @@
    3.93        friend class LedaGraphWrapper;
    3.94      protected:
    3.95        template <typename T> friend class EdgeMap;
    3.96 -      leda_edge _e;
    3.97 +      leda_edge l_e;
    3.98      public: //FIXME
    3.99 -      Edge(leda_edge __e) : _e(__e) { } 
   3.100 +      Edge(leda_edge _l_e) : l_e(_l_e) { } 
   3.101      public:
   3.102        /// @warning The default constructor sets the iterator
   3.103        /// to an undefined value.
   3.104        Edge() {}   //FIXME
   3.105        /// Initialize the iterator to be invalid
   3.106 -      Edge(Invalid) : _e(0) {}
   3.107 +      Edge(Invalid) : l_e(0) {}
   3.108        //Edge(const Edge &) {} 
   3.109 -      bool operator==(Edge e) const { return _e==e._e; } //FIXME
   3.110 -      bool operator!=(Edge e) const { return _e!=e._e; } //FIXME 
   3.111 -      operator leda_edge () { return _e; }
   3.112 +      bool operator==(Edge e) const { return l_e==e.l_e; } //FIXME
   3.113 +      bool operator!=(Edge e) const { return l_e!=e.l_e; } //FIXME 
   3.114 +      operator leda_edge () { return l_e; }
   3.115      };
   3.116      
   3.117      /// This iterator goes trought the outgoing edges of a certain graph.
   3.118 @@ -135,7 +120,7 @@
   3.119        /// node
   3.120        ///@param n the node
   3.121        ///@param G the graph
   3.122 -      OutEdgeIt(const LedaGraphWrapper & G, Node n) : Edge(G._graph->first_adj_edge(n._n)) { }
   3.123 +      OutEdgeIt(const LedaGraphWrapper & G, Node n) : Edge(G.l_graph->first_adj_edge(n.l_n)) { }
   3.124      };
   3.125  
   3.126      class InEdgeIt : public Edge {
   3.127 @@ -145,7 +130,7 @@
   3.128        InEdgeIt() {}
   3.129        /// Initialize the iterator to be invalid
   3.130        InEdgeIt(Invalid i) : Edge(i) {}
   3.131 -      InEdgeIt(const LedaGraphWrapper & G, Node n) : Edge(G._graph->first_in_edge(n._n)) { }
   3.132 +      InEdgeIt(const LedaGraphWrapper & G, Node n) : Edge(G.l_graph->first_in_edge(n.l_n)) { }
   3.133      };
   3.134  
   3.135      //  class SymEdgeIt : public Edge {};
   3.136 @@ -156,7 +141,7 @@
   3.137        EdgeIt() {}
   3.138        /// Initialize the iterator to be invalid
   3.139        EdgeIt(Invalid i) : Edge(i) {}
   3.140 -      EdgeIt(const LedaGraphWrapper & G) : Edge(G._graph->first_edge()) { }
   3.141 +      EdgeIt(const LedaGraphWrapper & G) : Edge(G.l_graph->first_edge()) { }
   3.142      };
   3.143  
   3.144      /// First node of the graph.
   3.145 @@ -189,23 +174,23 @@
   3.146  
   3.147      /// Go to the next node.
   3.148      NodeIt &next(NodeIt &i) const { 
   3.149 -      i._n=_graph->succ_node(i._n); 
   3.150 +      i.l_n=l_graph->succ_node(i.l_n); 
   3.151        return i; 
   3.152      }
   3.153      /// Go to the next incoming edge.
   3.154      InEdgeIt &next(InEdgeIt &i) const { 
   3.155 -      i._e=_graph->in_succ(i._e); 
   3.156 +      i.l_e=l_graph->in_succ(i.l_e); 
   3.157        return i;
   3.158      }
   3.159      /// Go to the next outgoing edge.
   3.160      OutEdgeIt &next(OutEdgeIt &i) const { 
   3.161 -      i._e=_graph->adj_succ(i._e); 
   3.162 +      i.l_e=l_graph->adj_succ(i.l_e); 
   3.163        return i;
   3.164      }
   3.165      //SymEdgeIt &next(SymEdgeIt &) const {}
   3.166      /// Go to the next edge.
   3.167      EdgeIt &next(EdgeIt &i) const {      
   3.168 -      i._e=_graph->succ_edge(i._e); 
   3.169 +      i.l_e=l_graph->succ_edge(i.l_e); 
   3.170        return i; 
   3.171      }
   3.172  
   3.173 @@ -225,11 +210,11 @@
   3.174  
   3.175      ///Gives back the head node of an edge.
   3.176      Node head(Edge e) const { 
   3.177 -      return Node(_graph->target(e._e)); 
   3.178 +      return Node(l_graph->target(e.l_e)); 
   3.179      }
   3.180      ///Gives back the tail node of an edge.
   3.181      Node tail(Edge e) const { 
   3.182 -      return Node(_graph->source(e._e)); 
   3.183 +      return Node(l_graph->source(e.l_e)); 
   3.184      }
   3.185    
   3.186      Node aNode(InEdgeIt e) const { return head(e); }
   3.187 @@ -241,30 +226,30 @@
   3.188      //   Node bNode(SymEdgeIt) const {}
   3.189  
   3.190      /// Checks if a node iterator is valid
   3.191 -    bool valid(Node n) const { return n._n; }
   3.192 +    bool valid(Node n) const { return n.l_n; }
   3.193      /// Checks if an edge iterator is valid
   3.194 -    bool valid(Edge e) const { return e._e; }
   3.195 +    bool valid(Edge e) const { return e.l_e; }
   3.196  
   3.197      ///Gives back the \e id of a node.
   3.198 -    int id(Node n) const { return n._n->id(); }
   3.199 +    int id(Node n) const { return n.l_n->id(); }
   3.200      ///Gives back the \e id of an edge.
   3.201 -    int id(Edge e) const { return e._e->id(); }
   3.202 +    int id(Edge e) const { return e.l_e->id(); }
   3.203  
   3.204      //void setInvalid(Node &) const {};
   3.205      //void setInvalid(Edge &) const {};
   3.206    
   3.207 -    Node addNode() const { return Node(_graph->new_node()); }
   3.208 +    Node addNode() const { return Node(l_graph->new_node()); }
   3.209      Edge addEdge(Node tail, Node head) const { 
   3.210 -      return Edge(_graph->new_edge(tail._n, head._n));
   3.211 +      return Edge(l_graph->new_edge(tail.l_n, head.l_n));
   3.212      }
   3.213      
   3.214 -    void erase(Node n) const { _graph->del_node(n._n); }
   3.215 -    void erase(Edge e) const { _graph->del_edge(e._e); }
   3.216 +    void erase(Node n) const { l_graph->del_node(n.l_n); }
   3.217 +    void erase(Edge e) const { l_graph->del_edge(e.l_e); }
   3.218  
   3.219 -    void clear() const { _graph->clear(); }
   3.220 +    void clear() const { l_graph->clear(); }
   3.221  
   3.222 -    int nodeNum() const { return _graph->number_of_nodes(); }
   3.223 -    int edgeNum() const { return _graph->number_of_edges(); }
   3.224 +    int nodeNum() const { return l_graph->number_of_nodes(); }
   3.225 +    int edgeNum() const { return l_graph->number_of_edges(); }
   3.226  
   3.227      ///Read/write map from the nodes to type \c T.
   3.228      template<typename T> class NodeMap
   3.229 @@ -274,16 +259,16 @@
   3.230        typedef T ValueType;
   3.231        typedef Node KeyType;
   3.232  
   3.233 -      NodeMap(const LedaGraphWrapper &G) : leda_stuff(*(G._graph)) {}
   3.234 -      NodeMap(const LedaGraphWrapper &G, T t) : leda_stuff(*(G._graph), t) {}
   3.235 +      NodeMap(const LedaGraphWrapper &G) : leda_stuff(*(G.l_graph)) {}
   3.236 +      NodeMap(const LedaGraphWrapper &G, T t) : leda_stuff(*(G.l_graph), t) {}
   3.237  
   3.238 -      void set(Node i, T t) { leda_stuff[i._n]=t; }
   3.239 -      T get(Node i) const { return leda_stuff[i._n]; }  //FIXME: Is it necessary
   3.240 -      T &operator[](Node i) { return leda_stuff[i._n]; }
   3.241 -      const T &operator[](Node i) const { return leda_stuff[i._n]; }
   3.242 +      void set(Node i, T t) { leda_stuff[i.l_n]=t; }
   3.243 +      T get(Node i) const { return leda_stuff[i.l_n]; }  //FIXME: Is it necessary
   3.244 +      T &operator[](Node i) { return leda_stuff[i.l_n]; }
   3.245 +      const T &operator[](Node i) const { return leda_stuff[i.l_n]; }
   3.246  
   3.247        void update() { /*leda_stuff.init(leda_stuff.get_graph());*/ }
   3.248 -      //void update(T a) { leda_stuff.init(leda_stuff.get_graph()/**(G._graph)*/, a); }   //FIXME: Is it necessary
   3.249 +      //void update(T a) { leda_stuff.init(leda_stuff.get_graph()/**(G.l_graph)*/, a); }   //FIXME: Is it necessary
   3.250      };
   3.251  
   3.252      ///Read/write map from the edges to type \c T.
   3.253 @@ -294,20 +279,25 @@
   3.254        typedef T ValueType;
   3.255        typedef Edge KeyType;
   3.256  
   3.257 -      EdgeMap(const LedaGraphWrapper &G) : leda_stuff(*(G._graph)) {}
   3.258 -      EdgeMap(const LedaGraphWrapper &G, T t) : leda_stuff(*(G._graph), t) {}
   3.259 +      EdgeMap(const LedaGraphWrapper &G) : leda_stuff(*(G.l_graph)) {}
   3.260 +      EdgeMap(const LedaGraphWrapper &G, T t) : leda_stuff(*(G.l_graph), t) {}
   3.261  
   3.262 -      void set(Edge i, T t) { leda_stuff[i._e]=t; }
   3.263 -      T get(Edge i) const { return leda_stuff[i._e]; }  //FIXME: Is it necessary
   3.264 -      T &operator[](Edge i) { return leda_stuff[i._e]; }
   3.265 -      const T &operator[](Edge i) const { return leda_stuff[i._e]; }
   3.266 +      void set(Edge i, T t) { leda_stuff[i.l_e]=t; }
   3.267 +      T get(Edge i) const { return leda_stuff[i.l_e]; }  //FIXME: Is it necessary
   3.268 +      T &operator[](Edge i) { return leda_stuff[i.l_e]; }
   3.269 +      const T &operator[](Edge i) const { return leda_stuff[i.l_e]; }
   3.270  
   3.271        void update() { /*leda_stuff.init(leda_stuff.get_graph());*/ }
   3.272 -      //void update(T a) { leda_stuff.init(leda_stuff.get_graph()/**(G._graph)*/, a); }   //FIXME: Is it necessary
   3.273 +      //void update(T a) { leda_stuff.init(leda_stuff.get_graph()/**(G.l_graph)*/, a); }   //FIXME: Is it necessary
   3.274      };
   3.275  
   3.276    };
   3.277  
   3.278 +
   3.279 +  /// \brief LEDA graph template.
   3.280 +  ///
   3.281 +  /// This graph stucture uses LEDA graphs for physical storage.
   3.282 +  /// \ingroup graphs
   3.283    template<typename Graph>
   3.284    class LedaGraph : public LedaGraphWrapper<Graph> {
   3.285      typedef LedaGraphWrapper<Graph> Parent;
   3.286 @@ -319,26 +309,6 @@
   3.287      }
   3.288    };
   3.289  
   3.290 -  // @}
   3.291 -
   3.292  } //namespace hugo
   3.293  
   3.294 -
   3.295 -
   3.296 -// class EmptyBipGraph : public EmptyGraph
   3.297 -// {
   3.298 -//   class ANode {};
   3.299 -//   class BNode {};
   3.300 -
   3.301 -//   ANode &next(ANode &) {}
   3.302 -//   BNode &next(BNode &) {}
   3.303 -
   3.304 -//   ANode &getFirst(ANode &) const {}
   3.305 -//   BNode &getFirst(BNode &) const {}
   3.306 -
   3.307 -//   enum NodeClass { A = 0, B = 1 };
   3.308 -//   NodeClass getClass(Node n) {}
   3.309 -
   3.310 -// }
   3.311 -
   3.312  #endif // HUGO_LEDA_GRAPH_WRAPPER_H
     4.1 --- a/src/work/marci/leda/makefile	Tue May 11 20:20:41 2004 +0000
     4.2 +++ b/src/work/marci/leda/makefile	Tue May 11 21:26:29 2004 +0000
     4.3 @@ -4,7 +4,7 @@
     4.4  INCLUDEDIRS ?= -I. -I../.. -I../../{marci,jacint,alpar,klao,akos,athos} -I$(LEDAROOT)/incl -I../../..
     4.5  LDFLAGS = -L$(LEDAROOT) -lG -lL -lm
     4.6  
     4.7 -BINARIES = bipartite_matching_leda bipartite_matching_leda_gen
     4.8 +BINARIES = bipartite_matching_leda bipartite_matching_leda_gen comparison
     4.9  
    4.10  include ../../makefile
    4.11