gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge bugfix in #417 to branch 1.2
0 1 0
merge 1.2
0 files changed with 2 insertions and 2 deletions:
↑ Collapse diff ↑
Ignore white space 16 line context
... ...
@@ -902,17 +902,17 @@
902 902
      _rank.resize(_res_node_num + 1);
903 903

	
904 904
      // Execute the algorithm
905 905
      switch (method) {
906 906
        case PUSH:
907 907
          startPush();
908 908
          break;
909 909
        case AUGMENT:
910
          startAugment();
910
          startAugment(_res_node_num - 1);
911 911
          break;
912 912
        case PARTIAL_AUGMENT:
913 913
          startAugment(MAX_PATH_LENGTH);
914 914
          break;
915 915
      }
916 916

	
917 917
      // Compute node potentials for the original costs
918 918
      _arc_vec.clear();
... ...
@@ -1079,17 +1079,17 @@
1079 1079
        if (k > 0) {
1080 1080
          _pi[u] -= _epsilon * k;
1081 1081
          _next_out[u] = _first_out[u];
1082 1082
        }
1083 1083
      }
1084 1084
    }
1085 1085

	
1086 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 1088
      // Paramters for heuristics
1089 1089
      const int EARLY_TERM_EPSILON_LIMIT = 1000;
1090 1090
      const double GLOBAL_UPDATE_FACTOR = 3.0;
1091 1091

	
1092 1092
      const int global_update_freq = int(GLOBAL_UPDATE_FACTOR *
1093 1093
        (_res_node_num + _sup_node_num * _sup_node_num));
1094 1094
      int next_update_limit = global_update_freq;
1095 1095

	
0 comments (0 inline)