Changeset 2506:216c6bd5c18c in lemon-0.x
- Timestamp:
- 10/30/07 21:44:53 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3352
- Location:
- lemon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/nagamochi_ibaraki.h
r2391 r2506 1375 1375 for (typename Ufe::ClassIt c(ufe); c != INVALID; ++c) { 1376 1376 if (ufe.size(c) == 1) continue; 1377 Node cn = ufe.item(c); 1377 1378 for (typename Ufe::ItemIt r(ufe, c); r != INVALID; ++r) { 1378 if (static_cast<Node>(r) == static_cast<Node>(c )) continue;1379 _next->set((*_last)[c ], (*_first)[r]);1380 _last->set(c , (*_last)[r]);1379 if (static_cast<Node>(r) == static_cast<Node>(cn)) continue; 1380 _next->set((*_last)[cn], (*_first)[r]); 1381 _last->set(cn, (*_last)[r]); 1381 1382 remnodes.push_back(r); 1382 1383 --_node_num; … … 1389 1390 for (typename AuxGraph::UEdgeIt e(*_aux_graph); 1390 1391 e != INVALID; ++e) { 1391 Node sn= ufe.find(_aux_graph->source(e));1392 Node tn= ufe.find(_aux_graph->target(e));1393 if ((ufe.size(s n) == 1 && ufe.size(tn) == 1)) {1392 int sc = ufe.find(_aux_graph->source(e)); 1393 int tc = ufe.find(_aux_graph->target(e)); 1394 if ((ufe.size(sc) == 1 && ufe.size(tc) == 1)) { 1394 1395 continue; 1395 1396 } 1396 if (s n == tn) {1397 if (sc == tc) { 1397 1398 remedges.push_back(e); 1398 1399 continue; 1399 1400 } 1401 Node sn = ufe.item(sc); 1402 Node tn = ufe.item(tc); 1403 1400 1404 EdgeInfo info; 1401 1405 if (sn < tn) { … … 1436 1440 for (typename Ufe::ClassIt c(ufe); c != INVALID; ++c) { 1437 1441 if (ufe.size(c) == 1) continue; 1442 Node cn = ufe.item(c); 1438 1443 Value cutvalue = 0; 1439 for (typename AuxGraph::IncEdgeIt e(*_aux_graph, c );1444 for (typename AuxGraph::IncEdgeIt e(*_aux_graph, cn); 1440 1445 e != INVALID; ++e) { 1441 1446 cutvalue += (*_aux_capacity)[e]; 1442 1447 } 1443 1448 1444 (*_aux_cut_value)[c ] = cutvalue;1449 (*_aux_cut_value)[cn] = cutvalue; 1445 1450 1446 1451 } -
lemon/unionfind.h
r2505 r2506 475 475 } 476 476 477 } 477 } 478 479 /// \brief Gives back a representant item of the component. 480 /// 481 /// Gives back a representant item of the component. 482 Item item(int cls) const { 483 return items[classes[cls].firstItem].item; 484 } 478 485 479 486 /// \brief Removes the component of the given element from the structure. … … 733 740 return items[index[item]].cls; 734 741 } 742 743 /// \brief Gives back a representant item of the component. 744 /// 745 /// Gives back a representant item of the component. 746 Item item(int cls) const { 747 return items[classes[cls].firstItem].item; 748 } 735 749 736 750 /// \brief Removes the given element from the structure.
Note: See TracChangeset
for help on using the changeset viewer.