lemon/ssp_min_cost_flow.h
changeset 2416 261b4701405d
parent 2396 658c04d74729
child 2418 89cbf0a2ed57
equal deleted inserted replaced
4:727eaa72a5bd 5:38475601f03f
   186       if (flowValue()>k) reset();
   186       if (flowValue()>k) reset();
   187       while (flowValue()<k && augment()) { }
   187       while (flowValue()<k && augment()) { }
   188       return flowValue();
   188       return flowValue();
   189     }
   189     }
   190 
   190 
   191     /// \brief The class is reset to zero flow and potential. The
   191     /// \brief The class is reset to zero flow and potential.
   192     /// class is reset to zero flow and potential.
       
   193     void reset() {
   192     void reset() {
   194       total_length=0;
   193       total_length=0;
   195       for (typename Graph::EdgeIt e(g); e!=INVALID; ++e) flow.set(e, 0);
   194       for (typename Graph::EdgeIt e(g); e!=INVALID; ++e) flow.set(e, 0);
   196       for (typename Graph::NodeIt n(g); n!=INVALID; ++n) potential.set(n, 0);  
   195       for (typename Graph::NodeIt n(g); n!=INVALID; ++n) potential.set(n, 0);  
   197     }
   196     }