Skip to content

Commit 0e6e8c0

Browse files
committed
Rename population variable
1 parent 5af3626 commit 0e6e8c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

framework/colouring/graph_colouring.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ namespace graph_colouring {
227227
assert(0);
228228
}
229229

230-
std::vector<Colouring> P(strategies.size() * populationSize);
230+
std::vector<Colouring> population(strategies.size() * populationSize);
231231
//lock[i] = true -> i-th individual is free for mating
232232
std::vector<std::atomic<bool>> lock(strategies.size() * populationSize);
233233
std::vector<ColouringStrategyContext> context(strategies.size());
@@ -254,7 +254,7 @@ namespace graph_colouring {
254254
std::ref(context),
255255
std::ref(workQueue),
256256
std::ref(masterQueue),
257-
std::ref(P),
257+
std::ref(population),
258258
std::ref(lock),
259259
std::ref(target_k),
260260
std::ref(terminated));
@@ -310,11 +310,11 @@ namespace graph_colouring {
310310
auto best = strategyId;
311311
for (int i = 0; i < populationSize; i++) {
312312
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])) {
314314
best = nextTry;
315315
}
316316
}
317-
bestResults[strategyId] = {P[best], nullptr};
317+
bestResults[strategyId] = {population[best], nullptr};
318318
}
319319
return bestResults;
320320
}

0 commit comments

Comments
 (0)