@@ -37,20 +37,19 @@ object EngineParameters {
37
37
val nrep = ops.reproducers map (_.nchildren) reduceLeft (_ + _)
38
38
require(nrep <= popsize)
39
39
val operators = if (nrep == popsize) ops
40
- else new OperatorSet (ops.fitnessFunction, ops.mpf,
41
- ops.reproducers ++ List (new CreateRandom (gtparams, popsize - nrep)),
42
- ops.modifiers)
40
+ else OperatorSet (ops.fitnessFunction, ops.mpf,
41
+ ops.reproducers ++ List (new CreateRandom (gtparams, popsize - nrep)) ++ ops.modifiers)
43
42
44
43
new EngineParameters (popsize, gtparams, maxNrGenerations, goodEnoughFitness, consts, operators, constgen, constantMutationProbability, nConstants)
45
44
}
46
45
}
47
46
48
- class EngineParameters (val popsize : Int ,
49
- val gtparams : GenotypeParameters ,
50
- val maxNrGenerations : Int ,
51
- val goodEnoughFitness : Double ,
52
- val constants : HashMap [Class [_], AlphabetRW [Const ]],
53
- val operators : OperatorSet ,
54
- val constgen : Map [Class [_], () => Any ],
55
- val constantMutationProbability : Double ,
56
- val nConstants : Int )
47
+ class EngineParameters private (val popsize : Int ,
48
+ val gtparams : GenotypeParameters ,
49
+ val maxNrGenerations : Int ,
50
+ val goodEnoughFitness : Double ,
51
+ val constants : HashMap [Class [_], AlphabetRW [Const ]],
52
+ val operators : OperatorSet ,
53
+ val constgen : Map [Class [_], () => Any ],
54
+ val constantMutationProbability : Double ,
55
+ val nConstants : Int )
0 commit comments