Changeset 2386:81b47fc5c444 in lemon0.x for lemon/nagamochi_ibaraki.h
 Timestamp:
 03/02/07 19:04:28 (13 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@3217
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/nagamochi_ibaraki.h
r2376 r2386 439 439 /// automatically allocated map, of course. 440 440 /// \return <tt> (*this) </tt> 441 MaxCardinalitySearch &heap(Heap& h eap, HeapCrossRef &crossRef) {441 MaxCardinalitySearch &heap(Heap& hp, HeapCrossRef &cr) { 442 442 if(local_heap_cross_ref) { 443 443 delete _heap_cross_ref; 444 444 local_heap_cross_ref = false; 445 445 } 446 _heap_cross_ref = &cr ossRef;446 _heap_cross_ref = &cr; 447 447 if(local_heap) { 448 448 delete _heap; 449 449 local_heap = false; 450 450 } 451 _heap = &h eap;451 _heap = &hp; 452 452 return *this; 453 453 } … … 1169 1169 /// automatically allocated heap and cross reference, of course. 1170 1170 /// \return <tt> (*this) </tt> 1171 NagamochiIbaraki &heap(Heap& h eap, HeapCrossRef &crossRef)1171 NagamochiIbaraki &heap(Heap& hp, HeapCrossRef &cr) 1172 1172 { 1173 1173 if (local_heap_cross_ref) { … … 1175 1175 local_heap_cross_ref=false; 1176 1176 } 1177 _heap_cross_ref = &cr ossRef;1177 _heap_cross_ref = &cr; 1178 1178 if (local_heap) { 1179 1179 delete _heap; 1180 1180 local_heap=false; 1181 1181 } 1182 _heap = &h eap;1182 _heap = &hp; 1183 1183 return *this; 1184 1184 } … … 1319 1319 } 1320 1320 1321 if ( (int)nodes.size() < _node_num) {1321 if (int(nodes.size()) < _node_num) { 1322 1322 _aux_graph>clear(); 1323 1323 _node_num = 1; 1324 1324 _cut.clear(); 1325 for (int i = 0; i < (int)nodes.size(); ++i) {1325 for (int i = 0; i < int(nodes.size()); ++i) { 1326 1326 typename Graph::Node n = (*_first)[nodes[i]]; 1327 1327 while (n != INVALID) { … … 1361 1361 } 1362 1362 1363 if (ufe.size((typename Ufe::ClassIt)(ufe)) == _node_num) { 1363 typedef typename Ufe::ClassIt UfeCIt; 1364 if (ufe.size(UfeCIt(ufe)) == _node_num) { 1364 1365 _aux_graph>clear(); 1365 1366 _node_num = 1; … … 1373 1374 if (ufe.size(c) == 1) continue; 1374 1375 for (typename Ufe::ItemIt r(ufe, c); r != INVALID; ++r) { 1375 if ( (Node)r == (Node)c) continue;1376 if (static_cast<Node>(r) == static_cast<Node>(c)) continue; 1376 1377 _next>set((*_last)[c], (*_first)[r]); 1377 1378 _last>set(c, (*_last)[r]); … … 1408 1409 } 1409 1410 1410 for (int i = 0; i < (int)remedges.size(); ++i) {1411 for (int i = 0; i < int(remedges.size()); ++i) { 1411 1412 _aux_graph>erase(remedges[i]); 1412 1413 } … … 1416 1417 { 1417 1418 int i = 0; 1418 while (i < (int)addedges.size()) {1419 while (i < int(addedges.size())) { 1419 1420 Node sn = addedges[i].source; 1420 1421 Node tn = addedges[i].target; 1421 1422 Value ec = addedges[i].capacity; 1422 1423 ++i; 1423 while (i < (int)addedges.size() &&1424 while (i < int(addedges.size()) && 1424 1425 sn == addedges[i].source && tn == addedges[i].target) { 1425 1426 ec += addedges[i].capacity; … … 1443 1444 } 1444 1445 1445 for (int i = 0; i < (int)remnodes.size(); ++i) {1446 for (int i = 0; i < int(remnodes.size()); ++i) { 1446 1447 _aux_graph>erase(remnodes[i]); 1447 1448 } … … 1501 1502 template <typename NodeMap> 1502 1503 Value quickMinCut(NodeMap& nodeMap) const { 1503 for (int i = 0; i < (int)_cut.size(); ++i) {1504 for (int i = 0; i < int(_cut.size()); ++i) { 1504 1505 nodeMap.set(_cut[i], true); 1505 1506 }
Note: See TracChangeset
for help on using the changeset viewer.