COIN-OR::LEMON - Graph Library

Changeset 2471:ed70b226cc48 in lemon-0.x for lemon/capacity_scaling.h


Ignore:
Timestamp:
09/14/07 00:06:54 (12 years ago)
Author:
Peter Kovacs
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3309
Message:

Small changes in min. cost flow algorithms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/capacity_scaling.h

    r2457 r2471  
    3131
    3232#define WITH_SCALING
     33
     34#ifdef WITH_SCALING
     35#define SCALING_FACTOR    2
     36#endif
    3337
    3438//#define _DEBUG_ITER_
     
    543547      }
    544548      if (max_dem < max_sup) max_sup = max_dem;
    545       for (delta = 1; 2 * delta < max_sup; delta *= 2) ;
     549      for ( delta = 1; SCALING_FACTOR * delta < max_sup;
     550            delta *= SCALING_FACTOR ) ;
    546551#endif
    547552      return true;
     
    560565      // Processing capacity scaling phases
    561566      ResNode s, t;
    562       for ( ; delta >= 1; delta = delta < 4 && delta > 1 ?
    563                                   1 : delta / 4 )
     567      for ( ; delta >= 1; delta = delta < SCALING_FACTOR && delta > 1 ?
     568                                  1 : delta / SCALING_FACTOR )
    564569      {
    565570        // Saturating edges not satisfying the optimality condition
Note: See TracChangeset for help on using the changeset viewer.