src/test/preflow_test.cc
changeset 1161 1c9658d51c8d
parent 959 c80ef5912903
child 1164 80bb73097736
equal deleted inserted replaced
11:89ad4dc9e59e 12:192d0d761a81
    65 int cut_value ( SmartGraph& g, SmartGraph::NodeMap<bool>& cut, 
    65 int cut_value ( SmartGraph& g, SmartGraph::NodeMap<bool>& cut, 
    66 		SmartGraph::EdgeMap<int>& cap) {
    66 		SmartGraph::EdgeMap<int>& cap) {
    67   
    67   
    68   int c=0;
    68   int c=0;
    69   for(SmartGraph::EdgeIt e(g); e!=INVALID; ++e) {
    69   for(SmartGraph::EdgeIt e(g); e!=INVALID; ++e) {
    70     if (cut[g.tail(e)] && !cut[g.head(e)]) c+=cap[e];
    70     if (cut[g.source(e)] && !cut[g.target(e)]) c+=cap[e];
    71   }
    71   }
    72   return c;
    72   return c;
    73 }
    73 }
    74 
    74 
    75 int main() {
    75 int main() {