138 ///calling \ref setSource, \ref setTarget, \ref setCap and \ref |
138 ///calling \ref setSource, \ref setTarget, \ref setCap and \ref |
139 ///setFlow, resp. |
139 ///setFlow, resp. |
140 Preflow(const Graph& _G, Node _s, Node _t, |
140 Preflow(const Graph& _G, Node _s, Node _t, |
141 const CapMap& _capacity, FlowMap& _flow) : |
141 const CapMap& _capacity, FlowMap& _flow) : |
142 g(&_G), s(_s), t(_t), capacity(&_capacity), |
142 g(&_G), s(_s), t(_t), capacity(&_capacity), |
143 flow(&_flow), n(_G.nodeNum()), level(_G), excess(_G,0), |
143 flow(&_flow), n(countNodes(_G)), level(_G), excess(_G,0), |
144 flow_prop(NO_FLOW), status(AFTER_NOTHING) { } |
144 flow_prop(NO_FLOW), status(AFTER_NOTHING) { } |
145 |
145 |
146 |
146 |
147 |
147 |
148 ///Runs the preflow algorithm. |
148 ///Runs the preflow algorithm. |