lemon/bits/graph_adaptor_extender.h
changeset 1130 0759d974de81
parent 1092 dceba191c00d
child 1131 4add05447ca0
     1.1 --- a/lemon/bits/graph_adaptor_extender.h	Thu Apr 02 22:34:03 2015 +0200
     1.2 +++ b/lemon/bits/graph_adaptor_extender.h	Sun Jan 05 22:24:56 2014 +0100
     1.3 @@ -85,6 +85,9 @@
     1.4  
     1.5      };
     1.6  
     1.7 +    LemonRangeWrapper1<NodeIt, Adaptor> nodes() {
     1.8 +      return LemonRangeWrapper1<NodeIt, Adaptor>(*this);
     1.9 +    }
    1.10  
    1.11      class ArcIt : public Arc {
    1.12        const Adaptor* _adaptor;
    1.13 @@ -108,6 +111,10 @@
    1.14  
    1.15      };
    1.16  
    1.17 +    LemonRangeWrapper1<ArcIt, Adaptor> arcs() {
    1.18 +      return LemonRangeWrapper1<ArcIt, Adaptor>(*this);
    1.19 +    }
    1.20 +
    1.21  
    1.22      class OutArcIt : public Arc {
    1.23        const Adaptor* _adaptor;
    1.24 @@ -132,6 +139,10 @@
    1.25  
    1.26      };
    1.27  
    1.28 +    LemonRangeWrapper2<OutArcIt, Adaptor, Node> outArcs(const Node& u) const {
    1.29 +      return LemonRangeWrapper2<OutArcIt, Adaptor, Node>(*this, u);
    1.30 +    }
    1.31 +
    1.32  
    1.33      class InArcIt : public Arc {
    1.34        const Adaptor* _adaptor;
    1.35 @@ -156,6 +167,10 @@
    1.36  
    1.37      };
    1.38  
    1.39 +    LemonRangeWrapper2<InArcIt, Adaptor, Node> inArcs(const Node& u) const {
    1.40 +      return LemonRangeWrapper2<InArcIt, Adaptor, Node>(*this, u);
    1.41 +    }
    1.42 +
    1.43      Node baseNode(const OutArcIt &e) const {
    1.44        return Parent::source(e);
    1.45      }
    1.46 @@ -254,6 +269,10 @@
    1.47  
    1.48      };
    1.49  
    1.50 +    LemonRangeWrapper1<NodeIt, Adaptor> nodes() {
    1.51 +      return LemonRangeWrapper1<NodeIt, Adaptor>(*this);
    1.52 +    }
    1.53 +
    1.54  
    1.55      class ArcIt : public Arc {
    1.56        const Adaptor* _adaptor;
    1.57 @@ -277,6 +296,10 @@
    1.58  
    1.59      };
    1.60  
    1.61 +    LemonRangeWrapper1<ArcIt, Adaptor> arcs() {
    1.62 +      return LemonRangeWrapper1<ArcIt, Adaptor>(*this);
    1.63 +    }
    1.64 +
    1.65  
    1.66      class OutArcIt : public Arc {
    1.67        const Adaptor* _adaptor;
    1.68 @@ -301,6 +324,10 @@
    1.69  
    1.70      };
    1.71  
    1.72 +    LemonRangeWrapper2<OutArcIt, Adaptor, Node> outArcs(const Node& u) const {
    1.73 +      return LemonRangeWrapper2<OutArcIt, Adaptor, Node>(*this, u);
    1.74 +    }
    1.75 +
    1.76  
    1.77      class InArcIt : public Arc {
    1.78        const Adaptor* _adaptor;
    1.79 @@ -325,6 +352,10 @@
    1.80  
    1.81      };
    1.82  
    1.83 +    LemonRangeWrapper2<InArcIt, Adaptor, Node> inArcs(const Node& u) const {
    1.84 +      return LemonRangeWrapper2<InArcIt, Adaptor, Node>(*this, u);
    1.85 +    }
    1.86 +
    1.87      class EdgeIt : public Parent::Edge {
    1.88        const Adaptor* _adaptor;
    1.89      public:
    1.90 @@ -347,6 +378,11 @@
    1.91  
    1.92      };
    1.93  
    1.94 +    LemonRangeWrapper1<EdgeIt, Adaptor> edges() {
    1.95 +      return LemonRangeWrapper1<EdgeIt, Adaptor>(*this);
    1.96 +    }
    1.97 +
    1.98 +
    1.99      class IncEdgeIt : public Edge {
   1.100        friend class GraphAdaptorExtender;
   1.101        const Adaptor* _adaptor;
   1.102 @@ -372,6 +408,11 @@
   1.103        }
   1.104      };
   1.105  
   1.106 +    LemonRangeWrapper2<IncEdgeIt, Adaptor, Node> incEdges(const Node& u) const {
   1.107 +      return LemonRangeWrapper2<IncEdgeIt, Adaptor, Node>(*this, u);
   1.108 +    }
   1.109 +
   1.110 +
   1.111      Node baseNode(const OutArcIt &a) const {
   1.112        return Parent::source(a);
   1.113      }