COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
01/05/14 22:24:56 (10 years ago)
Author:
Gabor Gevay <ggab90@…>
Branch:
default
Phase:
public
Message:

STL style iterators (#325)

For

  • graph types,
  • graph adaptors,
  • paths,
  • iterable maps,
  • LP rows/cols and
  • active nodes is BellmanFord?
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/graph_adaptor_extender.h

    r1092 r1130  
    8686    };
    8787
     88    LemonRangeWrapper1<NodeIt, Adaptor> nodes() {
     89      return LemonRangeWrapper1<NodeIt, Adaptor>(*this);
     90    }
    8891
    8992    class ArcIt : public Arc {
     
    108111
    109112    };
     113
     114    LemonRangeWrapper1<ArcIt, Adaptor> arcs() {
     115      return LemonRangeWrapper1<ArcIt, Adaptor>(*this);
     116    }
    110117
    111118
     
    133140    };
    134141
     142    LemonRangeWrapper2<OutArcIt, Adaptor, Node> outArcs(const Node& u) const {
     143      return LemonRangeWrapper2<OutArcIt, Adaptor, Node>(*this, u);
     144    }
     145
    135146
    136147    class InArcIt : public Arc {
     
    156167
    157168    };
     169
     170    LemonRangeWrapper2<InArcIt, Adaptor, Node> inArcs(const Node& u) const {
     171      return LemonRangeWrapper2<InArcIt, Adaptor, Node>(*this, u);
     172    }
    158173
    159174    Node baseNode(const OutArcIt &e) const {
     
    255270    };
    256271
     272    LemonRangeWrapper1<NodeIt, Adaptor> nodes() {
     273      return LemonRangeWrapper1<NodeIt, Adaptor>(*this);
     274    }
     275
    257276
    258277    class ArcIt : public Arc {
     
    277296
    278297    };
     298
     299    LemonRangeWrapper1<ArcIt, Adaptor> arcs() {
     300      return LemonRangeWrapper1<ArcIt, Adaptor>(*this);
     301    }
    279302
    280303
     
    302325    };
    303326
     327    LemonRangeWrapper2<OutArcIt, Adaptor, Node> outArcs(const Node& u) const {
     328      return LemonRangeWrapper2<OutArcIt, Adaptor, Node>(*this, u);
     329    }
     330
    304331
    305332    class InArcIt : public Arc {
     
    326353    };
    327354
     355    LemonRangeWrapper2<InArcIt, Adaptor, Node> inArcs(const Node& u) const {
     356      return LemonRangeWrapper2<InArcIt, Adaptor, Node>(*this, u);
     357    }
     358
    328359    class EdgeIt : public Parent::Edge {
    329360      const Adaptor* _adaptor;
     
    347378
    348379    };
     380
     381    LemonRangeWrapper1<EdgeIt, Adaptor> edges() {
     382      return LemonRangeWrapper1<EdgeIt, Adaptor>(*this);
     383    }
     384
    349385
    350386    class IncEdgeIt : public Edge {
     
    373409    };
    374410
     411    LemonRangeWrapper2<IncEdgeIt, Adaptor, Node> incEdges(const Node& u) const {
     412      return LemonRangeWrapper2<IncEdgeIt, Adaptor, Node>(*this, u);
     413    }
     414
     415
    375416    Node baseNode(const OutArcIt &a) const {
    376417      return Parent::source(a);
Note: See TracChangeset for help on using the changeset viewer.