@@ -29,7 +29,7 @@ public final class JavaJenetics {
29
29
30
30
private final int geneCount ;
31
31
32
- private final int chromosomeCount ;
32
+ private final int populationSize ;
33
33
34
34
private final int generationCount ;
35
35
@@ -45,13 +45,13 @@ public final class JavaJenetics {
45
45
//
46
46
47
47
public JavaJenetics (
48
- int geneMinValue , int geneMaxValue , int geneCount , int chromosomeCount ,
48
+ int geneMinValue , int geneMaxValue , int geneCount , int populationSize ,
49
49
int generationCount , int threadCount , int randomSeed
50
50
) {
51
51
this .geneMinValue = geneMinValue ;
52
52
this .geneMaxValue = geneMaxValue ;
53
53
this .geneCount = geneCount ;
54
- this .chromosomeCount = chromosomeCount ;
54
+ this .populationSize = populationSize ;
55
55
this .generationCount = generationCount ;
56
56
this .randomSeed = randomSeed ;
57
57
this .threadCount = threadCount ;
@@ -82,9 +82,9 @@ private Chromosome<DoubleGene> evolveChromosome() {
82
82
//
83
83
final long seed = initialSeed .getAndIncrement ();
84
84
85
- final Random chromosomeRandom = new Random (seed );
85
+ final Random genotypeRandom = new Random (seed );
86
86
Genotype <DoubleGene > genotype = Genotype .of (DoubleChromosome .of (geneMinValue , geneMaxValue , geneCount ));
87
- Factory <Genotype <DoubleGene >> factory = () -> RandomRegistry .with (chromosomeRandom , r -> genotype .newInstance ());
87
+ Factory <Genotype <DoubleGene >> factory = () -> RandomRegistry .with (genotypeRandom , r -> genotype .newInstance ());
88
88
89
89
final Random altererRandom = new Random (seed + 15 );
90
90
Alterer <DoubleGene , Double > singlePointCrossover = new SinglePointCrossover <DoubleGene , Double >(0.2 );
@@ -110,7 +110,7 @@ private Chromosome<DoubleGene> evolveChromosome() {
110
110
.alterers (alterer )
111
111
.offspringSelector (offSpringSelector )
112
112
.survivorsSelector (survivorsSelector )
113
- .populationSize (chromosomeCount )
113
+ .populationSize (populationSize )
114
114
.build ();
115
115
116
116
final Genotype <DoubleGene > result = engine .stream ()
0 commit comments