[Lemon-commits] [lemon_svn] marci: r1409 - hugo/trunk/src/lemon

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


Author: marci
Date: Mon Nov 22 18:49:07 2004
New Revision: 1409

Modified:
   hugo/trunk/src/lemon/graph_wrapper.h

Log:
the old-style codes are removed from comment


Modified: hugo/trunk/src/lemon/graph_wrapper.h
==============================================================================
--- hugo/trunk/src/lemon/graph_wrapper.h	(original)
+++ hugo/trunk/src/lemon/graph_wrapper.h	Mon Nov 22 18:49:07 2004
@@ -125,7 +125,6 @@
 
   public:
     GraphWrapperBase(Graph& _graph) : graph(&_graph) { }
-//     GraphWrapperBase(const GraphWrapperBase<_Graph>& gw) : graph(gw.graph) { }
  
     typedef typename Graph::Node Node;
     typedef typename Graph::Edge Edge;
@@ -134,18 +133,6 @@
     void first(Edge& i) const { graph->first(i); }
     void firstIn(Edge& i, const Node& n) const { graph->firstIn(i, n); }
     void firstOut(Edge& i, const Node& n ) const { graph->firstOut(i, n); }
-//     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;
-//     }
 
     void next(Node& i) const { graph->next(i); }
     void next(Edge& i) const { graph->next(i); }
@@ -154,10 +141,6 @@
 
     Node source(const Edge& e) const { return graph->source(e); }
     Node target(const Edge& e) const { return graph->target(e); }
-//     Node source(const Edge& e) const { 
-//       return Node(graph->source(static_cast<typename Graph::Edge>(e))); }
-//     Node target(const Edge& e) const { 
-//       return Node(graph->target(static_cast<typename Graph::Edge>(e))); }
 
     int nodeNum() const { return graph->nodeNum(); }
     int edgeNum() const { return graph->edgeNum(); }
@@ -271,71 +254,6 @@
   public:
     RevGraphWrapper(_Graph& _graph) { setGraph(_graph); }
   };
-//   template<typename Graph>
-//   class RevGraphWrapper : public GraphWrapper<Graph> {
-//   public:
-//     typedef GraphWrapper<Graph> Parent; 
-//   protected:
-//     RevGraphWrapper() : GraphWrapper<Graph>() { }
-//   public:
-//     RevGraphWrapper(Graph& _graph) : GraphWrapper<Graph>(_graph) { }  
-//     RevGraphWrapper(const RevGraphWrapper<Graph>& gw) : Parent(gw) { }
-
-//     typedef typename GraphWrapper<Graph>::Node Node;
-//     typedef typename GraphWrapper<Graph>::Edge Edge;
-//     //remark: OutEdgeIt and InEdgeIt cannot be typedef-ed to each other
-//     //because this does not work is some of them are not defined in the 
-//     //original graph. The problem with this is that typedef-ed stuff 
-//     //are instantiated in c++.
-//     class OutEdgeIt : public Edge { 
-//       const RevGraphWrapper<Graph>* gw;
-//       friend class GraphWrapper<Graph>;
-//      public:
-//       OutEdgeIt() { }
-//       OutEdgeIt(Invalid i) : Edge(i) { }
-//       OutEdgeIt(const RevGraphWrapper<Graph>& _gw, const Node& n) : 
-// 	Edge(typename Graph::InEdgeIt(*(_gw.graph), n)), gw(&_gw) { }
-//       OutEdgeIt(const RevGraphWrapper<Graph>& _gw, const Edge& e) : 
-// 	Edge(e), gw(&_gw) { }
-//       OutEdgeIt& operator++() { 
-// 	*(static_cast<Edge*>(this))=
-// 	  ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	return *this; 
-//       }
-//     };
-//     class InEdgeIt : public Edge { 
-//       const RevGraphWrapper<Graph>* gw;
-//       friend class GraphWrapper<Graph>;
-//      public:
-//       InEdgeIt() { }
-//       InEdgeIt(Invalid i) : Edge(i) { }
-//       InEdgeIt(const RevGraphWrapper<Graph>& _gw, const Node& n) : 
-// 	Edge(typename Graph::OutEdgeIt(*(_gw.graph), n)), gw(&_gw) { }
-//       InEdgeIt(const RevGraphWrapper<Graph>& _gw, const Edge& e) : 
-// 	Edge(e), gw(&_gw) { }
-//       InEdgeIt& operator++() { 
-// 	*(static_cast<Edge*>(this))=
-// 	  ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	return *this; 
-//       }
-//     };
-
-//     using GraphWrapper<Graph>::first;
-//     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;
-//     }
-
-//     Node source(const Edge& e) const { 
-//       return GraphWrapper<Graph>::target(e); }
-//     Node target(const Edge& e) const { 
-//       return GraphWrapper<Graph>::source(e); }
-
-//     //    KEEP_MAPS(Parent, RevGraphWrapper);
-
-//   };
 
   
   template <typename _Graph, typename NodeFilterMap, typename EdgeFilterMap>
