COIN-OR::LEMON - Graph Library

Ignore:
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • lemon/Makefile.am

    r888 r881  
    111111        lemon/pairing_heap.h \
    112112        lemon/path.h \
    113         lemon/planarity.h \
    114113        lemon/preflow.h \
    115114        lemon/radix_heap.h \
  • lemon/bits/map_extender.h

    r867 r765  
    8585      typedef typename Map::Value Value;
    8686
    87       MapIt() : map(NULL) {}
    88 
    89       MapIt(Invalid i) : Parent(i), map(NULL) {}
    90 
    91       explicit MapIt(Map& _map) : map(&_map) {
    92         map->notifier()->first(*this);
     87      MapIt() {}
     88
     89      MapIt(Invalid i) : Parent(i) { }
     90
     91      explicit MapIt(Map& _map) : map(_map) {
     92        map.notifier()->first(*this);
    9393      }
    9494
    9595      MapIt(const Map& _map, const Item& item)
    96         : Parent(item), map(&_map) {}
     96        : Parent(item), map(_map) {}
    9797
    9898      MapIt& operator++() {
    99         map->notifier()->next(*this);
     99        map.notifier()->next(*this);
    100100        return *this;
    101101      }
    102102
    103103      typename MapTraits<Map>::ConstReturnValue operator*() const {
    104         return (*map)[*this];
     104        return map[*this];
    105105      }
    106106
    107107      typename MapTraits<Map>::ReturnValue operator*() {
    108         return (*map)[*this];
     108        return map[*this];
    109109      }
    110110
    111111      void set(const Value& value) {
    112         map->set(*this, value);
    113       }
    114 
    115     protected:
    116       Map* map;
     112        map.set(*this, value);
     113      }
     114
     115    protected:
     116      Map& map;
    117117
    118118    };
     
    125125      typedef typename Map::Value Value;
    126126
    127       ConstMapIt() : map(NULL) {}
    128 
    129       ConstMapIt(Invalid i) : Parent(i), map(NULL) {}
    130 
    131       explicit ConstMapIt(Map& _map) : map(&_map) {
    132         map->notifier()->first(*this);
     127      ConstMapIt() {}
     128
     129      ConstMapIt(Invalid i) : Parent(i) { }
     130
     131      explicit ConstMapIt(Map& _map) : map(_map) {
     132        map.notifier()->first(*this);
    133133      }
    134134
     
    137137
    138138      ConstMapIt& operator++() {
    139         map->notifier()->next(*this);
     139        map.notifier()->next(*this);
    140140        return *this;
    141141      }
     
    146146
    147147    protected:
    148       const Map* map;
     148      const Map& map;
    149149    };
    150150
     
    153153
    154154    public:
    155       ItemIt() : map(NULL) {}
    156 
    157 
    158       ItemIt(Invalid i) : Parent(i), map(NULL) {}
    159 
    160       explicit ItemIt(Map& _map) : map(&_map) {
    161         map->notifier()->first(*this);
     155
     156      ItemIt() {}
     157
     158      ItemIt(Invalid i) : Parent(i) { }
     159
     160      explicit ItemIt(Map& _map) : map(_map) {
     161        map.notifier()->first(*this);
    162162      }
    163163
    164164      ItemIt(const Map& _map, const Item& item)
    165         : Parent(item), map(&_map) {}
     165        : Parent(item), map(_map) {}
    166166
    167167      ItemIt& operator++() {
    168         map->notifier()->next(*this);
    169         return *this;
    170       }
    171 
    172     protected:
    173       const Map* map;
     168        map.notifier()->next(*this);
     169        return *this;
     170      }
     171
     172    protected:
     173      const Map& map;
    174174
    175175    };
     
    232232      typedef typename Map::Value Value;
    233233
    234       MapIt() : map(NULL) {}
    235 
    236       MapIt(Invalid i) : Parent(i), map(NULL) { }
    237 
    238       explicit MapIt(Map& _map) : map(&_map) {
    239         map->graph.first(*this);
     234      MapIt() {}
     235
     236      MapIt(Invalid i) : Parent(i) { }
     237
     238      explicit MapIt(Map& _map) : map(_map) {
     239        map.graph.first(*this);
    240240      }
    241241
    242242      MapIt(const Map& _map, const Item& item)
    243         : Parent(item), map(&_map) {}
     243        : Parent(item), map(_map) {}
    244244
    245245      MapIt& operator++() {
    246         map->graph.next(*this);
     246        map.graph.next(*this);
    247247        return *this;
    248248      }
    249249
    250250      typename MapTraits<Map>::ConstReturnValue operator*() const {
    251         return (*map)[*this];
     251        return map[*this];
    252252      }
    253253
    254254      typename MapTraits<Map>::ReturnValue operator*() {
    255         return (*map)[*this];
     255        return map[*this];
    256256      }
    257257
    258258      void set(const Value& value) {
    259         map->set(*this, value);
    260       }
    261 
    262     protected:
    263       Map* map;
     259        map.set(*this, value);
     260      }
     261
     262    protected:
     263      Map& map;
    264264
    265265    };
     
    272272      typedef typename Map::Value Value;
    273273
    274       ConstMapIt() : map(NULL) {}
    275 
    276       ConstMapIt(Invalid i) : Parent(i), map(NULL) { }
    277 
    278       explicit ConstMapIt(Map& _map) : map(&_map) {
    279         map->graph.first(*this);
     274      ConstMapIt() {}
     275
     276      ConstMapIt(Invalid i) : Parent(i) { }
     277
     278      explicit ConstMapIt(Map& _map) : map(_map) {
     279        map.graph.first(*this);
    280280      }
    281281
    282282      ConstMapIt(const Map& _map, const Item& item)
    283         : Parent(item), map(&_map) {}
     283        : Parent(item), map(_map) {}
    284284
    285285      ConstMapIt& operator++() {
    286         map->graph.next(*this);
     286        map.graph.next(*this);
    287287        return *this;
    288288      }
    289289
    290290      typename MapTraits<Map>::ConstReturnValue operator*() const {
    291         return (*map)[*this];
    292       }
    293 
    294     protected:
    295       const Map* map;
     291        return map[*this];
     292      }
     293
     294    protected:
     295      const Map& map;
    296296    };
    297297
     
    300300
    301301    public:
    302       ItemIt() : map(NULL) {}
    303 
    304 
    305       ItemIt(Invalid i) : Parent(i), map(NULL) { }
    306 
    307       explicit ItemIt(Map& _map) : map(&_map) {
    308         map->graph.first(*this);
     302
     303      ItemIt() {}
     304
     305      ItemIt(Invalid i) : Parent(i) { }
     306
     307      explicit ItemIt(Map& _map) : map(_map) {
     308        map.graph.first(*this);
    309309      }
    310310
    311311      ItemIt(const Map& _map, const Item& item)
    312         : Parent(item), map(&_map) {}
     312        : Parent(item), map(_map) {}
    313313
    314314      ItemIt& operator++() {
    315         map->graph.next(*this);
    316         return *this;
    317       }
    318 
    319     protected:
    320       const Map* map;
     315        map.graph.next(*this);
     316        return *this;
     317      }
     318
     319    protected:
     320      const Map& map;
    321321
    322322    };
  • lemon/unionfind.h

    r864 r833  
    740740    void clear() {
    741741      items.clear();
    742       classes.clear();
     742      classes.clear;
    743743      firstClass = firstFreeClass = firstFreeItem = -1;
    744744    }
  • test/CMakeLists.txt

    r863 r817  
    3535  min_mean_cycle_test
    3636  path_test
    37   planarity_test
    3837  preflow_test
    3938  radix_sort_test
  • test/Makefile.am

    r863 r840  
    3737        test/min_mean_cycle_test \
    3838        test/path_test \
    39         test/planarity_test \
    4039        test/preflow_test \
    4140        test/radix_sort_test \
     
    8786test_min_mean_cycle_test_SOURCES = test/min_mean_cycle_test.cc
    8887test_path_test_SOURCES = test/path_test.cc
    89 test_planarity_test_SOURCES = test/planarity_test.cc
    9088test_preflow_test_SOURCES = test/preflow_test.cc
    9189test_radix_sort_test_SOURCES = test/radix_sort_test.cc
Note: See TracChangeset for help on using the changeset viewer.