src/work/list_graph.h
changeset 347 e4ab32225f1c
parent 309 50f1d2077d50
child 354 0e8eb96c22ca
equal deleted inserted replaced
9:ba5f6ac7fe97 10:487302c7f106
   292     //void get_invalid(Edge& e) { e=Edge(); }
   292     //void get_invalid(Edge& e) { e=Edge(); }
   293     //void get_invalid(OutEdgeIt& e) { e=OutEdgeIt(); }
   293     //void get_invalid(OutEdgeIt& e) { e=OutEdgeIt(); }
   294     //void get_invalid(InEdgeIt& e) { e=InEdgeIt(); }
   294     //void get_invalid(InEdgeIt& e) { e=InEdgeIt(); }
   295     //void get_invalid(SymEdgeIt& e) { e=SymEdgeIt(); }
   295     //void get_invalid(SymEdgeIt& e) { e=SymEdgeIt(); }
   296 
   296 
   297     template< typename It >
   297 //     template< typename It >
   298     It first() const { 
   298 //     It first() const { 
   299       It e;
   299 //       It e;
   300       first(e);
   300 //       first(e);
   301       return e; 
   301 //       return e; 
   302     }
   302 //     }
   303 
   303 
   304     template< typename It >
   304 //     template< typename It >
   305     It first(Node v) const { 
   305 //     It first(Node v) const { 
   306       It e;
   306 //       It e;
   307       first(e, v);
   307 //       first(e, v);
   308       return e; 
   308 //       return e; 
   309     }
   309 //     }
   310 
   310 
   311     bool valid(Node n) const { return n.valid(); }
   311     bool valid(Node n) const { return n.valid(); }
   312     bool valid(Edge e) const { return e.valid(); }
   312     bool valid(Edge e) const { return e.valid(); }
   313     
   313     
   314 //    template <typename It> It getNext(It it) const { 
   314 //    template <typename It> It getNext(It it) const { 
   350     }
   350     }
   351   
   351   
   352     void erase(Edge e) { _delete_edge(e.edge); }
   352     void erase(Edge e) { _delete_edge(e.edge); }
   353 
   353 
   354     void clear() { 
   354     void clear() { 
   355       while (first<NodeIt>().valid()) erase(first<NodeIt>());
   355       NodeIt e;
       
   356       while (this->valid(first(e))) erase(e); 
       
   357       //while (first<NodeIt>().valid()) erase(first<NodeIt>());
   356     }
   358     }
   357 
   359 
   358     void setTail(Edge e, Node tail) {
   360     void setTail(Edge e, Node tail) {
   359       _set_tail(e.edge, tail.node); 
   361       _set_tail(e.edge, tail.node); 
   360     }
   362     }