yul-phaser: Switch from uint32_t to size_t in SimulationRNG

- Also pass the appriopriate type internally to the distribution instead of relying on the default (which is uint32_t)
This commit is contained in:
Kamil Śliwak
2020-06-04 17:19:42 +02:00
parent 9b3d1c11ff
commit 8f55ead48d
3 changed files with 21 additions and 12 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ Population ClassicGeneticAlgorithm::select(Population _population, size_t _selec
vector<Individual> selectedIndividuals;
for (size_t i = 0; i < _selectionSize; ++i)
{
uint32_t ball = SimulationRNG::uniformInt(0, rouletteRange - 1);
size_t ball = SimulationRNG::uniformInt(0, rouletteRange - 1);
size_t cumulativeFitness = 0;
for (auto const& individual: _population.individuals())