lemon/preflow.h
changeset 2103 a979fcdda073
parent 2024 4ab8a25def3c
child 2151 38ec4a930c05
equal deleted inserted replaced
13:e6e52aef1ce7 14:b5fbab4bc0a3
   157     ///\param _f The flow of the edges. 
   157     ///\param _f The flow of the edges. 
   158     ///\param tol Tolerance class.
   158     ///\param tol Tolerance class.
   159     ///Except the graph, all of these parameters can be reset by
   159     ///Except the graph, all of these parameters can be reset by
   160     ///calling \ref source, \ref target, \ref capacityMap and \ref
   160     ///calling \ref source, \ref target, \ref capacityMap and \ref
   161     ///flowMap, resp.
   161     ///flowMap, resp.
   162       Preflow(const Graph& _gr, Node _s, Node _t, 
   162     Preflow(const Graph& _gr, Node _s, Node _t, 
   163 	      const CapacityMap& _cap, FlowMap& _f,
   163             const CapacityMap& _cap, FlowMap& _f,
   164 	      const Tolerance &_sr=Tolerance()) :
   164             const Tolerance &_sr=Tolerance()) :
   165 	_g(&_gr), _source(_s), _target(_t), _capacity(&_cap),
   165 	_g(&_gr), _source(_s), _target(_t), _capacity(&_cap),
   166 	_flow(&_f), _surely(_sr),
   166 	_flow(&_f), _surely(_sr),
   167 	_node_num(countNodes(_gr)), level(_gr), excess(_gr,0), 
   167 	_node_num(countNodes(_gr)), level(_gr), excess(_gr,0), 
   168 	flow_prop(NO_FLOW), status(AFTER_NOTHING) { 
   168 	flow_prop(NO_FLOW), status(AFTER_NOTHING) { 
   169 	if ( _source==_target )
   169 	if ( _source==_target )
   170 	  throw InvalidArgument();
   170 	  throw InvalidArgument();
   171       }
   171     }
   172     
   172     
   173     ///Give a reference to the tolerance handler class
   173     ///Give a reference to the tolerance handler class
   174 
   174 
   175     ///Give a reference to the tolerance handler class
   175     ///Give a reference to the tolerance handler class
   176     ///\sa Tolerance
   176     ///\sa Tolerance