Changes in / [822:f903263902f6:821:072ec8120958] in lemon-main
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/Makefile.am
r822 r815 111 111 lemon/pairing_heap.h \ 112 112 lemon/path.h \ 113 lemon/planarity.h \114 113 lemon/preflow.h \ 115 114 lemon/radix_heap.h \ -
lemon/bits/map_extender.h
r802 r718 85 85 typedef typename Map::Value Value; 86 86 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); 93 93 } 94 94 95 95 MapIt(const Map& _map, const Item& item) 96 : Parent(item), map( &_map) {}96 : Parent(item), map(_map) {} 97 97 98 98 MapIt& operator++() { 99 map ->notifier()->next(*this);99 map.notifier()->next(*this); 100 100 return *this; 101 101 } 102 102 103 103 typename MapTraits<Map>::ConstReturnValue operator*() const { 104 return (*map)[*this];104 return map[*this]; 105 105 } 106 106 107 107 typename MapTraits<Map>::ReturnValue operator*() { 108 return (*map)[*this];108 return map[*this]; 109 109 } 110 110 111 111 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; 117 117 118 118 }; … … 125 125 typedef typename Map::Value Value; 126 126 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); 133 133 } 134 134 … … 137 137 138 138 ConstMapIt& operator++() { 139 map ->notifier()->next(*this);139 map.notifier()->next(*this); 140 140 return *this; 141 141 } … … 146 146 147 147 protected: 148 const Map *map;148 const Map& map; 149 149 }; 150 150 … … 153 153 154 154 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); 162 162 } 163 163 164 164 ItemIt(const Map& _map, const Item& item) 165 : Parent(item), map( &_map) {}165 : Parent(item), map(_map) {} 166 166 167 167 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; 174 174 175 175 }; … … 232 232 typedef typename Map::Value Value; 233 233 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); 240 240 } 241 241 242 242 MapIt(const Map& _map, const Item& item) 243 : Parent(item), map( &_map) {}243 : Parent(item), map(_map) {} 244 244 245 245 MapIt& operator++() { 246 map ->graph.next(*this);246 map.graph.next(*this); 247 247 return *this; 248 248 } 249 249 250 250 typename MapTraits<Map>::ConstReturnValue operator*() const { 251 return (*map)[*this];251 return map[*this]; 252 252 } 253 253 254 254 typename MapTraits<Map>::ReturnValue operator*() { 255 return (*map)[*this];255 return map[*this]; 256 256 } 257 257 258 258 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; 264 264 265 265 }; … … 272 272 typedef typename Map::Value Value; 273 273 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); 280 280 } 281 281 282 282 ConstMapIt(const Map& _map, const Item& item) 283 : Parent(item), map( &_map) {}283 : Parent(item), map(_map) {} 284 284 285 285 ConstMapIt& operator++() { 286 map ->graph.next(*this);286 map.graph.next(*this); 287 287 return *this; 288 288 } 289 289 290 290 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; 296 296 }; 297 297 … … 300 300 301 301 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); 309 309 } 310 310 311 311 ItemIt(const Map& _map, const Item& item) 312 : Parent(item), map( &_map) {}312 : Parent(item), map(_map) {} 313 313 314 314 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; 321 321 322 322 }; -
lemon/unionfind.h
r800 r786 740 740 void clear() { 741 741 items.clear(); 742 classes.clear ();742 classes.clear; 743 743 firstClass = firstFreeClass = firstFreeItem = -1; 744 744 } -
test/CMakeLists.txt
r799 r770 35 35 min_mean_cycle_test 36 36 path_test 37 planarity_test38 37 preflow_test 39 38 radix_sort_test -
test/Makefile.am
r799 r793 37 37 test/min_mean_cycle_test \ 38 38 test/path_test \ 39 test/planarity_test \40 39 test/preflow_test \ 41 40 test/radix_sort_test \ … … 87 86 test_min_mean_cycle_test_SOURCES = test/min_mean_cycle_test.cc 88 87 test_path_test_SOURCES = test/path_test.cc 89 test_planarity_test_SOURCES = test/planarity_test.cc90 88 test_preflow_test_SOURCES = test/preflow_test.cc 91 89 test_radix_sort_test_SOURCES = test/radix_sort_test.cc
Note: See TracChangeset
for help on using the changeset viewer.