refactor UF_random_generator to fit the new std::shuffle

This commit is contained in:
Johann Dreo 2022-01-23 18:17:48 +01:00
commit 4ee48e760b
7 changed files with 39 additions and 29 deletions

View file

@ -43,7 +43,7 @@ int main()
unsigned i;
// a chromosome randomizer
eoInitPermutation <Chrom> random(CHROM_SIZE);
eoInitPermutation <Chrom> randomize(CHROM_SIZE);
// the population:
eoPop<Chrom> pop;
@ -55,7 +55,7 @@ int main()
{
Chrom chrom(CHROM_SIZE);
std::cout << " Initial chromosome n°" << i << " : " << chrom << "..." << std::endl;
random(chrom);
randomize(chrom);
eval(chrom);
std::cout << " ... becomes : " << chrom << " after initialization" << std::endl;
check_permutation(chrom);