File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ namespace graph_colouring {
227
227
assert (0 );
228
228
}
229
229
230
- std::vector<Colouring> P (strategies.size () * populationSize);
230
+ std::vector<Colouring> population (strategies.size () * populationSize);
231
231
// lock[i] = true -> i-th individual is free for mating
232
232
std::vector<std::atomic<bool >> lock (strategies.size () * populationSize);
233
233
std::vector<ColouringStrategyContext> context (strategies.size ());
@@ -254,7 +254,7 @@ namespace graph_colouring {
254
254
std::ref (context),
255
255
std::ref (workQueue),
256
256
std::ref (masterQueue),
257
- std::ref (P ),
257
+ std::ref (population ),
258
258
std::ref (lock),
259
259
std::ref (target_k),
260
260
std::ref (terminated));
@@ -310,11 +310,11 @@ namespace graph_colouring {
310
310
auto best = strategyId;
311
311
for (int i = 0 ; i < populationSize; i++) {
312
312
auto nextTry = strategyId * populationSize + i;
313
- if (strategies[strategyId]->compare (G, P [best], P [nextTry])) {
313
+ if (strategies[strategyId]->compare (G, population [best], population [nextTry])) {
314
314
best = nextTry;
315
315
}
316
316
}
317
- bestResults[strategyId] = {P [best], nullptr };
317
+ bestResults[strategyId] = {population [best], nullptr };
318
318
}
319
319
return bestResults;
320
320
}
You can’t perform that action at this time.
0 commit comments