COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/graph_extender.h

    r1092 r1130  
    2828#include <lemon/concepts/maps.h>
    2929
     30#include <lemon/bits/stl_iterators.h>
     31
    3032//\ingroup graphbits
    3133//\file
     
    117119    };
    118120
     121    LemonRangeWrapper1<NodeIt, Digraph> nodes() const {
     122      return LemonRangeWrapper1<NodeIt, Digraph>(*this);
     123    }
     124
    119125
    120126    class ArcIt : public Arc {
     
    139145
    140146    };
     147
     148    LemonRangeWrapper1<ArcIt, Digraph> arcs() const {
     149      return LemonRangeWrapper1<ArcIt, Digraph>(*this);
     150    }
    141151
    142152
     
    164174    };
    165175
     176    LemonRangeWrapper2<OutArcIt, Digraph, Node> outArcs(const Node& u) const {
     177      return LemonRangeWrapper2<OutArcIt, Digraph, Node>(*this, u);
     178    }
     179
    166180
    167181    class InArcIt : public Arc {
     
    187201
    188202    };
     203
     204    LemonRangeWrapper2<InArcIt, Digraph, Node> inArcs(const Node& u) const {
     205      return LemonRangeWrapper2<InArcIt, Digraph, Node>(*this, u);
     206    }
    189207
    190208    // \brief Base node of the iterator
     
    437455    };
    438456
     457    LemonRangeWrapper1<NodeIt, Graph> nodes() const {
     458      return LemonRangeWrapper1<NodeIt, Graph>(*this);
     459    }
     460
    439461
    440462    class ArcIt : public Arc {
     
    459481
    460482    };
     483
     484    LemonRangeWrapper1<ArcIt, Graph> arcs() const {
     485      return LemonRangeWrapper1<ArcIt, Graph>(*this);
     486    }
    461487
    462488
     
    484510    };
    485511
     512    LemonRangeWrapper2<OutArcIt, Graph, Node> outArcs(const Node& u) const {
     513      return LemonRangeWrapper2<OutArcIt, Graph, Node>(*this, u);
     514    }
     515
    486516
    487517    class InArcIt : public Arc {
     
    508538    };
    509539
     540    LemonRangeWrapper2<InArcIt, Graph, Node> inArcs(const Node& u) const {
     541      return LemonRangeWrapper2<InArcIt, Graph, Node>(*this, u);
     542    }
     543
    510544
    511545    class EdgeIt : public Parent::Edge {
     
    530564
    531565    };
     566
     567    LemonRangeWrapper1<EdgeIt, Graph> edges() const {
     568      return LemonRangeWrapper1<EdgeIt, Graph>(*this);
     569    }
     570
    532571
    533572    class IncEdgeIt : public Parent::Edge {
     
    555594      }
    556595    };
     596
     597    LemonRangeWrapper2<IncEdgeIt, Graph, Node> incEdges(const Node& u) const {
     598      return LemonRangeWrapper2<IncEdgeIt, Graph, Node>(*this, u);
     599    }
     600
    557601
    558602    // \brief Base node of the iterator
     
    904948    };
    905949
     950    LemonRangeWrapper1<NodeIt, BpGraph> nodes() const {
     951      return LemonRangeWrapper1<NodeIt, BpGraph>(*this);
     952    }
     953
     954
    906955    class RedNodeIt : public RedNode {
    907956      const BpGraph* _graph;
     
    926975    };
    927976
     977    LemonRangeWrapper1<RedNodeIt, BpGraph> redNodes() const {
     978      return LemonRangeWrapper1<RedNodeIt, BpGraph>(*this);
     979    }
     980
     981
    928982    class BlueNodeIt : public BlueNode {
    929983      const BpGraph* _graph;
     
    9481002    };
    9491003
     1004    LemonRangeWrapper1<BlueNodeIt, BpGraph> blueNodes() const {
     1005      return LemonRangeWrapper1<BlueNodeIt, BpGraph>(*this);
     1006    }
     1007
     1008
    9501009
    9511010    class ArcIt : public Arc {
     
    9701029
    9711030    };
     1031
     1032    LemonRangeWrapper1<ArcIt, BpGraph> arcs() const {
     1033      return LemonRangeWrapper1<ArcIt, BpGraph>(*this);
     1034    }
    9721035
    9731036
     
    9951058    };
    9961059
     1060    LemonRangeWrapper2<OutArcIt, BpGraph, Node> outArcs(const Node& u) const {
     1061      return LemonRangeWrapper2<OutArcIt, BpGraph, Node>(*this, u);
     1062    }
     1063
    9971064
    9981065    class InArcIt : public Arc {
     
    10191086    };
    10201087
     1088    LemonRangeWrapper2<InArcIt, BpGraph, Node> inArcs(const Node& u) const {
     1089      return LemonRangeWrapper2<InArcIt, BpGraph, Node>(*this, u);
     1090    }
     1091
    10211092
    10221093    class EdgeIt : public Parent::Edge {
     
    10411112
    10421113    };
     1114
     1115    LemonRangeWrapper1<EdgeIt, BpGraph> edges() const {
     1116      return LemonRangeWrapper1<EdgeIt, BpGraph>(*this);
     1117    }
     1118
    10431119
    10441120    class IncEdgeIt : public Parent::Edge {
     
    10661142      }
    10671143    };
     1144
     1145    LemonRangeWrapper2<IncEdgeIt, BpGraph, Node> incEdges(const Node& u) const {
     1146      return LemonRangeWrapper2<IncEdgeIt, BpGraph, Node>(*this, u);
     1147    }
     1148
    10681149
    10691150    // \brief Base node of the iterator
Note: See TracChangeset for help on using the changeset viewer.