COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/map_extender.h

    r867 r865  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2008
    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
    3941    typedef _Map Parent;
    40     typedef typename Parent::GraphType GraphType;
    41 
    42   public:
    43 
    4442    typedef MapExtender Map;
     43
     44
     45    typedef typename Parent::Graph Graph;
    4546    typedef typename Parent::Key Item;
    4647
    4748    typedef typename Parent::Key Key;
    4849    typedef typename Parent::Value Value;
    49     typedef typename Parent::Reference Reference;
    50     typedef typename Parent::ConstReference ConstReference;
    51 
    52     typedef typename Parent::ReferenceMapTag ReferenceMapTag;
    5350
    5451    class MapIt;
     
    6057  public:
    6158
    62     MapExtender(const GraphType& graph)
     59    MapExtender(const Graph& graph)
    6360      : Parent(graph) {}
    6461
    65     MapExtender(const GraphType& graph, const Value& value)
     62    MapExtender(const Graph& graph, const Value& value)
    6663      : Parent(graph, value) {}
    6764
     
    7976  public:
    8077    class MapIt : public Item {
    81       typedef Item Parent;
    82 
    83     public:
    84 
     78    public:
     79
     80      typedef Item Parent;
    8581      typedef typename Map::Value Value;
    8682
     
    119115
    120116    class ConstMapIt : public Item {
    121       typedef Item Parent;
    122 
    123     public:
     117    public:
     118
     119      typedef Item Parent;
    124120
    125121      typedef typename Map::Value Value;
     
    150146
    151147    class ItemIt : public Item {
    152       typedef Item Parent;
    153 
    154     public:
     148    public:
     149
     150      typedef Item Parent;
     151
    155152      ItemIt() : map(NULL) {}
    156 
    157153
    158154      ItemIt(Invalid i) : Parent(i), map(NULL) {}
     
    181177  template <typename _Graph, typename _Map>
    182178  class SubMapExtender : public _Map {
     179  public:
     180
    183181    typedef _Map Parent;
    184     typedef _Graph GraphType;
    185 
    186   public:
    187 
    188182    typedef SubMapExtender Map;
     183
     184    typedef _Graph Graph;
     185
    189186    typedef typename Parent::Key Item;
    190187
    191188    typedef typename Parent::Key Key;
    192189    typedef typename Parent::Value Value;
    193     typedef typename Parent::Reference Reference;
    194     typedef typename Parent::ConstReference ConstReference;
    195 
    196     typedef typename Parent::ReferenceMapTag ReferenceMapTag;
    197190
    198191    class MapIt;
     
    204197  public:
    205198
    206     SubMapExtender(const GraphType& _graph)
     199    SubMapExtender(const Graph& _graph)
    207200      : Parent(_graph), graph(_graph) {}
    208201
    209     SubMapExtender(const GraphType& _graph, const Value& _value)
     202    SubMapExtender(const Graph& _graph, const Value& _value)
    210203      : Parent(_graph, _value), graph(_graph) {}
    211204
     
    227220  public:
    228221    class MapIt : public Item {
    229       typedef Item Parent;
    230 
    231     public:
     222    public:
     223
     224      typedef Item Parent;
    232225      typedef typename Map::Value Value;
    233226
     
    266259
    267260    class ConstMapIt : public Item {
    268       typedef Item Parent;
    269 
    270     public:
     261    public:
     262
     263      typedef Item Parent;
    271264
    272265      typedef typename Map::Value Value;
     
    297290
    298291    class ItemIt : public Item {
    299       typedef Item Parent;
    300 
    301     public:
     292    public:
     293
     294      typedef Item Parent;
     295
    302296      ItemIt() : map(NULL) {}
    303 
    304297
    305298      ItemIt(Invalid i) : Parent(i), map(NULL) { }
     
    324317  private:
    325318
    326     const GraphType& graph;
     319    const Graph& graph;
    327320
    328321  };
Note: See TracChangeset for help on using the changeset viewer.