Change the default scaling factor in CostScaling (#417)
authorPeter Kovacs <kpeter@inf.elte.hu>
Tue, 15 Mar 2011 19:54:11 +0100 (2011-03-15)
changeset 938a07b6b27fe69
parent 937 1226290a9b7d
child 939 78b9fb1f4454
Change the default scaling factor in CostScaling (#417)
lemon/cost_scaling.h
     1.1 --- a/lemon/cost_scaling.h	Tue Mar 15 19:52:31 2011 +0100
     1.2 +++ b/lemon/cost_scaling.h	Tue Mar 15 19:54:11 2011 +0100
     1.3 @@ -487,7 +487,7 @@
     1.4      ///
     1.5      /// \param method The internal method that will be used in the
     1.6      /// algorithm. For more information, see \ref Method.
     1.7 -    /// \param factor The cost scaling factor. It must be larger than one.
     1.8 +    /// \param factor The cost scaling factor. It must be at least two.
     1.9      ///
    1.10      /// \return \c INFEASIBLE if no feasible flow exists,
    1.11      /// \n \c OPTIMAL if the problem has optimal solution
    1.12 @@ -501,7 +501,8 @@
    1.13      ///
    1.14      /// \see ProblemType, Method
    1.15      /// \see resetParams(), reset()
    1.16 -    ProblemType run(Method method = PARTIAL_AUGMENT, int factor = 8) {
    1.17 +    ProblemType run(Method method = PARTIAL_AUGMENT, int factor = 16) {
    1.18 +      LEMON_ASSERT(factor >= 2, "The scaling factor must be at least 2");
    1.19        _alpha = factor;
    1.20        ProblemType pt = init();
    1.21        if (pt != OPTIMAL) return pt;