lemon/bits/graph_adaptor_extender.h
changeset 2041 28df5272df99
parent 2031 080d51024ac5
child 2076 10681ee9d8ae
equal deleted inserted replaced
2:275b88f95436 3:b1941c7a0f68
   718     /// Returns the running node of the iterator
   718     /// Returns the running node of the iterator
   719     Node runningNode(const IncEdgeIt &e) const {
   719     Node runningNode(const IncEdgeIt &e) const {
   720       return e.direction ? target(e) : source(e);
   720       return e.direction ? target(e) : source(e);
   721     }
   721     }
   722 
   722 
       
   723     Node oppositeNode(const Node &n, const UEdge &e) const {
       
   724       if( n == Parent::source(e))
       
   725 	return Parent::target(e);
       
   726       else if( n == Parent::target(e))
       
   727 	return Parent::source(e);
       
   728       else
       
   729 	return INVALID;
       
   730     }
       
   731 
       
   732     Edge oppositeEdge(const Edge &e) const {
       
   733       return Parent::direct(e, !Parent::direction(e));
       
   734     }
       
   735 
       
   736     using Parent::direct;
       
   737     Edge direct(const UEdge &ue, const Node &s) const {
       
   738       return Parent::direct(ue, Parent::source(ue) == s);
       
   739     }
       
   740 
   723   };
   741   };
   724 
   742 
   725 
   743 
   726 }
   744 }
   727 
   745