COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/map_extender.h

    r314 r617  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2008
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    3737  template <typename _Map>
    3838  class MapExtender : public _Map {
    39   public:
    40 
    4139    typedef _Map Parent;
     40    typedef typename Parent::GraphType GraphType;
     41
     42  public:
     43
    4244    typedef MapExtender Map;
    43 
    44 
    45     typedef typename Parent::Graph Graph;
    4645    typedef typename Parent::Key Item;
    4746
    4847    typedef typename Parent::Key Key;
    4948    typedef typename Parent::Value Value;
     49    typedef typename Parent::Reference Reference;
     50    typedef typename Parent::ConstReference ConstReference;
    5051
    5152    class MapIt;
     
    5758  public:
    5859
    59     MapExtender(const Graph& graph)
     60    MapExtender(const GraphType& graph)
    6061      : Parent(graph) {}
    6162
    62     MapExtender(const Graph& graph, const Value& value)
     63    MapExtender(const GraphType& graph, const Value& value)
    6364      : Parent(graph, value) {}
    6465
     
    7677  public:
    7778    class MapIt : public Item {
    78     public:
    79 
    80       typedef Item Parent;
     79      typedef Item Parent;
     80
     81    public:
     82
    8183      typedef typename Map::Value Value;
    8284
     
    115117
    116118    class ConstMapIt : public Item {
    117     public:
    118 
    119       typedef Item Parent;
     119      typedef Item Parent;
     120
     121    public:
    120122
    121123      typedef typename Map::Value Value;
     
    146148
    147149    class ItemIt : public Item {
    148     public:
    149 
    150       typedef Item Parent;
     150      typedef Item Parent;
     151
     152    public:
    151153
    152154      ItemIt() {}
     
    177179  template <typename _Graph, typename _Map>
    178180  class SubMapExtender : public _Map {
    179   public:
    180 
    181181    typedef _Map Parent;
     182    typedef _Graph GraphType;
     183
     184  public:
     185
    182186    typedef SubMapExtender Map;
    183 
    184     typedef _Graph Graph;
    185 
    186187    typedef typename Parent::Key Item;
    187188
    188189    typedef typename Parent::Key Key;
    189190    typedef typename Parent::Value Value;
     191    typedef typename Parent::Reference Reference;
     192    typedef typename Parent::ConstReference ConstReference;
    190193
    191194    class MapIt;
     
    197200  public:
    198201
    199     SubMapExtender(const Graph& _graph)
     202    SubMapExtender(const GraphType& _graph)
    200203      : Parent(_graph), graph(_graph) {}
    201204
    202     SubMapExtender(const Graph& _graph, const Value& _value)
     205    SubMapExtender(const GraphType& _graph, const Value& _value)
    203206      : Parent(_graph, _value), graph(_graph) {}
    204207
     
    220223  public:
    221224    class MapIt : public Item {
    222     public:
    223 
    224       typedef Item Parent;
     225      typedef Item Parent;
     226
     227    public:
    225228      typedef typename Map::Value Value;
    226229
     
    259262
    260263    class ConstMapIt : public Item {
    261     public:
    262 
    263       typedef Item Parent;
     264      typedef Item Parent;
     265
     266    public:
    264267
    265268      typedef typename Map::Value Value;
     
    290293
    291294    class ItemIt : public Item {
    292     public:
    293 
    294       typedef Item Parent;
     295      typedef Item Parent;
     296
     297    public:
    295298
    296299      ItemIt() {}
     
    317320  private:
    318321
    319     const Graph& graph;
     322    const GraphType& graph;
    320323
    321324  };
Note: See TracChangeset for help on using the changeset viewer.