@@ -516,195 +434,6 @@
     }
   };
 
-//   template<typename Graph, typename NodeFilterMap, 
-// 	   typename EdgeFilterMap>
-//   class SubGraphWrapper : public GraphWrapper<Graph> {
-//   public:
-//     typedef GraphWrapper<Graph> Parent;
-//   protected:
-//     NodeFilterMap* node_filter_map;
-//     EdgeFilterMap* edge_filter_map;
-
-//     SubGraphWrapper() : GraphWrapper<Graph>(), 
-// 			node_filter_map(0), edge_filter_map(0) { }
-//     void setNodeFilterMap(NodeFilterMap& _node_filter_map) {
-//       node_filter_map=&_node_filter_map;
-//     }
-//     void setEdgeFilterMap(EdgeFilterMap& _edge_filter_map) {
-//       edge_filter_map=&_edge_filter_map;
-//     }
-    
-//   public:
-//     SubGraphWrapper(Graph& _graph, NodeFilterMap& _node_filter_map, 
-// 		    EdgeFilterMap& _edge_filter_map) : 
-//       GraphWrapper<Graph>(_graph), node_filter_map(&_node_filter_map), 
-//       edge_filter_map(&_edge_filter_map) { }  
-
-//     typedef typename GraphWrapper<Graph>::Node Node;
-//     class NodeIt : public Node { 
-//       const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>* gw;
-//       friend class SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>;
-//     public:
-//       NodeIt() { }
-//       NodeIt(Invalid i) : Node(i) { }
-//       NodeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw) : 
-// 	Node(typename Graph::NodeIt(*(_gw.graph))), gw(&_gw) { 
-// 	while (*static_cast<Node*>(this)!=INVALID && 
-// 	       !(*(gw->node_filter_map))[*this]) 
-// 	  *(static_cast<Node*>(this))=
-// 	    ++(typename Graph::NodeIt(*(gw->graph), *this));
-//       }
-//       NodeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, 
-// 	     const Node& n) : 
-// 	Node(n), gw(&_gw) { }
-//       NodeIt& operator++() { 
-// 	*(static_cast<Node*>(this))=
-// 	  ++(typename Graph::NodeIt(*(gw->graph), *this));
-// 	while (*static_cast<Node*>(this)!=INVALID && 
-// 	       !(*(gw->node_filter_map))[*this]) 
-// 	  *(static_cast<Node*>(this))=
-// 	    ++(typename Graph::NodeIt(*(gw->graph), *this));
-// 	return *this; 
-//       }
-//     };
-//     typedef typename GraphWrapper<Graph>::Edge Edge;
-//     class OutEdgeIt : public Edge { 
-//       const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>* gw;
-//       friend class SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>;
-//     public:
-//       OutEdgeIt() { }
-//       OutEdgeIt(Invalid i) : Edge(i) { }
-//       OutEdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, const Node& n) : 
-// 	Edge(typename Graph::OutEdgeIt(*(_gw.graph), n)), gw(&_gw) { 
-// 	while (*static_cast<Edge*>(this)!=INVALID && 
-// 	       !(*(gw->edge_filter_map))[*this]) 
-// 	  *(static_cast<Edge*>(this))=
-// 	    ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-//       }
-//       OutEdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, 
-// 	     const Edge& e) : 
-// 	Edge(e), gw(&_gw) { }
-//       OutEdgeIt& operator++() { 
-// 	*(static_cast<Edge*>(this))=
-// 	  ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	while (*static_cast<Edge*>(this)!=INVALID && 
-// 	       !(*(gw->edge_filter_map))[*this]) 
-// 	  *(static_cast<Edge*>(this))=
-// 	    ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	return *this; 
-//       }
-//     };
-//     class InEdgeIt : public Edge { 
-//       const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>* gw;
-//       friend class SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>;
-//     public:
-//       InEdgeIt() { }
-//       //      InEdgeIt(const InEdgeIt& e) : Edge(e), gw(e.gw) { }
-//       InEdgeIt(Invalid i) : Edge(i) { }
-//       InEdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, const Node& n) : 
-// 	Edge(typename Graph::InEdgeIt(*(_gw.graph), n)), gw(&_gw) { 
-// 	while (*static_cast<Edge*>(this)!=INVALID && 
-// 	       !(*(gw->edge_filter_map))[*this]) 
-// 	  *(static_cast<Edge*>(this))=
-// 	    ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-//       }
-//       InEdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, 
-// 	     const Edge& e) : 
-// 	Edge(e), gw(&_gw) { }
-//       InEdgeIt& operator++() { 
-// 	*(static_cast<Edge*>(this))=
-// 	  ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	while (*static_cast<Edge*>(this)!=INVALID && 
-// 	       !(*(gw->edge_filter_map))[*this]) 
-// 	  *(static_cast<Edge*>(this))=
-// 	    ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	return *this; 
-//       }
-//     };
-//     class EdgeIt : public Edge { 
-//       const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>* gw;
-//       friend class SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>;
-//     public:
-//       EdgeIt() { }
-//       EdgeIt(Invalid i) : Edge(i) { }
-//       EdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw) : 
-// 	Edge(typename Graph::EdgeIt(*(_gw.graph))), gw(&_gw) { 
-// 	while (*static_cast<Edge*>(this)!=INVALID && 
-// 	       !(*(gw->edge_filter_map))[*this]) 
-// 	  *(static_cast<Edge*>(this))=
-// 	    ++(typename Graph::EdgeIt(*(gw->graph), *this));
-//       }
-//       EdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, 
-// 	     const Edge& e) : 
-// 	Edge(e), gw(&_gw) { }
-//       EdgeIt& operator++() { 
-// 	*(static_cast<Edge*>(this))=
-// 	  ++(typename Graph::EdgeIt(*(gw->graph), *this));
-// 	while (*static_cast<Edge*>(this)!=INVALID && 
-// 	       !(*(gw->edge_filter_map))[*this]) 
-// 	  *(static_cast<Edge*>(this))=
-// 	    ++(typename Graph::EdgeIt(*(gw->graph), *this));
-// 	return *this; 
-//       }
-//     };
-
-//     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;
-//     }
-    
-//     /// 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  
-//     /// to be false in the corresponding node-map.
-//     void hide(const Node& n) const { node_filter_map->set(n, false); }
-
-//     /// This function hides \c e in the graph, i.e. the iteration 
-//     /// jumps over it. This is done by simply setting the value of \c e  
-//     /// to be false in the corresponding edge-map.
-//     void hide(const Edge& e) const { edge_filter_map->set(e, false); }
-
-//     /// The value of \c n is set to be true in the node-map which stores 
-//     /// hide information. If \c n was hidden previuosly, then it is shown 
-//     /// again
-//      void unHide(const Node& n) const { node_filter_map->set(n, true); }
-
-//     /// The value of \c e is set to be true in the edge-map which stores 
-//     /// hide information. If \c e was hidden previuosly, then it is shown 
-//     /// again
-//     void unHide(const Edge& e) const { edge_filter_map->set(e, true); }
-
-//     /// Returns true if \c n is hidden.
-//     bool hidden(const Node& n) const { return !(*node_filter_map)[n]; }
-
-//     /// Returns true if \c n is hidden.
-//     bool hidden(const Edge& e) const { return !(*edge_filter_map)[e]; }
-
-//     /// \warning This is a linear time operation and works only if 
-//     /// \c Graph::NodeIt is defined.
-//     int nodeNum() const { 
-//       int i=0;
-//       for (NodeIt n(*this); n!=INVALID; ++n) ++i;
-//       return i; 
-//     }
-
-//     /// \warning This is a linear time operation and works only if 
-//     /// \c Graph::EdgeIt is defined.
-//     int edgeNum() const { 
-//       int i=0;
-//       for (EdgeIt e(*this); e!=INVALID; ++e) ++i;
-//       return i; 
-//     }
-
-//     //    KEEP_MAPS(Parent, SubGraphWrapper);
-//   };
 
 
   /*! \brief A wrapper for hiding nodes from a graph.
@@ -1266,344 +995,6 @@
     }
   };
 
-//   template<typename Graph, 
-// 	   typename ForwardFilterMap, typename BackwardFilterMap>
-//   class SubBidirGraphWrapper : public GraphWrapper<Graph> {
-//   public:
-//     typedef GraphWrapper<Graph> Parent; 
-//   protected:
-//     ForwardFilterMap* forward_filter;
-//     BackwardFilterMap* backward_filter;
-
-//     SubBidirGraphWrapper() : GraphWrapper<Graph>() { }
-//     void setForwardFilterMap(ForwardFilterMap& _forward_filter) {
-//       forward_filter=&_forward_filter;
-//     }
-//     void setBackwardFilterMap(BackwardFilterMap& _backward_filter) {
-//       backward_filter=&_backward_filter;
-//     }
-
-//   public:
-
-//     SubBidirGraphWrapper(Graph& _graph, ForwardFilterMap& _forward_filter, 
-// 			 BackwardFilterMap& _backward_filter) : 
-//       GraphWrapper<Graph>(_graph), 
-//       forward_filter(&_forward_filter), backward_filter(&_backward_filter) { }
-//     SubBidirGraphWrapper(const SubBidirGraphWrapper<Graph, 
-// 			 ForwardFilterMap, BackwardFilterMap>& gw) : 
-//       Parent(gw), 
-//       forward_filter(gw.forward_filter), 
-//       backward_filter(gw.backward_filter) { }
-
-//     class Edge; 
-//     class OutEdgeIt; 
-//     friend class Edge; 
-//     friend class OutEdgeIt; 
-
-//     template<typename T> class EdgeMap;
-
-//     typedef typename GraphWrapper<Graph>::Node Node;
-
-//     typedef typename Graph::Edge GraphEdge;
-//     /// SubBidirGraphWrapper<..., ..., ...>::Edge is inherited from 
-//     /// Graph::Edge. It contains an extra bool flag which is true 
-//     /// if and only if the 
-//     /// edge is the backward version of the original edge.
-//     class Edge : public Graph::Edge {
-//       friend class SubBidirGraphWrapper<Graph, 
-// 					ForwardFilterMap, BackwardFilterMap>;
-//       template<typename T> friend class EdgeMap;
-//     protected:
-//       bool backward; //true, iff backward
-//     public:
-//       Edge() { }
-//       /// \todo =false is needed, or causes problems?
-//       /// If \c _backward is false, then we get an edge corresponding to the 
-//       /// original one, otherwise its oppositely directed pair is obtained.
-//       Edge(const typename Graph::Edge& e, bool _backward/*=false*/) : 
-// 	Graph::Edge(e), backward(_backward) { }
-//       Edge(Invalid i) : Graph::Edge(i), backward(true) { }
-//       bool operator==(const Edge& v) const { 
-// 	return (this->backward==v.backward && 
-// 		static_cast<typename Graph::Edge>(*this)==
-// 		static_cast<typename Graph::Edge>(v));
-//       } 
-//       bool operator!=(const Edge& v) const { 
-// 	return (this->backward!=v.backward || 
-// 		static_cast<typename Graph::Edge>(*this)!=
-// 		static_cast<typename Graph::Edge>(v));
-//       }
-//     };
-
-//     class OutEdgeIt : public Edge {
-//       friend class SubBidirGraphWrapper<Graph, 
-// 					ForwardFilterMap, BackwardFilterMap>;
-//     protected:
-//       const SubBidirGraphWrapper<Graph, 
-// 				 ForwardFilterMap, BackwardFilterMap>* gw;
-//     public:
-//       OutEdgeIt() { }
-//       OutEdgeIt(Invalid i) : Edge(i) { }
-//       OutEdgeIt(const SubBidirGraphWrapper<Graph, 
-// 		ForwardFilterMap, BackwardFilterMap>& _gw, const Node& n) : 
-// 	Edge(typename Graph::OutEdgeIt(*(_gw.graph), n), false), gw(&_gw) { 
-// 	while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 	       !(*(gw->forward_filter))[*this]) 
-// 	  *(static_cast<GraphEdge*>(this))=
-// 	    ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	if (*static_cast<GraphEdge*>(this)==INVALID) {
-// 	  *static_cast<Edge*>(this)=
-// 	    Edge(typename Graph::InEdgeIt(*(_gw.graph), n), true);
-// 	  while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		 !(*(gw->backward_filter))[*this]) 
-// 	    *(static_cast<GraphEdge*>(this))=
-// 	      ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	}
-//       }
-//       OutEdgeIt(const SubBidirGraphWrapper<Graph, 
-// 		ForwardFilterMap, BackwardFilterMap>& _gw, const Edge& e) : 
-// 	Edge(e), gw(&_gw) { }
-//       OutEdgeIt& operator++() { 
-// 	if (!this->backward) {
-// 	  Node n=gw->source(*this);
-// 	  *(static_cast<GraphEdge*>(this))=
-// 	    ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	  while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		 !(*(gw->forward_filter))[*this]) 
-// 	    *(static_cast<GraphEdge*>(this))=
-// 	      ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	  if (*static_cast<GraphEdge*>(this)==INVALID) {
-// 	    *static_cast<Edge*>(this)=
-// 	      Edge(typename Graph::InEdgeIt(*(gw->graph), n), true);
-// 	    while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		   !(*(gw->backward_filter))[*this]) 
-// 	      *(static_cast<GraphEdge*>(this))=
-// 		++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	  }
-// 	} else {
-// 	  *(static_cast<GraphEdge*>(this))=
-// 	    ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	  while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		 !(*(gw->backward_filter))[*this]) 
-// 	    *(static_cast<GraphEdge*>(this))=
-// 	      ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	}
-// 	return *this;
-//       }
-//     };
-
-//     class InEdgeIt : public Edge {
-//       friend class SubBidirGraphWrapper<Graph, 
-// 					ForwardFilterMap, BackwardFilterMap>;
-//     protected:
-//       const SubBidirGraphWrapper<Graph, 
-// 				 ForwardFilterMap, BackwardFilterMap>* gw;
-//     public:
-//       InEdgeIt() { }
-//       InEdgeIt(Invalid i) : Edge(i) { }
-//       InEdgeIt(const SubBidirGraphWrapper<Graph, 
-// 	       ForwardFilterMap, BackwardFilterMap>& _gw, const Node& n) : 
-// 	Edge(typename Graph::InEdgeIt(*(_gw.graph), n), false), gw(&_gw) { 
-// 	while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 	       !(*(gw->forward_filter))[*this]) 
-// 	  *(static_cast<GraphEdge*>(this))=
-// 	    ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	if (*static_cast<GraphEdge*>(this)==INVALID) {
-// 	  *static_cast<Edge*>(this)=
-// 	    Edge(typename Graph::OutEdgeIt(*(_gw.graph), n), true);
-// 	  while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		 !(*(gw->backward_filter))[*this]) 
-// 	    *(static_cast<GraphEdge*>(this))=
-// 	      ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	}
-//       }
-//       InEdgeIt(const SubBidirGraphWrapper<Graph, 
-// 	       ForwardFilterMap, BackwardFilterMap>& _gw, const Edge& e) : 
-// 	Edge(e), gw(&_gw) { }
-//       InEdgeIt& operator++() { 
-// 	if (!this->backward) {
-// 	  Node n=gw->source(*this);
-// 	  *(static_cast<GraphEdge*>(this))=
-// 	    ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	  while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		 !(*(gw->forward_filter))[*this]) 
-// 	    *(static_cast<GraphEdge*>(this))=
-// 	      ++(typename Graph::InEdgeIt(*(gw->graph), *this));
-// 	  if (*static_cast<GraphEdge*>(this)==INVALID) {
-// 	    *static_cast<Edge*>(this)=
-// 	      Edge(typename Graph::OutEdgeIt(*(gw->graph), n), true);
-// 	    while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		   !(*(gw->backward_filter))[*this]) 
-// 	      *(static_cast<GraphEdge*>(this))=
-// 		++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	  }
-// 	} else {
-// 	  *(static_cast<GraphEdge*>(this))=
-// 	    ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	  while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		 !(*(gw->backward_filter))[*this]) 
-// 	    *(static_cast<GraphEdge*>(this))=
-// 	      ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	}
-// 	return *this;
-//       }
-//     };
-
-//     class EdgeIt : public Edge {
-//       friend class SubBidirGraphWrapper<Graph, 
-// 					ForwardFilterMap, BackwardFilterMap>;
-//     protected:
-//       const SubBidirGraphWrapper<Graph, 
-// 				 ForwardFilterMap, BackwardFilterMap>* gw;
-//     public:
-//       EdgeIt() { }
-//       EdgeIt(Invalid i) : Edge(i) { }
-//       EdgeIt(const SubBidirGraphWrapper<Graph, 
-// 	     ForwardFilterMap, BackwardFilterMap>& _gw) : 
-// 	Edge(typename Graph::EdgeIt(*(_gw.graph)), false), gw(&_gw) { 
-// 	while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 	       !(*(gw->forward_filter))[*this]) 
-// 	  *(static_cast<GraphEdge*>(this))=
-// 	    ++(typename Graph::EdgeIt(*(gw->graph), *this));
-// 	if (*static_cast<GraphEdge*>(this)==INVALID) {
-// 	  *static_cast<Edge*>(this)=
-// 	    Edge(typename Graph::EdgeIt(*(_gw.graph)), true);
-// 	  while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		 !(*(gw->backward_filter))[*this]) 
-// 	    *(static_cast<GraphEdge*>(this))=
-// 	      ++(typename Graph::EdgeIt(*(gw->graph), *this));
-// 	}
-//       }
-//       EdgeIt(const SubBidirGraphWrapper<Graph, 
-// 	     ForwardFilterMap, BackwardFilterMap>& _gw, const Edge& e) : 
-// 	Edge(e), gw(&_gw) { }
-//       EdgeIt& operator++() { 
-// 	if (!this->backward) {
-// 	  *(static_cast<GraphEdge*>(this))=
-// 	    ++(typename Graph::EdgeIt(*(gw->graph), *this));
-// 	  while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		 !(*(gw->forward_filter))[*this]) 
-// 	    *(static_cast<GraphEdge*>(this))=
-// 	      ++(typename Graph::EdgeIt(*(gw->graph), *this));
-// 	  if (*static_cast<GraphEdge*>(this)==INVALID) {
-// 	    *static_cast<Edge*>(this)=
-// 	      Edge(typename Graph::EdgeIt(*(gw->graph)), true);
-// 	    while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		   !(*(gw->backward_filter))[*this]) 
-// 	      *(static_cast<GraphEdge*>(this))=
-// 		++(typename Graph::EdgeIt(*(gw->graph), *this));
-// 	  }
-// 	} else {
-// 	  *(static_cast<GraphEdge*>(this))=
-// 	    ++(typename Graph::EdgeIt(*(gw->graph), *this));
-// 	  while (*static_cast<GraphEdge*>(this)!=INVALID && 
-// 		 !(*(gw->backward_filter))[*this]) 
-// 	    *(static_cast<GraphEdge*>(this))=
-// 	      ++(typename Graph::EdgeIt(*(gw->graph), *this));
-// 	}
-// 	return *this;
-//       }
-//     };
-
-// //     using GraphWrapper<Graph>::first;
-// //     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;
-// //     }
-  
-
-//     Node source(Edge e) const { 
-//       return ((!e.backward) ? this->graph->source(e) : this->graph->target(e)); }
-//     Node target(Edge e) const { 
-//       return ((!e.backward) ? this->graph->target(e) : this->graph->source(e)); }
-
-//     /// Gives back the opposite edge.
-//     Edge opposite(const Edge& e) const { 
-//       Edge f=e;
-//       f.backward=!f.backward;
-//       return f;
-//     }
-
-//     /// \warning This is a linear time operation and works only if 
-//     /// \c Graph::EdgeIt is defined.
-//     int edgeNum() const { 
-//       int i=0;
-//       for (EdgeIt e(*this); e!=INVALID; ++e) ++i;
-//       return i; 
-//     }
-
-//     bool forward(const Edge& e) const { return !e.backward; }
-//     bool backward(const Edge& e) const { return e.backward; }
-
-
-//     template <typename T>
-//     /// \c SubBidirGraphWrapper<..., ..., ...>::EdgeMap contains two 
-//     /// Graph::EdgeMap one for the forward edges and 
-//     /// one for the backward edges.
-//     class EdgeMap {
-//       template <typename TT> friend class EdgeMap;
-//       typename Graph::template EdgeMap<T> forward_map, backward_map; 
-//     public:
-//       typedef T Value;
-//       typedef Edge Key;
-
-//       EdgeMap(const SubBidirGraphWrapper<Graph, 
-// 	      ForwardFilterMap, BackwardFilterMap>& g) : 
-// 	forward_map(*(g.graph)), backward_map(*(g.graph)) { }
-
-//       EdgeMap(const SubBidirGraphWrapper<Graph, 
-// 	      ForwardFilterMap, BackwardFilterMap>& g, T a) : 
-// 	forward_map(*(g.graph), a), backward_map(*(g.graph), a) { }
-
-//       template <typename TT>
-//       EdgeMap(const EdgeMap<TT>& copy) 
-// 	: forward_map(copy.forward_map), backward_map(copy.backward_map) {}
-
-//       template <typename TT>
-//       EdgeMap& operator=(const EdgeMap<TT>& copy) {
-// 	forward_map = copy.forward_map;
-// 	backward_map = copy.backward_map;
-// 	return *this;
-//       }
-      
-//       void set(Edge e, T a) { 
-// 	if (!e.backward) 
-// 	  forward_map.set(e, a); 
-// 	else 
-// 	  backward_map.set(e, a); 
-//       }
-
-//       typename Graph::template EdgeMap<T>::ConstReference 
-//       operator[](Edge e) const { 
-// 	if (!e.backward) 
-// 	  return forward_map[e]; 
-// 	else 
-// 	  return backward_map[e]; 
-//       }
-
-//       typename Graph::template EdgeMap<T>::Reference 
-//       operator[](Edge e) { 
-// 	if (!e.backward) 
-// 	  return forward_map[e]; 
-// 	else 
-// 	  return backward_map[e]; 
-//       }
-
-//       void update() { 
-// 	forward_map.update(); 
-// 	backward_map.update();
-//       }
-//     };
-
-
-//     //    KEEP_NODE_MAP(Parent, SubBidirGraphWrapper);
-
-//   };
 
 
   ///\brief A wrapper for composing bidirected graph from a directed one. 
