src/hugo/graph_wrapper.h
changeset 854 baf0b6e40211
parent 849 cc3867a7d380
child 861 021e513a2d83
     1.1 --- a/src/hugo/graph_wrapper.h	Tue Sep 14 17:42:43 2004 +0000
     1.2 +++ b/src/hugo/graph_wrapper.h	Wed Sep 15 10:34:12 2004 +0000
     1.3 @@ -378,7 +378,12 @@
     1.4        //      NodeIt(const NodeIt& n) : Node(n), gw(n.gw) { }
     1.5        NodeIt(Invalid i) : Node(i) { }
     1.6        NodeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw) : 
     1.7 -	Node(typename Graph::NodeIt(*(_gw.graph))), gw(&_gw) { }
     1.8 +	Node(typename Graph::NodeIt(*(_gw.graph))), gw(&_gw) { 
     1.9 +	while (*static_cast<Node*>(this)!=INVALID && 
    1.10 +	       !(*(gw->edge_filter_map))[*this]) 
    1.11 +	  *(static_cast<Node*>(this))=
    1.12 +	    ++(typename Graph::NodeIt(*(gw->graph), *this));
    1.13 +      }
    1.14        NodeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, 
    1.15  	     const Node& n) : 
    1.16  	Node(n), gw(&_gw) { }
    1.17 @@ -401,7 +406,12 @@
    1.18        //      OutEdgeIt(const OutEdgeIt& e) : Edge(e), gw(e.gw) { }
    1.19        OutEdgeIt(Invalid i) : Edge(i) { }
    1.20        OutEdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, const Node& n) : 
    1.21 -	Edge(typename Graph::OutEdgeIt(*(_gw.graph), n)), gw(&_gw) { }
    1.22 +	Edge(typename Graph::OutEdgeIt(*(_gw.graph), n)), gw(&_gw) { 
    1.23 +	while (*static_cast<Edge*>(this)!=INVALID && 
    1.24 +	       !(*(gw->edge_filter_map))[*this]) 
    1.25 +	  *(static_cast<Edge*>(this))=
    1.26 +	    ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
    1.27 +      }
    1.28        OutEdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, 
    1.29  	     const Edge& e) : 
    1.30  	Edge(e), gw(&_gw) { }
    1.31 @@ -423,7 +433,12 @@
    1.32        //      InEdgeIt(const InEdgeIt& e) : Edge(e), gw(e.gw) { }
    1.33        InEdgeIt(Invalid i) : Edge(i) { }
    1.34        InEdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, const Node& n) : 
    1.35 -	Edge(typename Graph::InEdgeIt(*(_gw.graph), n)), gw(&_gw) { }
    1.36 +	Edge(typename Graph::InEdgeIt(*(_gw.graph), n)), gw(&_gw) { 
    1.37 +	while (*static_cast<Edge*>(this)!=INVALID && 
    1.38 +	       !(*(gw->edge_filter_map))[*this]) 
    1.39 +	  *(static_cast<Edge*>(this))=
    1.40 +	    ++(typename Graph::InEdgeIt(*(gw->graph), *this));
    1.41 +      }
    1.42        InEdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, 
    1.43  	     const Edge& e) : 
    1.44  	Edge(e), gw(&_gw) { }
    1.45 @@ -445,7 +460,12 @@
    1.46        //      EdgeIt(const EdgeIt& e) : Edge(e), gw(e.gw) { }
    1.47        EdgeIt(Invalid i) : Edge(i) { }
    1.48        EdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw) : 
    1.49 -	Edge(typename Graph::EdgeIt(*(_gw.graph))), gw(&_gw) { }
    1.50 +	Edge(typename Graph::EdgeIt(*(_gw.graph))), gw(&_gw) { 
    1.51 +	while (*static_cast<Edge*>(this)!=INVALID && 
    1.52 +	       !(*(gw->edge_filter_map))[*this]) 
    1.53 +	  *(static_cast<Edge*>(this))=
    1.54 +	    ++(typename Graph::EdgeIt(*(gw->graph), *this));
    1.55 +      }
    1.56        EdgeIt(const SubGraphWrapper<Graph, NodeFilterMap, EdgeFilterMap>& _gw, 
    1.57  	     const Edge& e) : 
    1.58  	Edge(e), gw(&_gw) { }