src/include/smart_graph.h
changeset 379 a5bff2813c4d
parent 285 0bc5f7f66bfa
child 398 ecebcedd8960
equal deleted inserted replaced
1:53d2e4181817 2:deaf9fea3436
   121     OutEdgeIt& first(OutEdgeIt& e, const Node v) const { 
   121     OutEdgeIt& first(OutEdgeIt& e, const Node v) const { 
   122       e=OutEdgeIt(*this,v); return e; }
   122       e=OutEdgeIt(*this,v); return e; }
   123     InEdgeIt& first(InEdgeIt& e, const Node v) const { 
   123     InEdgeIt& first(InEdgeIt& e, const Node v) const { 
   124       e=InEdgeIt(*this,v); return e; }
   124       e=InEdgeIt(*this,v); return e; }
   125 
   125 
   126     template< typename It >
   126 //     template< typename It >
   127     It first() const { It e; first(e); return e; }
   127 //     It first() const { It e; first(e); return e; }
   128 
   128 
   129     template< typename It >
   129 //     template< typename It >
   130     It first(Node v) const { It e; first(e,v); return e; }
   130 //     It first(Node v) const { It e; first(e,v); return e; }
   131 
   131 
   132     bool valid(Edge e) const { return e.n!=-1; }
   132     bool valid(Edge e) const { return e.n!=-1; }
   133     bool valid(Node n) const { return n.n!=-1; }
   133     bool valid(Node n) const { return n.n!=-1; }
   134     
   134     
   135     void setInvalid(Edge &e) { e.n=-1; }
   135     void setInvalid(Edge &e) { e.n=-1; }