... | ... |
@@ -906,17 +906,17 @@ |
906 | 906 |
_rank.resize(_res_node_num + 1); |
907 | 907 |
|
908 | 908 |
// Execute the algorithm |
909 | 909 |
switch (method) { |
910 | 910 |
case PUSH: |
911 | 911 |
startPush(); |
912 | 912 |
break; |
913 | 913 |
case AUGMENT: |
914 |
startAugment(); |
|
914 |
startAugment(_res_node_num - 1); |
|
915 | 915 |
break; |
916 | 916 |
case PARTIAL_AUGMENT: |
917 | 917 |
startAugment(MAX_PATH_LENGTH); |
918 | 918 |
break; |
919 | 919 |
} |
920 | 920 |
|
921 | 921 |
// Compute node potentials for the original costs |
922 | 922 |
_arc_vec.clear(); |
... | ... |
@@ -1083,17 +1083,17 @@ |
1083 | 1083 |
if (k > 0) { |
1084 | 1084 |
_pi[u] -= _epsilon * k; |
1085 | 1085 |
_next_out[u] = _first_out[u]; |
1086 | 1086 |
} |
1087 | 1087 |
} |
1088 | 1088 |
} |
1089 | 1089 |
|
1090 | 1090 |
/// Execute the algorithm performing augment and relabel operations |
1091 |
void startAugment(int max_length |
|
1091 |
void startAugment(int max_length) { |
|
1092 | 1092 |
// Paramters for heuristics |
1093 | 1093 |
const int EARLY_TERM_EPSILON_LIMIT = 1000; |
1094 | 1094 |
const double GLOBAL_UPDATE_FACTOR = 3.0; |
1095 | 1095 |
|
1096 | 1096 |
const int global_update_freq = int(GLOBAL_UPDATE_FACTOR * |
1097 | 1097 |
(_res_node_num + _sup_node_num * _sup_node_num)); |
1098 | 1098 |
int next_update_limit = global_update_freq; |
1099 | 1099 |
|
0 comments (0 inline)