From 6e7747e5b85f4ca93683ed5166f6e480cc58e6fa Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Mon, 10 Feb 2014 09:33:54 +0000 Subject: Refactored the resources mechanics, implemented a few of the chromosome tests --- src/jcgp/ea/StandardMutator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jcgp/ea') diff --git a/src/jcgp/ea/StandardMutator.java b/src/jcgp/ea/StandardMutator.java index cab5c76..8af3f5c 100644 --- a/src/jcgp/ea/StandardMutator.java +++ b/src/jcgp/ea/StandardMutator.java @@ -1,7 +1,7 @@ package jcgp.ea; -import jcgp.CGP.Parameters; -import jcgp.CGP.Utilities; +import jcgp.Parameters; +import jcgp.Utilities; import jcgp.population.Chromosome; import jcgp.population.MutableElement; import jcgp.population.Node; @@ -11,7 +11,7 @@ public class StandardMutator implements Mutator { @Override public void mutate(Chromosome chromosome) { - int mutations = (int) (Parameters.getMutationRate() * ((double) Parameters.getNodeNumber() / 100)); + int mutations = (int) (Parameters.getMutationRate() * ((double) Parameters.getNodeCount() / 100)); for (int i = 0; i < mutations; i++) { MutableElement m = Utilities.getRandomMutable(chromosome); -- cgit v1.2.3