aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/modules/es
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2014-04-24 10:34:30 +0100
committerEduardo Pedroni <ep625@york.ac.uk>2014-04-24 10:34:30 +0100
commit9ac2848be66c39acdc291dc3b48b91178acc1a05 (patch)
treeec4c1805bbd45e3d59e2aa4a89605756c28914aa /src/jcgp/backend/modules/es
parent6769419bea279935c4a3a84616d45ee7d4a6345c (diff)
Refactored parsers and parameters, had to install e(fx)clipse to deploy application.
Diffstat (limited to 'src/jcgp/backend/modules/es')
-rw-r--r--src/jcgp/backend/modules/es/TournamentSelection.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jcgp/backend/modules/es/TournamentSelection.java b/src/jcgp/backend/modules/es/TournamentSelection.java
index 4070468..7cc9706 100644
--- a/src/jcgp/backend/modules/es/TournamentSelection.java
+++ b/src/jcgp/backend/modules/es/TournamentSelection.java
@@ -8,10 +8,10 @@ import jcgp.backend.resources.parameters.Parameter;
public class TournamentSelection implements EvolutionaryStrategy {
- private IntegerParameter tournament;
+ private IntegerParameter tournamentSize;
- public TournamentSelection() {
- tournament = new IntegerParameter(1, "Tournament size") {
+ public TournamentSelection(Resources resources) {
+ tournamentSize = new IntegerParameter(1, "Tournament size") {
@Override
public void validate(Number newValue) {
// TODO this
@@ -21,13 +21,13 @@ public class TournamentSelection implements EvolutionaryStrategy {
@Override
public Parameter<?>[] getLocalParameters() {
- return new Parameter[] {tournament};
+ return new Parameter[] {tournamentSize};
}
@Override
public void evolve(Population population, Mutator mutator,
Resources parameters) {
- tournament.set(tournament.get() + 1);
+ tournamentSize.set(tournamentSize.get() + 1);
// TODO implement this
}