# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1252683471 -7200
# Node ID 64ba4ed661591e45b73eb26db1dd98dddb34b2c8
# Parent 6d5f547e5bfb8131568ad50ea406129a056ac9ed
Small improvements for NetworkSimplex (#298)
diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h
a
|
b
|
|
768 | 768 | /// This function sets the supply values of the nodes. |
769 | 769 | /// If neither this function nor \ref stSupply() is used before |
770 | 770 | /// calling \ref run(), the supply of each node will be set to zero. |
771 | | /// (It makes sense only if non-zero lower bounds are given.) |
772 | 771 | /// |
773 | 772 | /// \param map A node map storing the supply values. |
774 | 773 | /// Its \c Value type must be convertible to the \c Value type |
… |
… |
|
789 | 788 | /// and the required flow value. |
790 | 789 | /// If neither this function nor \ref supplyMap() is used before |
791 | 790 | /// calling \ref run(), the supply of each node will be set to zero. |
792 | | /// (It makes sense only if non-zero lower bounds are given.) |
793 | 791 | /// |
794 | 792 | /// Using this function has the same effect as using \ref supplyMap() |
795 | 793 | /// with such a map in which \c k is assigned to \c s, \c -k is |
… |
… |
|
944 | 942 | Number c = 0; |
945 | 943 | for (ArcIt a(_graph); a != INVALID; ++a) { |
946 | 944 | int i = _arc_id[a]; |
947 | | c += Number(_flow[i]) * Number(_cost[i]); |
| 945 | c += static_cast<Number>(_flow[i]) * static_cast<Number>(_cost[i]); |
948 | 946 | } |
949 | 947 | return c; |
950 | 948 | } |