Index: src/hugo/graph_wrapper.h
===================================================================
--- src/hugo/graph_wrapper.h	(revision 877)
+++ src/hugo/graph_wrapper.h	(revision 878)
@@ -98,5 +98,4 @@
     GraphWrapper(Graph& _graph) : graph(&_graph) { }
     GraphWrapper(const GraphWrapper<Graph>& gw) : graph(gw.graph) { }
-//     Graph& getGraph() const { return *graph; }
  
     typedef typename Graph::Node Node;
@@ -106,5 +105,4 @@
      public:
       NodeIt() { }
-      //      NodeIt(const NodeIt& n) : Node(n), gw(n.gw) { }
       NodeIt(Invalid i) : Node(i) { }
       NodeIt(const GraphWrapper<Graph>& _gw) : 
@@ -124,5 +122,4 @@
      public:
       OutEdgeIt() { }
-      //OutEdgeIt(const OutEdgeIt& e) : Edge(e), gw(e.gw) { }
       OutEdgeIt(Invalid i) : Edge(i) { }
       OutEdgeIt(const GraphWrapper<Graph>& _gw, const Node& n) : 
@@ -141,5 +138,4 @@
      public:
       InEdgeIt() { }
-      //InEdgeIt(const InEdgeIt& e) : Edge(e), gw(e.gw) { }
       InEdgeIt(Invalid i) : Edge(i) { }
       InEdgeIt(const GraphWrapper<Graph>& _gw, const Node& n) : 
@@ -153,5 +149,4 @@
       }
     };
-    //typedef typename Graph::SymEdgeIt SymEdgeIt;
     class EdgeIt : public Edge { 
       const GraphWrapper<Graph>* gw;
@@ -159,5 +154,4 @@
      public:
       EdgeIt() { }
-      //EdgeIt(const EdgeIt& e) : Edge(e), gw(e.gw) { }
       EdgeIt(Invalid i) : Edge(i) { }
       EdgeIt(const GraphWrapper<Graph>& _gw) : 
@@ -185,9 +179,4 @@
     }
 
-//     NodeIt& next(NodeIt& i) const { graph->next(i.n); return i; }
-//     OutEdgeIt& next(OutEdgeIt& i) const { graph->next(i.e); return i; }
-//     InEdgeIt& next(InEdgeIt& i) const { graph->next(i.e); return i; }
-//     EdgeIt& next(EdgeIt& i) const { graph->next(i.e); return i; }    
-
     Node tail(const Edge& e) const { 
       return Node(graph->tail(static_cast<typename Graph::Edge>(e))); }
@@ -195,16 +184,6 @@
       return Node(graph->head(static_cast<typename Graph::Edge>(e))); }
 
-//     bool valid(const Node& n) const { 
-//       return graph->valid(static_cast<typename Graph::Node>(n)); }
-//     bool valid(const Edge& e) const { 
-//       return graph->valid(static_cast<typename Graph::Edge>(e)); }
-
     int nodeNum() const { return graph->nodeNum(); }
     int edgeNum() const { return graph->edgeNum(); }
-  
-//     Node aNode(const OutEdgeIt& e) const { return Node(graph->aNode(e.e)); }
-//     Node aNode(const InEdgeIt& e) const { return Node(graph->aNode(e.e)); }
-//     Node bNode(const OutEdgeIt& e) const { return Node(graph->bNode(e.e)); }
-//     Node bNode(const InEdgeIt& e) const { return Node(graph->bNode(e.e)); }
   
     Node addNode() const { return Node(graph->addNode()); }
@@ -261,5 +240,4 @@
      public:
       OutEdgeIt() { }
-      //OutEdgeIt(const OutEdgeIt& e) : Edge(e), gw(e.gw) { }
       OutEdgeIt(Invalid i) : Edge(i) { }
       OutEdgeIt(const RevGraphWrapper<Graph>& _gw, const Node& n) : 
@@ -278,5 +256,4 @@
      public:
       InEdgeIt() { }
-      //InEdgeIt(const InEdgeIt& e) : Edge(e), gw(e.gw) { }
       InEdgeIt(Invalid i) : Edge(i) { }
       InEdgeIt(const RevGraphWrapper<Graph>& _gw, const Node& n) : 
@@ -298,17 +275,4 @@
       i=InEdgeIt(*this, p); return i;
     }
