[Lemon-commits] [lemon_svn] marci: r658 - hugo/trunk/src/work/marci

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:40:49 CET 2006


Author: marci
Date: Fri Apr 30 18:46:19 2004
New Revision: 658

Added:
   hugo/trunk/src/work/marci/bipartite_matching_try_2.cc
      - copied, changed from r657, /hugo/trunk/src/work/marci/bipartite_matching_try.cc
Modified:
   hugo/trunk/src/work/marci/bipartite_graph_wrapper.h
   hugo/trunk/src/work/marci/bipartite_matching_try.cc
   hugo/trunk/src/work/marci/makefile

Log:
bipartite graphs


Modified: hugo/trunk/src/work/marci/bipartite_graph_wrapper.h
==============================================================================
--- hugo/trunk/src/work/marci/bipartite_graph_wrapper.h	(original)
+++ hugo/trunk/src/work/marci/bipartite_graph_wrapper.h	Fri Apr 30 18:46:19 2004
@@ -205,14 +205,26 @@
 
     /// the \c bool parameter which can be \c S_Class or \c T_Class shows 
     /// the color class where the new node is to be inserted.
-    void addNode(bool);
+    Node addNode(bool b) {
+      Node n=Parent::graph->addNode();
+      bipartite_map.update();
+      s_false_t_true_map.insert(n, b);
+      return n;
+    }
 
     /// A new edge is inserted.
     ///\pre \c tail have to be in \c S_Class and \c head in \c T_Class.
-    void addEdge(const Node& tail, const Node& head);
+    Edge addEdge(const Node& tail, const Node& head) {
+      return Parent::graph->addEdge(tail, head);
+    }
 
-    void erase(const Node&);
-    void erase(const Edge&);
+    void erase(const Node& n) {
+      s_false_t_true_map.remove(n);
+      Parent::graph->erase(n);
+    }
+    void erase(const Edge& e) {
+      Parent::graph->erase(e);
+    }
     
     void clear() {
       FOR_EACH_LOC(typename Parent::EdgeIt, e, G) erase(e);

Modified: hugo/trunk/src/work/marci/bipartite_matching_try.cc
==============================================================================
--- hugo/trunk/src/work/marci/bipartite_matching_try.cc	(original)
+++ hugo/trunk/src/work/marci/bipartite_matching_try.cc	Fri Apr 30 18:46:19 2004
@@ -112,8 +112,8 @@
 //     std::cout << bgw.tail(e) << "->" << bgw.head(e) << std::endl;
 //   }
 
-  BGW::NodeMap<int> dbyj(bgw);
-  BGW::EdgeMap<int> dbyxcj(bgw);
+//  BGW::NodeMap<int> dbyj(bgw);
+//  BGW::EdgeMap<int> dbyxcj(bgw);
 
   typedef stGraphWrapper<BGW> stGW;
   stGW stgw(bgw);

Copied: hugo/trunk/src/work/marci/bipartite_matching_try_2.cc (from r657, /hugo/trunk/src/work/marci/bipartite_matching_try.cc)
==============================================================================
--- /hugo/trunk/src/work/marci/bipartite_matching_try.cc	(original)
+++ hugo/trunk/src/work/marci/bipartite_matching_try_2.cc	Fri Apr 30 18:46:19 2004
@@ -112,8 +112,8 @@
 //     std::cout << bgw.tail(e) << "->" << bgw.head(e) << std::endl;
 //   }
 
-  BGW::NodeMap<int> dbyj(bgw);
-  BGW::EdgeMap<int> dbyxcj(bgw);
+//  BGW::NodeMap<int> dbyj(bgw);
+//  BGW::EdgeMap<int> dbyxcj(bgw);
 
   typedef stGraphWrapper<BGW> stGW;
   stGW stgw(bgw);

Modified: hugo/trunk/src/work/marci/makefile
==============================================================================
--- hugo/trunk/src/work/marci/makefile	(original)
+++ hugo/trunk/src/work/marci/makefile	Fri Apr 30 18:46:19 2004
@@ -4,7 +4,7 @@
 INCLUDEDIRS ?= -I../../include -I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT)
 
 LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo
-BINARIES = max_flow_demo iterator_bfs_demo macro_test lg_vs_sg bfsit_vs_byhand bipartite_graph_wrapper_test bipartite_matching_try
+BINARIES = max_flow_demo iterator_bfs_demo macro_test lg_vs_sg bfsit_vs_byhand bipartite_graph_wrapper_test bipartite_matching_try bipartite_matching_try_2
 #gw_vs_not preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos edmonds_karp_demo_alpar preflow_demo_leda
 
 include ../makefile



More information about the Lemon-commits mailing list