src/hugo/list_graph.h
changeset 857 4e948fd205f7
parent 827 6433f69dfc6b
child 877 66dd225ca128
equal deleted inserted replaced
16:8f8f901c8404 17:3e17f33541be
  1112       OutEdgeIt (Invalid i) : Edge(i) { }
  1112       OutEdgeIt (Invalid i) : Edge(i) { }
  1113       OutEdgeIt(const EdgeSet& _G, Edge e) : Edge(e), G(&_G) { }
  1113       OutEdgeIt(const EdgeSet& _G, Edge e) : Edge(e), G(&_G) { }
  1114 
  1114 
  1115       OutEdgeIt(const EdgeSet& _G,const Node v) :
  1115       OutEdgeIt(const EdgeSet& _G,const Node v) :
  1116 	Edge(_G.nodes[v].first_out), G(&_G) { }
  1116 	Edge(_G.nodes[v].first_out), G(&_G) { }
  1117       OutEdgeIt &operator++() { n = G->edges[n].next_out; return *this; }
  1117       OutEdgeIt &operator++() { 
       
  1118 	Edge::n = G->edges[Edge::n].next_out;
       
  1119 	return *this; 
       
  1120       }
  1118     };
  1121     };
  1119     
  1122     
  1120     class InEdgeIt : public Edge {
  1123     class InEdgeIt : public Edge {
  1121       const EdgeSet *G;
  1124       const EdgeSet *G;
  1122       friend class EdgeSet;
  1125       friend class EdgeSet;
  1124       InEdgeIt() : Edge() { }
  1127       InEdgeIt() : Edge() { }
  1125       InEdgeIt (Invalid i) : Edge(i) { }
  1128       InEdgeIt (Invalid i) : Edge(i) { }
  1126       InEdgeIt(const EdgeSet& _G, Edge e) : Edge(e), G(&_G) { }
  1129       InEdgeIt(const EdgeSet& _G, Edge e) : Edge(e), G(&_G) { }
  1127       InEdgeIt(const EdgeSet& _G,Node v)
  1130       InEdgeIt(const EdgeSet& _G,Node v)
  1128 	: Edge(_G.nodes[v].first_in), G(&_G) { }
  1131 	: Edge(_G.nodes[v].first_in), G(&_G) { }
  1129       InEdgeIt &operator++() { n=G->edges[n].next_in; return *this; }
  1132       InEdgeIt &operator++() { 
       
  1133 	Edge::n = G->edges[Edge::n].next_in; 
       
  1134 	return *this; 
       
  1135       }
  1130     };
  1136     };
  1131     
  1137     
  1132   };
  1138   };
  1133 
  1139 
  1134   template<typename GG>
  1140   template<typename GG>