From 4c8de2402f2878cde7587c7f3bbf4ffaea86efd4 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sat, 26 Apr 2014 19:56:24 +0100 Subject: Moved files around to different folders, and commented some more packages. Aiming to have the entire backend fully commented by the end of today --- src/jcgp/backend/modules/mutator/ProbabilisticMutator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/jcgp/backend/modules/mutator') diff --git a/src/jcgp/backend/modules/mutator/ProbabilisticMutator.java b/src/jcgp/backend/modules/mutator/ProbabilisticMutator.java index e3c1d03..cacb451 100644 --- a/src/jcgp/backend/modules/mutator/ProbabilisticMutator.java +++ b/src/jcgp/backend/modules/mutator/ProbabilisticMutator.java @@ -70,7 +70,7 @@ public class ProbabilisticMutator implements Mutator { for (int c = 0; c < resources.columns(); c++) { // go through all connections for (int a = 0; a < resources.arity(); a++) { - if (mutate()) { + if (mutateGene()) { Node n = chromosome.getNode(r, c); if (report.get()) resources.report("[Mutator] Mutating " + n + @@ -83,7 +83,7 @@ public class ProbabilisticMutator implements Mutator { } } // deal with node function next - if (mutate()) { + if (mutateGene()) { Node n = chromosome.getNode(r, c); if (report.get()) resources.report("[Mutator] Mutating " + n + ", changed function from " + n.getFunction()); @@ -96,7 +96,7 @@ public class ProbabilisticMutator implements Mutator { } // finally, mutate outputs for (int o = 0; o < resources.outputs(); o++) { - if (mutate()) { + if (mutateGene()) { Output out = chromosome.getOutput(o); if (report.get()) resources.report("[Mutator] Mutating " + out + @@ -120,7 +120,7 @@ public class ProbabilisticMutator implements Mutator { * * @return true if a mutation should be performed, false if otherwise. */ - private boolean mutate() { + private boolean mutateGene() { return resources.getRandomDouble(100) < mutationProbability.get(); } -- cgit v1.2.3