-
-//     using GraphWrapper<Graph>::next;
-//     OutEdgeIt& next(OutEdgeIt& i) const { this->graph->next(i.e); return i; }
-//     InEdgeIt& next(InEdgeIt& i) const { this->graph->next(i.e); return i; }
-
-//     Node aNode(const OutEdgeIt& e) const { 
-//       return Node(this->graph->aNode(e.e)); }
-//     Node aNode(const InEdgeIt& e) const { 
-//       return Node(this->graph->aNode(e.e)); }
-//     Node bNode(const OutEdgeIt& e) const { 
-//       return Node(this->graph->bNode(e.e)); }
-//     Node bNode(const InEdgeIt& e) const { 
-//       return Node(this->graph->bNode(e.e)); }
 
     Node tail(const Edge& e) const { 
@@ -364,5 +328,4 @@
     public:
       NodeIt() { }
-      //      NodeIt(const NodeIt& n) : Node(n), gw(n.gw) { }
       NodeIt(Invalid i) : Node(i) { }
       NodeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw) : 
@@ -392,5 +355,4 @@
     public:
       OutEdgeIt() { }
-      //      OutEdgeIt(const OutEdgeIt& e) : Edge(e), gw(e.gw) { }
       OutEdgeIt(Invalid i) : Edge(i) { }
       OutEdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, const Node& n) : 
@@ -446,5 +408,4 @@
     public:
       EdgeIt() { }
-      //      EdgeIt(const EdgeIt& e) : Edge(e), gw(e.gw) { }
       EdgeIt(Invalid i) : Edge(i) { }
       EdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw) : 
@@ -482,38 +443,4 @@
     }
     
-//     NodeIt& next(NodeIt& i) const {
-//       this->graph->next(i.n); 
-//       while (this->graph->valid(i) && !(*node_filter_map)[i.n]) { 
-// 	this->graph->next(i.n); }
-//       return i;
-//     }
-//     OutEdgeIt& next(OutEdgeIt& i) const {
-//       this->graph->next(i.e); 
-//       while (this->graph->valid(i) && !(*edge_filter_map)[i.e]) { 
-// 	this->graph->next(i.e); }
-//       return i;
-//     }
-//     InEdgeIt& next(InEdgeIt& i) const {
-//       this->graph->next(i.e); 
-//       while (this->graph->valid(i) && !(*edge_filter_map)[i.e]) { 
-// 	this->graph->next(i.e); }
-//       return i;
-//     }
-//     EdgeIt& next(EdgeIt& i) const {
-//       this->graph->next(i.e); 
-//       while (this->graph->valid(i) && !(*edge_filter_map)[i.e]) { 
-// 	this->graph->next(i.e); }
-//       return i;
-//     }
-
-//     Node aNode(const OutEdgeIt& e) const { 
-//       return Node(this->graph->aNode(e.e)); }
-//     Node aNode(const InEdgeIt& e) const { 
-//       return Node(this->graph->aNode(e.e)); }
-//     Node bNode(const OutEdgeIt& e) const { 
-//       return Node(this->graph->bNode(e.e)); }
-//     Node bNode(const InEdgeIt& e) const { 
-//       return Node(this->graph->bNode(e.e)); }
-
     /// This function hides \c n in the graph, i.e. the iteration 
     /// jumps over it. This is done by simply setting the value of \c n  
@@ -563,11 +490,4 @@
 
 
-//   /// \brief A wrapper for forgetting the orientation of a graph.
-//   ///
-//   /// A wrapper for getting an undirected graph by forgetting
-//   /// the orientation of a directed one.
-//   ///
-//   /// \author Marton Makai
-//   /// does not work in the new concept.
   template<typename Graph>
   class UndirGraphWrapper : public GraphWrapper<Graph> {
@@ -602,27 +522,13 @@
     };
 
-//FIXME InEdgeIt
     typedef OutEdgeIt InEdgeIt; 
 
     using GraphWrapper<Graph>::first;
-//     NodeIt& first(NodeIt& i) const { 
-//       i=NodeIt(*this); return i;
-//     }
     OutEdgeIt& first(OutEdgeIt& i, const Node& p) const { 
       i=OutEdgeIt(*this, p); return i;
     }
-//FIXME
-//     InEdgeIt& first(InEdgeIt& i, const Node& p) const { 
-//       i=InEdgeIt(*this, p); return i;
-//     }
-//     EdgeIt& first(EdgeIt& i) const { 
-//       i=EdgeIt(*this); return i;
-//     }
 
     using GraphWrapper<Graph>::next;
