[Lemon-commits] [lemon_svn] alpar: r201 - hugo/trunk/src/work/alpar

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


Author: alpar
Date: Tue Mar  2 16:45:27 2004
New Revision: 201

Modified:
   hugo/trunk/src/work/alpar/emptygraph.h
   hugo/trunk/src/work/alpar/gwrapper.h

Log:
next() -> getNext()
goNext() -> next()


Modified: hugo/trunk/src/work/alpar/emptygraph.h
==============================================================================
--- hugo/trunk/src/work/alpar/emptygraph.h	(original)
+++ hugo/trunk/src/work/alpar/emptygraph.h	Tue Mar  2 16:45:27 2004
@@ -1,8 +1,9 @@
 // -*-mode: c++; -*-
 
-class Graph
+class EmptyGraph
 {
 public:
+
   class EdgeIt {};
   
   class InEdgeIt : public EdgeIt {};
@@ -18,17 +19,17 @@
   SymEdgeIt &getFirst(SymEdgeIt &, NodeIt) const {}
   EachEdgeIt &getFirst(EachEdgeIt &) const {}
 
-  NodeIt next(NodeIt) const {}
-  InEdgeIt next(InEdgeIt) const {}
-  OutEdgeIt next(OutEdgeIt) const {}
-  SymEdgeIt next(SymEdgeIt) const {}
-  EachEdgeIt next(EachEdgeIt) const {}
-
-  NodeIt &goNext(NodeIt &) const {}
-  InEdgeIt &goNext(InEdgeIt &) const {}
-  OutEdgeIt &goNext(OutEdgeIt &) const {}
-  SymEdgeIt &goNext(SymEdgeIt &) const {}
-  EachEdgeIt &goNext(EachEdgeIt &) const {}
+  NodeIt getNext(NodeIt) const {}
+  InEdgeIt getNext(InEdgeIt) const {}
+  OutEdgeIt getNext(OutEdgeIt) const {}
+  SymEdgeIt getNext(SymEdgeIt) const {}
+  EachEdgeIt getNext(EachEdgeIt) const {}
+
+  NodeIt &next(NodeIt &) const {}
+  InEdgeIt &next(InEdgeIt &) const {}
+  OutEdgeIt &next(OutEdgeIt &) const {}
+  SymEdgeIt &next(SymEdgeIt &) const {}
+  EachEdgeIt &next(EachEdgeIt &) const {}
 
   NodeIt head(EdgeIt) const {}
   NodeIt tail(EdgeIt) const {}
@@ -81,3 +82,19 @@
     EdgeMap(const Graph &G, T t) {}
   };
 };
+
+class EmptyBipGraph : public EmptyGraph
+{
+  class ANodeIt {};
+  class BNodeIt {};
+
+  ANodeIt &next(ANodeIt &) {}
+  BNodeIt &next(BNodeIt &) {}
+
+  ANodeIt &getFirst(ANodeIt &) const {}
+  BNodeIt &getFirst(BNodeIt &) const {}
+
+  enum NodeClass { A = 0, B = 1 };
+  NodeClass getClass(NodeIt n) {}
+
+}

Modified: hugo/trunk/src/work/alpar/gwrapper.h
==============================================================================
--- hugo/trunk/src/work/alpar/gwrapper.h	(original)
+++ hugo/trunk/src/work/alpar/gwrapper.h	Tue Mar  2 16:45:27 2004
@@ -117,6 +117,61 @@
 };
 
 template<typename G>
+class RevGraphExt : public G
+{
+public:
+  //  typedef G BaseGraph;
+
+  typedef typename G::EdgeIt EdgeIt;
+  
+  typedef typename G::InEdgeIt OutEdgeIt;
+  typedef typename G::OutEdgeIt InEdgeIt;
+  typedef typename G::SymEdgeIt SymEdgeIt;
+  typedef typename G::EachEdgeIt EachEdgeIt;
+
+  typedef typename G::NodeIt NodeIt;
+    
+//   template<typename I> I &getFirst(I &i); { return graph->getFirst(i); }
+//   template<typename I,typename P> I &getFirst(I &i,const P &p);
+//   { return graph->getFirst(i,p); }
+//   template<typename I> I next(const I i); { return graph->goNext(i); }
+//   template<typename I> I &goNext(I &i); { return graph->goNext(i); }
+
+  NodeIt head(const EdgeIt &e);
+  { return G::tail(e); }
+  NodeIt tail(const EdgeIt &e);
+  { return G::head(e); }
+  
+//   template<typename I> NodeIt aNode(const I e);
+//   { return graph->aNode(e); }
+//   template<typename I> NodeIt bNode(const I e);
+//   { return graph->bNode(e); }
+  
+//   template<typename I> bool valid(const I i);
+//   { return graph->valid(i); }
+  
+//   template<typename I> void setInvalid(const I &i);
+//   { return graph->setInvalid(i); }
+  
+//   NodeIt addNode(); { return graph->addNode(); }
+
+  EdgeIt addEdge(const NodeIt from,const NodeIt to);
+  { return G::addEdge(to,from); }
+  
+//   template<I> void delete(I i); { graph->delete(i); }
+  
+//   void clean();  { graph->clean(); }
+  
+//   template<class T> class NodeMap : public typename G::NodeMap<T>;
+//   template<class T> class EdgeMap : public typename G::EdgeMap<T>;
+  
+//   void SetG(G &g) {graph = &g;}
+  
+//   RevGraphWrapper() {graph = NULL;}
+//   RevGraphWrapper(G &g) {graph = &g;}
+};
+
+template<typename G>
 class SymGraphWrapper
 {
   G *graph;
@@ -173,6 +228,23 @@
 };
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 // FIXME: comparison should be made better!!!
 template<typename G, typename lomap, typename fmap, typename himap>
 class ResGraphWrapper



More information about the Lemon-commits mailing list