# HG changeset patch # User deba # Date 1144403550 0 # Node ID 28df5272df99c3cb287f8dfc868694149310a528 # Parent c7bd55c0d8202776b2ff5010ee339a3cca82c7ba Forgotten functions in the graph adaptor extenders. diff -r c7bd55c0d820 -r 28df5272df99 lemon/bits/graph_adaptor_extender.h --- a/lemon/bits/graph_adaptor_extender.h Fri Apr 07 09:51:23 2006 +0000 +++ b/lemon/bits/graph_adaptor_extender.h Fri Apr 07 09:52:30 2006 +0000 @@ -720,6 +720,24 @@ return e.direction ? target(e) : source(e); } + Node oppositeNode(const Node &n, const UEdge &e) const { + if( n == Parent::source(e)) + return Parent::target(e); + else if( n == Parent::target(e)) + return Parent::source(e); + else + return INVALID; + } + + Edge oppositeEdge(const Edge &e) const { + return Parent::direct(e, !Parent::direction(e)); + } + + using Parent::direct; + Edge direct(const UEdge &ue, const Node &s) const { + return Parent::direct(ue, Parent::source(ue) == s); + } + };