lemon/smart_graph.h
changeset 2345 bfcaad2b84e8
parent 2342 4dd3eb348641
child 2350 eb371753e814
equal deleted inserted replaced
38:9b9ab82f4f48 39:da1d2097a29b
   407       bool operator<(const Node& node) const {return id < node.id;}
   407       bool operator<(const Node& node) const {return id < node.id;}
   408     };
   408     };
   409 
   409 
   410     class UEdge {
   410     class UEdge {
   411       friend class SmartUGraphBase;
   411       friend class SmartUGraphBase;
   412       friend class SmartUGraphBase::Edge;
       
   413     protected:
   412     protected:
   414 
   413 
   415       int id;
   414       int id;
   416       explicit UEdge(int pid) { id = pid;}
   415       explicit UEdge(int pid) { id = pid;}
   417 
   416 
   429 
   428 
   430       int id;
   429       int id;
   431       explicit Edge(int pid) { id = pid;}
   430       explicit Edge(int pid) { id = pid;}
   432 
   431 
   433     public:
   432     public:
   434       operator UEdge() const { return UEdge(id / 2); }
   433       operator UEdge() const { return uEdgeFromId(id / 2); }
   435 
   434 
   436       Edge() {}
   435       Edge() {}
   437       Edge (Invalid) { id = -1; }
   436       Edge (Invalid) { id = -1; }
   438       bool operator==(const Edge& edge) const {return id == edge.id;}
   437       bool operator==(const Edge& edge) const {return id == edge.id;}
   439       bool operator!=(const Edge& edge) const {return id != edge.id;}
   438       bool operator!=(const Edge& edge) const {return id != edge.id;}