-//     NodeIt& next(NodeIt& n) const {
-//       GraphWrapper<Graph>::next(n);
-//       return n;
-//     }
+
     OutEdgeIt& next(OutEdgeIt& e) const {
       if (e.out_or_in) {
@@ -636,10 +542,4 @@
       return e;
     }
-    //FIXME InEdgeIt
-//     EdgeIt& next(EdgeIt& e) const {
-//       GraphWrapper<Graph>::next(n);
-// //      graph->next(e.e);
-//       return e;
-//     }
 
     Node aNode(const OutEdgeIt& e) const { 
@@ -757,15 +657,4 @@
 	Graph::Edge(e), backward(_backward) { }
       Edge(Invalid i) : Graph::Edge(i), backward(true) { }
-//the unique invalid iterator
-//       friend bool operator==(const Edge& u, const Edge& v) { 
-// 	return (u.backward==v.backward && 
-// 		static_cast<typename Graph::Edge>(u)==
-// 		static_cast<typename Graph::Edge>(v));
-//       } 
-//       friend bool operator!=(const Edge& u, const Edge& v) { 
-// 	return (u.backward!=v.backward || 
-// 		static_cast<typename Graph::Edge>(u)!=
-// 		static_cast<typename Graph::Edge>(v));
-//       }
       bool operator==(const Edge& v) const { 
 	return (this->backward==v.backward && 
@@ -789,5 +678,4 @@
       OutEdgeIt() { }
       OutEdgeIt(Invalid i) : Edge(i) { }
-//the unique invalid iterator
       OutEdgeIt(const SubBidirGraphWrapper<Graph, 
 		ForwardFilterMap, BackwardFilterMap>& _gw, const Node& n) : 
@@ -847,5 +735,4 @@
       InEdgeIt() { }
       InEdgeIt(Invalid i) : Edge(i) { }
-//the unique invalid iterator
       InEdgeIt(const SubBidirGraphWrapper<Graph, 
 	       ForwardFilterMap, BackwardFilterMap>& _gw, const Node& n) : 
@@ -905,5 +792,4 @@
       EdgeIt() { }
       EdgeIt(Invalid i) : Edge(i) { }
-//the unique invalid iterator
       EdgeIt(const SubBidirGraphWrapper<Graph, 
 	     ForwardFilterMap, BackwardFilterMap>& _gw) : 
@@ -954,7 +840,4 @@
 
     using GraphWrapper<Graph>::first;
-//     NodeIt& first(NodeIt& i) const { 
-//       i=NodeIt(*this); return i;
-//     }
     OutEdgeIt& first(OutEdgeIt& i, const Node& p) const { 
       i=OutEdgeIt(*this, p); return i;
@@ -967,63 +850,4 @@
     }
   
-//     using GraphWrapper<Graph>::next;
-// //    NodeIt& next(NodeIt& n) const { GraphWrapper<Graph>::next(n); return n; }
-//     OutEdgeIt& next(OutEdgeIt& e) const { 
-//       if (!e.backward) {
-// 	Node v=this->graph->aNode(e.out);
-// 	this->graph->next(e.out);
-// 	while(this->graph->valid(e.out) && !(*forward_filter)[e]) { 
-// 	  this->graph->next(e.out); }
-// 	if (!this->graph->valid(e.out)) {
-// 	  e.backward=true;
-// 	  this->graph->first(e.in, v); 
-// 	  while(this->graph->valid(e.in) && !(*backward_filter)[e]) { 
-// 	    this->graph->next(e.in); }
-// 	}
-//       } else {
-// 	this->graph->next(e.in);
-// 	while(this->graph->valid(e.in) && !(*backward_filter)[e]) { 
-// 	  this->graph->next(e.in); } 
-//       }
-//       return e;
-//     }
-// //     FIXME Not tested
-//     InEdgeIt& next(InEdgeIt& e) const { 
-//       if (!e.backward) {
-// 	Node v=this->graph->aNode(e.in);
-// 	this->graph->next(e.in);
-// 	while(this->graph->valid(e.in) && !(*forward_filter)[e]) { 
-// 	  this->graph->next(e.in); }
-// 	if (!this->graph->valid(e.in)) {
-// 	  e.backward=true;
-// 	  this->graph->first(e.out, v); 
-// 	  while(this->graph->valid(e.out) && !(*backward_filter)[e]) { 
-// 	    this->graph->next(e.out); }
-// 	}
-//       } else {
-// 	this->graph->next(e.out);
-// 	while(this->graph->valid(e.out) && !(*backward_filter)[e]) { 
-// 	  this->graph->next(e.out); } 
-//       }
-//       return e;
-//     }
-//     EdgeIt& next(EdgeIt& e) const {
-//       if (!e.backward) {
-// 	this->graph->next(e.e);
-// 	while(this->graph->valid(e.e) && !(*forward_filter)[e]) { 
-// 	  this->graph->next(e.e); }
-// 	if (!this->graph->valid(e.e)) {
-// 	  e.backward=true;
-// 	  this->graph->first(e.e); 
-// 	  while(this->graph->valid(e.e) && !(*backward_filter)[e]) { 
-// 	    this->graph->next(e.e); }
-// 	}
-//       } else {
-// 	this->graph->next(e.e);
-// 	while(this->graph->valid(e.e) && !(*backward_filter)[e]) { 
-// 	  this->graph->next(e.e); } 
-//       }
-//       return e;
-//     }
 
     Node tail(Edge e) const { 
@@ -1031,18 +855,4 @@
     Node head(Edge e) const { 
       return ((!e.backward) ? this->graph->head(e) : this->graph->tail(e)); }
-
-//     Node aNode(OutEdgeIt e) const { 
-//       return ((!e.backward) ? this->graph->aNode(e.out) : 
-// 	      this->graph->aNode(e.in)); }
-//     Node bNode(OutEdgeIt e) const { 
-//       return ((!e.backward) ? this->graph->bNode(e.out) : 
-// 	      this->graph->bNode(e.in)); }
-
-//     Node aNode(InEdgeIt e) const { 
-//       return ((!e.backward) ? this->graph->aNode(e.in) : 
-// 	      this->graph->aNode(e.out)); }
-//     Node bNode(InEdgeIt e) const { 
-//       return ((!e.backward) ? this->graph->bNode(e.in) : 
-// 	      this->graph->bNode(e.out)); }
 
     /// Gives back the opposite edge.
@@ -1096,10 +906,4 @@
 	backward_map.update();
       }
-//       T get(Edge e) const { 
-// 	if (e.out_or_in) 
-// 	  return forward_map.get(e.out); 
-// 	else 
-// 	  return backward_map.get(e.in); 
-//       }
     };
 
@@ -1183,5 +987,4 @@
       /*graph(&_graph),*/ capacity(&_capacity), flow(&_flow) { }
     ResForwardFilter() : /*graph(0),*/ capacity(0), flow(0) { }
-    //void setGraph(const Graph& _graph) { graph=&_graph; }
     void setCapacity(const CapacityMap& _capacity) { capacity=&_capacity; }
     void setFlow(const FlowMap& _flow) { flow=&_flow; }
@@ -1194,5 +997,4 @@
 	   typename CapacityMap, typename FlowMap>
   class ResBackwardFilter {
-    //const Graph* graph;
     const CapacityMap* capacity;
     const FlowMap* flow;
@@ -1202,5 +1004,4 @@
       /*graph(&_graph),*/ capacity(&_capacity), flow(&_flow) { }
     ResBackwardFilter() : /*graph(0),*/ capacity(0), flow(0) { }
-    //void setGraph(const Graph& _graph) { graph=&_graph; }
     void setCapacity(const CapacityMap& _capacity) { capacity=&_capacity; }
     void setFlow(const FlowMap& _flow) { flow=&_flow; }
@@ -1243,10 +1044,4 @@
       backward_filter.setFlow(_flow);
     }
-//     /// \bug does graph reference needed in filtermaps??
-//     void setGraph(const Graph& _graph) { 
-//       Parent::setGraph(_graph);
-//       forward_filter.setGraph(_graph);
-//       backward_filter.setGraph(_graph);
-//     }
   public:
     ResGraphWrapper(Graph& _graph, const CapacityMap& _capacity, 
@@ -1262,25 +1057,9 @@
     typedef typename Parent::Edge Edge;
 
-    //    bool forward(const Parent::Edge& e) const { return Parent::forward(e); }
-    //bool backward(const Edge& e) const { return e.backward; }
-
     void augment(const Edge& e, Number a) const {
       if (Parent::forward(e))  
-// 	flow->set(e.out, flow->get(e.out)+a);
 	flow->set(e, (*flow)[e]+a);
       else  
-	//flow->set(e.in, flow->get(e.in)-a);
 	flow->set(e, (*flow)[e]-a);
-    }
-
-    /// \deprecated
-    ///
-    Number resCap(const Edge& e) const { 
-      if (Parent::forward(e)) 
-//	return (capacity->get(e.out)-flow->get(e.out)); 
-	return ((*capacity)[e]-(*flow)[e]); 
-      else 
-//	return (flow->get(e.in)); 
-	return ((*flow)[e]); 
     }
 
@@ -1298,12 +1077,8 @@
       Number operator[](const Edge& e) const { 
 	if (res_graph->forward(e)) 
-	  //	return (capacity->get(e.out)-flow->get(e.out)); 
 	  return (*(res_graph->capacity))[e]-(*(res_graph->flow))[e]; 
 	else 
-	  //	return (flow->get(e.in)); 
 	  return (*(res_graph->flow))[e]; 
       }
-      /// \bug not needed with dynamic maps, or does it?
-      void update() { }
     };
 
@@ -1342,5 +1117,4 @@
     public:
       OutEdgeIt() { }
-      //OutEdgeIt(const OutEdgeIt& e) : Edge(e), gw(e.gw) { }
       OutEdgeIt(Invalid i) : Edge(i) { }
       OutEdgeIt(const ErasingFirstGraphWrapper<Graph, FirstOutEdgesMap>& _gw, 
@@ -1356,62 +1130,9 @@
       }
     };
-//     class InEdgeIt { 
-//       friend class GraphWrapper<Graph>;
-//       friend class ErasingFirstGraphWrapper<Graph, FirstOutEdgesMap>;
-// //      typedef typename Graph::InEdgeIt GraphInEdgeIt;
-//       typename Graph::InEdgeIt e;
-//     public:
-//       InEdgeIt() { }
-//       InEdgeIt(const typename Graph::InEdgeIt& _e) : e(_e) { }
-//       InEdgeIt(const Invalid& i) : e(i) { }
-//       InEdgeIt(const ErasingFirstGraphWrapper<Graph, FirstOutEdgesMap>& _G, 
-// 	       const Node& _n) : 
-// 	e(*(_G.graph), typename Graph::Node(_n)) { }
-//       operator Edge() const { return Edge(typename Graph::Edge(e)); }
-//     };	
-    //typedef typename Graph::SymEdgeIt SymEdgeIt;
-//     class EdgeIt { 
-//       friend class GraphWrapper<Graph>;
-//       friend class ErasingFirstGraphWrapper<Graph, FirstOutEdgesMap>;
-// //      typedef typename Graph::EdgeIt GraphEdgeIt;
-//       typename Graph::EdgeIt e;
-//     public:
-//       EdgeIt() { }
-//       EdgeIt(const typename Graph::EdgeIt& _e) : e(_e) { }
-//       EdgeIt(const Invalid& i) : e(i) { }
-//       EdgeIt(const ErasingFirstGraphWrapper<Graph, FirstOutEdgesMap>& _G) : 
-// 	e(*(_G.graph)) { }
-//       operator Edge() const { return Edge(typename Graph::Edge(e)); }
-//     };
 
     using GraphWrapper<Graph>::first;
-//     NodeIt& first(NodeIt& i) const { 
-//       i=NodeIt(*this); return i;
-//     }
     OutEdgeIt& first(OutEdgeIt& i, const Node& p) const { 
       i=OutEdgeIt(*this, p); return i;
     }
-//     InEdgeIt& first(InEdgeIt& i, const Node& p) const { 
-//       i=InEdgeIt(*this, p); return i;
-//     }
-//     EdgeIt& first(EdgeIt& i) const { 
-//       i=EdgeIt(*this); return i;
-//     }
-
-//     using GraphWrapper<Graph>::next;
-// //    NodeIt& next(NodeIt& i) const { graph->next(i.n); return i; }
-//     OutEdgeIt& next(OutEdgeIt& i) const { this->graph->next(i.e); return i; }
-//     InEdgeIt& next(InEdgeIt& i) const { this->graph->next(i.e); return i; }
-//     EdgeIt& next(EdgeIt& i) const { this->graph->next(i.e); return i; }    
-    
-//     Node aNode(const OutEdgeIt& e) const { 
-//       return Node(this->graph->aNode(e.e)); }
-//     Node aNode(const InEdgeIt& e) const { 
-//       return Node(this->graph->aNode(e.e)); }
-//     Node bNode(const OutEdgeIt& e) const { 
-//       return Node(this->graph->bNode(e.e)); }
-//     Node bNode(const InEdgeIt& e) const { 
-//       return Node(this->graph->bNode(e.e)); }
-
     void erase(const Edge& e) const {
       Node n=tail(e);