@@ -1809,19 +1200,6 @@
     typedef typename Parent::Node Node;
     typedef typename Parent::Edge Edge;
 
-//     using Parent::first;
-//     void first(Node& i) const { 
-//       Parent::first(i); 
-//       while (i!=INVALID && !(*node_filter_map)[i]) Parent::next(i); 
-//     }
-//     void first(Edge& i) const { 
-//       Parent::first(i); 
-//       while (i!=INVALID && !(*edge_filter_map)[i]) Parent::next(i); 
-//     }
-//     void firstIn(Edge& i, const Node& n) const { 
-//       Parent::firstIn(i, n); 
-//       while (i!=INVALID && !(*edge_filter_map)[i]) Parent::nextIn(i); 
-//     }
     void firstOut(Edge& i, const Node& n) const { 
       i=(*first_out_edges)[n];
     }
@@ -1832,22 +1210,6 @@
       Parent::nextOut(f);
       first_out_edges->set(n, f);
     }    
-//     void next(Node& i) const { 
-//       Parent::next(i); 
-//       while (i!=INVALID && !(*node_filter_map)[i]) Parent::next(i); 
-//     }
-//     void next(Edge& i) const { 
-//       Parent::next(i); 
-//       while (i!=INVALID && !(*edge_filter_map)[i]) Parent::next(i); 
-//     }
-//     void nextIn(Edge& i) const { 
-//       Parent::nextIn(i); 
-//       while (i!=INVALID && !(*edge_filter_map)[i]) Parent::nextIn(i); 
-//     }
-//     void nextOut(Edge& i) const { 
-//       Parent::nextOut(i); 
-//       while (i!=INVALID && !(*edge_filter_map)[i]) Parent::nextOut(i); 
-//     }
   };
 
 
