# HG changeset patch # User Peter Kovacs # Date 1253872714 -7200 # Node ID be48a648d28f52cb4e1aa8a5a8ba302d989eed10 # Parent 6d5f547e5bfb8131568ad50ea406129a056ac9ed Small improvements for NetworkSimplex (#298) diff -r 6d5f547e5bfb -r be48a648d28f lemon/network_simplex.h --- a/lemon/network_simplex.h Mon Aug 31 20:27:38 2009 +0200 +++ b/lemon/network_simplex.h Fri Sep 25 11:58:34 2009 +0200 @@ -161,8 +161,6 @@ TEMPLATE_DIGRAPH_TYPEDEFS(GR); - typedef std::vector ArcVector; - typedef std::vector NodeVector; typedef std::vector IntVector; typedef std::vector BoolVector; typedef std::vector ValueVector; @@ -685,17 +683,8 @@ if ((i += k) >= _arc_num) i = (i % k) + 1; } - // Initialize maps - for (int i = 0; i != _node_num; ++i) { - _supply[i] = 0; - } - for (int i = 0; i != _arc_num; ++i) { - _lower[i] = 0; - _upper[i] = INF; - _cost[i] = 1; - } - _have_lower = false; - _stype = GEQ; + // Reset parameters + reset(); } /// \name Parameters @@ -768,7 +757,6 @@ /// This function sets the supply values of the nodes. /// If neither this function nor \ref stSupply() is used before /// calling \ref run(), the supply of each node will be set to zero. - /// (It makes sense only if non-zero lower bounds are given.) /// /// \param map A node map storing the supply values. /// Its \c Value type must be convertible to the \c Value type @@ -789,7 +777,6 @@ /// and the required flow value. /// If neither this function nor \ref supplyMap() is used before /// calling \ref run(), the supply of each node will be set to zero. - /// (It makes sense only if non-zero lower bounds are given.) /// /// Using this function has the same effect as using \ref supplyMap() /// with such a map in which \c k is assigned to \c s, \c -k is