lemon/cost_scaling.h
changeset 1100 6c8e2d8712d8
parent 877 141f9c0db4a3
child 932 773dd96ecdd8
equal deleted inserted replaced
13:c18b7e8e2d31 17:a0ab0152af65
   905       switch (method) {
   905       switch (method) {
   906         case PUSH:
   906         case PUSH:
   907           startPush();
   907           startPush();
   908           break;
   908           break;
   909         case AUGMENT:
   909         case AUGMENT:
   910           startAugment();
   910           startAugment(_res_node_num - 1);
   911           break;
   911           break;
   912         case PARTIAL_AUGMENT:
   912         case PARTIAL_AUGMENT:
   913           startAugment(MAX_PATH_LENGTH);
   913           startAugment(MAX_PATH_LENGTH);
   914           break;
   914           break;
   915       }
   915       }
  1082         }
  1082         }
  1083       }
  1083       }
  1084     }
  1084     }
  1085 
  1085 
  1086     /// Execute the algorithm performing augment and relabel operations
  1086     /// Execute the algorithm performing augment and relabel operations
  1087     void startAugment(int max_length = std::numeric_limits<int>::max()) {
  1087     void startAugment(int max_length) {
  1088       // Paramters for heuristics
  1088       // Paramters for heuristics
  1089       const int EARLY_TERM_EPSILON_LIMIT = 1000;
  1089       const int EARLY_TERM_EPSILON_LIMIT = 1000;
  1090       const double GLOBAL_UPDATE_FACTOR = 3.0;
  1090       const double GLOBAL_UPDATE_FACTOR = 3.0;
  1091 
  1091 
  1092       const int global_update_freq = int(GLOBAL_UPDATE_FACTOR *
  1092       const int global_update_freq = int(GLOBAL_UPDATE_FACTOR *