# HG changeset patch # User Peter Kovacs # Date 1300215251 -3600 # Node ID a07b6b27fe6938c9883dd542f0791417e6e6258c # Parent 1226290a9b7df56828f2feb33f36a8f94e6ee548 Change the default scaling factor in CostScaling (#417) diff -r 1226290a9b7d -r a07b6b27fe69 lemon/cost_scaling.h --- a/lemon/cost_scaling.h Tue Mar 15 19:52:31 2011 +0100 +++ b/lemon/cost_scaling.h Tue Mar 15 19:54:11 2011 +0100 @@ -487,7 +487,7 @@ /// /// \param method The internal method that will be used in the /// algorithm. For more information, see \ref Method. - /// \param factor The cost scaling factor. It must be larger than one. + /// \param factor The cost scaling factor. It must be at least two. /// /// \return \c INFEASIBLE if no feasible flow exists, /// \n \c OPTIMAL if the problem has optimal solution @@ -501,7 +501,8 @@ /// /// \see ProblemType, Method /// \see resetParams(), reset() - ProblemType run(Method method = PARTIAL_AUGMENT, int factor = 8) { + ProblemType run(Method method = PARTIAL_AUGMENT, int factor = 16) { + LEMON_ASSERT(factor >= 2, "The scaling factor must be at least 2"); _alpha = factor; ProblemType pt = init(); if (pt != OPTIMAL) return pt;