From a02f1fff03ab58416da812597e67a0c7e21fdbd5 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Fri, 31 Jan 2014 13:06:54 +0000 Subject: Created most of the classes that will be necessary, content is blank for now. --- src/jcgp/fitness/FitnessFunction.java | 9 +++++++++ src/jcgp/fitness/TestFitFunction.java | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/jcgp/fitness/FitnessFunction.java create mode 100644 src/jcgp/fitness/TestFitFunction.java (limited to 'src/jcgp/fitness') diff --git a/src/jcgp/fitness/FitnessFunction.java b/src/jcgp/fitness/FitnessFunction.java new file mode 100644 index 0000000..2155542 --- /dev/null +++ b/src/jcgp/fitness/FitnessFunction.java @@ -0,0 +1,9 @@ +package jcgp.fitness; + +import jcgp.population.Population; + +public interface FitnessFunction { + + public void evaluatePopulation(Population population); + +} diff --git a/src/jcgp/fitness/TestFitFunction.java b/src/jcgp/fitness/TestFitFunction.java new file mode 100644 index 0000000..fea9f2d --- /dev/null +++ b/src/jcgp/fitness/TestFitFunction.java @@ -0,0 +1,15 @@ +package jcgp.fitness; + +import jcgp.population.Chromosome; +import jcgp.population.Population; + +public class TestFitFunction implements FitnessFunction { + + @Override + public void evaluatePopulation(Population population) { + + for (Chromosome c : population) { + c.setFitness(1); + } + } +} -- cgit v1.2.3