lemon/nagamochi_ibaraki.h
changeset 2622 fa2877651022
parent 2553 bfced05fa852
equal deleted inserted replaced
7:2ee4200dbff2 8:6ea35ab52fc8
  1319           }
  1319           }
  1320         }
  1320         }
  1321       }
  1321       }
  1322 
  1322 
  1323       if (int(nodes.size()) < _node_num) {
  1323       if (int(nodes.size()) < _node_num) {
  1324         _aux_graph->clear();
       
  1325         _node_num = 1;
       
  1326         _cut.clear();
  1324         _cut.clear();
  1327         for (int i = 0; i < int(nodes.size()); ++i) {
  1325         for (int i = 0; i < int(nodes.size()); ++i) {
  1328           typename Graph::Node n = (*_first)[nodes[i]];
  1326           typename Graph::Node n = (*_first)[nodes[i]];
  1329           while (n != INVALID) {
  1327           while (n != INVALID) {
  1330             _cut.push_back(n);
  1328             _cut.push_back(n);
  1331             n = (*_next)[n];
  1329             n = (*_next)[n];
  1332           }
  1330           }
  1333         }
  1331         }
       
  1332 	_aux_graph->clear();
       
  1333         _node_num = 1;
  1334         _min_cut = 0;
  1334         _min_cut = 0;
  1335         return true;
  1335         return true;
  1336       }
  1336       }
  1337 
  1337 
  1338       if (emc < _min_cut) {
  1338       if (emc < _min_cut) {