diff -r 1bb471764ab8 -r 216c6bd5c18c lemon/nagamochi_ibaraki.h --- a/lemon/nagamochi_ibaraki.h Tue Oct 30 20:21:10 2007 +0000 +++ b/lemon/nagamochi_ibaraki.h Tue Oct 30 20:44:53 2007 +0000 @@ -1374,10 +1374,11 @@ typename AuxGraph::template NodeMap edges(*_aux_graph, INVALID); for (typename Ufe::ClassIt c(ufe); c != INVALID; ++c) { if (ufe.size(c) == 1) continue; + Node cn = ufe.item(c); for (typename Ufe::ItemIt r(ufe, c); r != INVALID; ++r) { - if (static_cast(r) == static_cast(c)) continue; - _next->set((*_last)[c], (*_first)[r]); - _last->set(c, (*_last)[r]); + if (static_cast(r) == static_cast(cn)) continue; + _next->set((*_last)[cn], (*_first)[r]); + _last->set(cn, (*_last)[r]); remnodes.push_back(r); --_node_num; } @@ -1388,15 +1389,18 @@ for (typename AuxGraph::UEdgeIt e(*_aux_graph); e != INVALID; ++e) { - Node sn = ufe.find(_aux_graph->source(e)); - Node tn = ufe.find(_aux_graph->target(e)); - if ((ufe.size(sn) == 1 && ufe.size(tn) == 1)) { + int sc = ufe.find(_aux_graph->source(e)); + int tc = ufe.find(_aux_graph->target(e)); + if ((ufe.size(sc) == 1 && ufe.size(tc) == 1)) { continue; } - if (sn == tn) { + if (sc == tc) { remedges.push_back(e); continue; } + Node sn = ufe.item(sc); + Node tn = ufe.item(tc); + EdgeInfo info; if (sn < tn) { info.source = sn; @@ -1435,13 +1439,14 @@ for (typename Ufe::ClassIt c(ufe); c != INVALID; ++c) { if (ufe.size(c) == 1) continue; + Node cn = ufe.item(c); Value cutvalue = 0; - for (typename AuxGraph::IncEdgeIt e(*_aux_graph, c); + for (typename AuxGraph::IncEdgeIt e(*_aux_graph, cn); e != INVALID; ++e) { cutvalue += (*_aux_capacity)[e]; } - (*_aux_cut_value)[c] = cutvalue; + (*_aux_cut_value)[cn] = cutvalue; }