@@ -1878,57 +1240,8 @@
       setGraph(_graph);
       setFirstOutEdgesMap(_first_out_edges);
     } 
-//     using GraphWrapper<Graph>::first;
-//     OutEdgeIt& first(OutEdgeIt& i, const Node& p) const { 
-//       i=OutEdgeIt(*this, p); return i;
-//     }
-  };
-//   template<typename Graph, typename FirstOutEdgesMap>
-//   class ErasingFirstGraphWrapper : public GraphWrapper<Graph> {
-//   public:
-//     typedef GraphWrapper<Graph> Parent; 
-//   protected:
-//     FirstOutEdgesMap* first_out_edges;
-//   public:
-//     ErasingFirstGraphWrapper(Graph& _graph, 
-// 			     FirstOutEdgesMap& _first_out_edges) : 
-//       GraphWrapper<Graph>(_graph), first_out_edges(&_first_out_edges) { }  
-
-//     typedef typename GraphWrapper<Graph>::Node Node;
-//     typedef typename GraphWrapper<Graph>::Edge Edge;
-//     class OutEdgeIt : public Edge { 
-//       friend class GraphWrapper<Graph>;
-//       friend class ErasingFirstGraphWrapper<Graph, FirstOutEdgesMap>;
-//       const ErasingFirstGraphWrapper<Graph, FirstOutEdgesMap>* gw;
-//     public:
-//       OutEdgeIt() { }
-//       OutEdgeIt(Invalid i) : Edge(i) { }
-//       OutEdgeIt(const ErasingFirstGraphWrapper<Graph, FirstOutEdgesMap>& _gw, 
-// 		const Node& n) : 
-// 	Edge((*(_gw.first_out_edges))[n]), gw(&_gw) { }
-//       OutEdgeIt(const ErasingFirstGraphWrapper<Graph, FirstOutEdgesMap>& _gw, 
-// 		const Edge& e) : 
-// 	Edge(e), gw(&_gw) { }
-//       OutEdgeIt& operator++() { 
-// 	*(static_cast<Edge*>(this))=
-// 	  ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
-// 	return *this; 
-//       }
-//     };
-
-// //     using GraphWrapper<Graph>::first;
-// //     OutEdgeIt& first(OutEdgeIt& i, const Node& p) const { 
-// //       i=OutEdgeIt(*this, p); return i;
-// //     }
-//     void erase(const Edge& e) const {
-//       Node n=source(e);
-//       typename Graph::OutEdgeIt f(*Parent::graph, n);
-//       ++f;
-//       first_out_edges->set(n, f);
-//     }
 
-//     //    KEEP_MAPS(Parent, ErasingFirstGraphWrapper);
-//   };
+  };
 
   ///@}
 



More information about the Lemon-commits mailing list