COIN-OR::LEMON - Graph Library

Changeset 1337:4add05447ca0 in lemon for lemon


Ignore:
Timestamp:
04/14/15 08:39:40 (5 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Tests and bugfixes for the STL style iterators (#325)

Location:
lemon
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lemon/bellman_ford.h

    r1336 r1337  
    702702    /// which you can use in range-based for loops, STL algorithms, etc.
    703703    LemonRangeWrapper1<ActiveIt, BellmanFord>
    704         activeNodes(const BellmanFord& algorithm) const {
    705       return LemonRangeWrapper1<ActiveIt, BellmanFord>(algorithm);
     704    activeNodes() const {
     705      return LemonRangeWrapper1<ActiveIt, BellmanFord>(*this);
    706706    }
    707707
  • lemon/bits/edge_set_extender.h

    r1270 r1337  
    114114    };
    115115
     116    LemonRangeWrapper1<NodeIt, Digraph> nodes() const {
     117      return LemonRangeWrapper1<NodeIt, Digraph>(*this);
     118    }
    116119
    117120    class ArcIt : public Arc {
     
    137140    };
    138141
     142    LemonRangeWrapper1<ArcIt, Digraph> arcs() const {
     143      return LemonRangeWrapper1<ArcIt, Digraph>(*this);
     144    }
    139145
    140146    class OutArcIt : public Arc {
     
    161167    };
    162168
     169    LemonRangeWrapper2<OutArcIt, Digraph, Node> outArcs(const Node& u) const {
     170      return LemonRangeWrapper2<OutArcIt, Digraph, Node>(*this, u);
     171    }
    163172
    164173    class InArcIt : public Arc {
     
    184193
    185194    };
     195
     196    LemonRangeWrapper2<InArcIt, Digraph, Node> inArcs(const Node& u) const {
     197      return LemonRangeWrapper2<InArcIt, Digraph, Node>(*this, u);
     198    }
    186199
    187200    // \brief Base node of the iterator
     
    373386    };
    374387
     388    LemonRangeWrapper1<NodeIt, Graph> nodes() const {
     389      return LemonRangeWrapper1<NodeIt, Graph>(*this);
     390    }
    375391
    376392    class ArcIt : public Arc {
     
    396412    };
    397413
     414    LemonRangeWrapper1<ArcIt, Graph> arcs() const {
     415      return LemonRangeWrapper1<ArcIt, Graph>(*this);
     416    }
    398417
    399418    class OutArcIt : public Arc {
     
    420439    };
    421440
     441    LemonRangeWrapper2<OutArcIt, Graph, Node> outArcs(const Node& u) const {
     442      return LemonRangeWrapper2<OutArcIt, Graph, Node>(*this, u);
     443    }
    422444
    423445    class InArcIt : public Arc {
     
    444466    };
    445467
     468    LemonRangeWrapper2<InArcIt, Graph, Node> inArcs(const Node& u) const {
     469      return LemonRangeWrapper2<InArcIt, Graph, Node>(*this, u);
     470    }
    446471
    447472    class EdgeIt : public Parent::Edge {
     
    466491
    467492    };
     493
     494    LemonRangeWrapper1<EdgeIt, Graph> edges() const {
     495      return LemonRangeWrapper1<EdgeIt, Graph>(*this);
     496    }
    468497
    469498    class IncEdgeIt : public Parent::Edge {
     
    491520      }
    492521    };
     522
     523    LemonRangeWrapper2<IncEdgeIt, Graph, Node> incEdges(const Node& u) const {
     524      return LemonRangeWrapper2<IncEdgeIt, Graph, Node>(*this, u);
     525    }
    493526
    494527    // \brief Base node of the iterator
  • lemon/bits/graph_adaptor_extender.h

    r1336 r1337  
    8686    };
    8787
    88     LemonRangeWrapper1<NodeIt, Adaptor> nodes() {
     88    LemonRangeWrapper1<NodeIt, Adaptor> nodes() const {
    8989      return LemonRangeWrapper1<NodeIt, Adaptor>(*this);
    9090    }
     
    112112    };
    113113
    114     LemonRangeWrapper1<ArcIt, Adaptor> arcs() {
     114    LemonRangeWrapper1<ArcIt, Adaptor> arcs() const {
    115115      return LemonRangeWrapper1<ArcIt, Adaptor>(*this);
    116116    }
     
    270270    };
    271271
    272     LemonRangeWrapper1<NodeIt, Adaptor> nodes() {
     272    LemonRangeWrapper1<NodeIt, Adaptor> nodes() const {
    273273      return LemonRangeWrapper1<NodeIt, Adaptor>(*this);
    274274    }
     
    297297    };
    298298
    299     LemonRangeWrapper1<ArcIt, Adaptor> arcs() {
     299    LemonRangeWrapper1<ArcIt, Adaptor> arcs() const {
    300300      return LemonRangeWrapper1<ArcIt, Adaptor>(*this);
    301301    }
     
    379379    };
    380380
    381     LemonRangeWrapper1<EdgeIt, Adaptor> edges() {
     381    LemonRangeWrapper1<EdgeIt, Adaptor> edges() const {
    382382      return LemonRangeWrapper1<EdgeIt, Adaptor>(*this);
    383383    }
  • lemon/config.h.in

    r1306 r1337  
    11#define LEMON_VERSION "@PROJECT_VERSION@"
    22#cmakedefine LEMON_HAVE_LONG_LONG 1
     3
     4#cmakedefine LEMON_CXX11 1
    35
    46#cmakedefine LEMON_HAVE_LP 1
  • lemon/list_graph.h

    r1336 r1337  
    12101210    ListGraph() {}
    12111211
    1212     typedef Parent::OutArcIt IncEdgeIt;
     1212    typedef Parent::IncEdgeIt IncEdgeIt;
    12131213
    12141214    /// \brief Add a new node to the graph.
     
    21372137    ListBpGraph() {}
    21382138
    2139     typedef Parent::OutArcIt IncEdgeIt;
     2139    typedef Parent::IncEdgeIt IncEdgeIt;
    21402140
    21412141    /// \brief Add a new red node to the graph.
Note: See TracChangeset for help on using the changeset viewer.