From 9ac2848be66c39acdc291dc3b48b91178acc1a05 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Thu, 24 Apr 2014 10:34:30 +0100 Subject: Refactored parsers and parameters, had to install e(fx)clipse to deploy application. --- src/jcgp/backend/modules/es/TournamentSelection.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/jcgp/backend/modules/es') 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 } -- cgit v1.2.3