Forgotten functions in the graph adaptor extenders.
authordeba
Fri, 07 Apr 2006 09:52:30 +0000
changeset 204128df5272df99
parent 2040 c7bd55c0d820
child 2042 bdc953f2a449
Forgotten functions in the graph adaptor extenders.
lemon/bits/graph_adaptor_extender.h
     1.1 --- a/lemon/bits/graph_adaptor_extender.h	Fri Apr 07 09:51:23 2006 +0000
     1.2 +++ b/lemon/bits/graph_adaptor_extender.h	Fri Apr 07 09:52:30 2006 +0000
     1.3 @@ -720,6 +720,24 @@
     1.4        return e.direction ? target(e) : source(e);
     1.5      }
     1.6  
     1.7 +    Node oppositeNode(const Node &n, const UEdge &e) const {
     1.8 +      if( n == Parent::source(e))
     1.9 +	return Parent::target(e);
    1.10 +      else if( n == Parent::target(e))
    1.11 +	return Parent::source(e);
    1.12 +      else
    1.13 +	return INVALID;
    1.14 +    }
    1.15 +
    1.16 +    Edge oppositeEdge(const Edge &e) const {
    1.17 +      return Parent::direct(e, !Parent::direction(e));
    1.18 +    }
    1.19 +
    1.20 +    using Parent::direct;
    1.21 +    Edge direct(const UEdge &ue, const Node &s) const {
    1.22 +      return Parent::direct(ue, Parent::source(ue) == s);
    1.23 +    }
    1.24 +
    1.25    };
    1.26  
    1.27