COIN-OR::LEMON - Graph Library

Changeset 1194:699c7eac2c6d in lemon for lemon/bits


Ignore:
Timestamp:
01/11/12 22:21:07 (12 years ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Renamings in BpGraphs? (#69)

Location:
lemon/bits
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/graph_extender.h

    r1193 r1194  
    914914    };
    915915
    916     class RedIt : public RedNode {
     916    class RedNodeIt : public RedNode {
    917917      const BpGraph* _graph;
    918918    public:
    919919
    920       RedIt() {}
    921 
    922       RedIt(Invalid i) : RedNode(i) { }
    923 
    924       explicit RedIt(const BpGraph& graph) : _graph(&graph) {
     920      RedNodeIt() {}
     921
     922      RedNodeIt(Invalid i) : RedNode(i) { }
     923
     924      explicit RedNodeIt(const BpGraph& graph) : _graph(&graph) {
    925925        _graph->first(static_cast<RedNode&>(*this));
    926926      }
    927927
    928       RedIt(const BpGraph& graph, const RedNode& node)
     928      RedNodeIt(const BpGraph& graph, const RedNode& node)
    929929        : RedNode(node), _graph(&graph) {}
    930930
    931       RedIt& operator++() {
     931      RedNodeIt& operator++() {
    932932        _graph->next(static_cast<RedNode&>(*this));
    933933        return *this;
     
    936936    };
    937937
    938     class BlueIt : public BlueNode {
     938    class BlueNodeIt : public BlueNode {
    939939      const BpGraph* _graph;
    940940    public:
    941941
    942       BlueIt() {}
    943 
    944       BlueIt(Invalid i) : BlueNode(i) { }
    945 
    946       explicit BlueIt(const BpGraph& graph) : _graph(&graph) {
     942      BlueNodeIt() {}
     943
     944      BlueNodeIt(Invalid i) : BlueNode(i) { }
     945
     946      explicit BlueNodeIt(const BpGraph& graph) : _graph(&graph) {
    947947        _graph->first(static_cast<BlueNode&>(*this));
    948948      }
    949949
    950       BlueIt(const BpGraph& graph, const BlueNode& node)
     950      BlueNodeIt(const BpGraph& graph, const BlueNode& node)
    951951        : BlueNode(node), _graph(&graph) {}
    952952
    953       BlueIt& operator++() {
     953      BlueNodeIt& operator++() {
    954954        _graph->next(static_cast<BlueNode&>(*this));
    955955        return *this;
     
    11451145
    11461146    template <typename _Value>
    1147     class RedMap
     1147    class RedNodeMap
    11481148      : public MapExtender<DefaultMap<BpGraph, RedNode, _Value> > {
    11491149      typedef MapExtender<DefaultMap<BpGraph, RedNode, _Value> > Parent;
    11501150
    11511151    public:
    1152       explicit RedMap(const BpGraph& bpgraph)
     1152      explicit RedNodeMap(const BpGraph& bpgraph)
    11531153        : Parent(bpgraph) {}
    1154       RedMap(const BpGraph& bpgraph, const _Value& value)
     1154      RedNodeMap(const BpGraph& bpgraph, const _Value& value)
    11551155        : Parent(bpgraph, value) {}
    11561156
    11571157    private:
    1158       RedMap& operator=(const RedMap& cmap) {
    1159         return operator=<RedMap>(cmap);
     1158      RedNodeMap& operator=(const RedNodeMap& cmap) {
     1159        return operator=<RedNodeMap>(cmap);
    11601160      }
    11611161
    11621162      template <typename CMap>
    1163       RedMap& operator=(const CMap& cmap) {
     1163      RedNodeMap& operator=(const CMap& cmap) {
    11641164        Parent::operator=(cmap);
    11651165        return *this;
     
    11691169
    11701170    template <typename _Value>
    1171     class BlueMap
     1171    class BlueNodeMap
    11721172      : public MapExtender<DefaultMap<BpGraph, BlueNode, _Value> > {
    11731173      typedef MapExtender<DefaultMap<BpGraph, BlueNode, _Value> > Parent;
    11741174
    11751175    public:
    1176       explicit BlueMap(const BpGraph& bpgraph)
     1176      explicit BlueNodeMap(const BpGraph& bpgraph)
    11771177        : Parent(bpgraph) {}
    1178       BlueMap(const BpGraph& bpgraph, const _Value& value)
     1178      BlueNodeMap(const BpGraph& bpgraph, const _Value& value)
    11791179        : Parent(bpgraph, value) {}
    11801180
    11811181    private:
    1182       BlueMap& operator=(const BlueMap& cmap) {
    1183         return operator=<BlueMap>(cmap);
     1182      BlueNodeMap& operator=(const BlueNodeMap& cmap) {
     1183        return operator=<BlueNodeMap>(cmap);
    11841184      }
    11851185
    11861186      template <typename CMap>
    1187       BlueMap& operator=(const CMap& cmap) {
     1187      BlueNodeMap& operator=(const CMap& cmap) {
    11881188        Parent::operator=(cmap);
    11891189        return *this;
  • lemon/bits/traits.h

    r1187 r1194  
    173173
    174174    typedef typename GR::RedNode Item;
    175     typedef typename GR::RedIt ItemIt;
     175    typedef typename GR::RedNodeIt ItemIt;
    176176
    177177    typedef typename RedNodeNotifierIndicator<GR>::Type ItemNotifier;
    178178
    179179    template <typename V>
    180     class Map : public GR::template RedMap<V> {
    181       typedef typename GR::template RedMap<V> Parent;
    182 
    183     public:
    184       typedef typename GR::template RedMap<V> Type;
     180    class Map : public GR::template RedNodeMap<V> {
     181      typedef typename GR::template RedNodeMap<V> Parent;
     182
     183    public:
     184      typedef typename GR::template RedNodeMap<V> Type;
    185185      typedef typename Parent::Value Value;
    186186
     
    214214
    215215    typedef typename GR::BlueNode Item;
    216     typedef typename GR::BlueIt ItemIt;
     216    typedef typename GR::BlueNodeIt ItemIt;
    217217
    218218    typedef typename BlueNodeNotifierIndicator<GR>::Type ItemNotifier;
    219219
    220220    template <typename V>
    221     class Map : public GR::template BlueMap<V> {
    222       typedef typename GR::template BlueMap<V> Parent;
    223 
    224     public:
    225       typedef typename GR::template BlueMap<V> Type;
     221    class Map : public GR::template BlueNodeMap<V> {
     222      typedef typename GR::template BlueNodeMap<V> Parent;
     223
     224    public:
     225      typedef typename GR::template BlueNodeMap<V> Type;
    226226      typedef typename Parent::Value Value;
    227227
Note: See TracChangeset for help on using the changeset viewer.