diff options
Diffstat (limited to 'src/jcgp/backend')
-rw-r--r-- | src/jcgp/backend/function/FunctionSet.java | 10 | ||||
-rw-r--r-- | src/jcgp/backend/function/SymbolicRegressionFunctions.java | 2 | ||||
-rw-r--r-- | src/jcgp/backend/parsers/ChromosomeParser.java | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/jcgp/backend/function/FunctionSet.java b/src/jcgp/backend/function/FunctionSet.java index 052183a..abc9eb4 100644 --- a/src/jcgp/backend/function/FunctionSet.java +++ b/src/jcgp/backend/function/FunctionSet.java @@ -69,16 +69,16 @@ public abstract class FunctionSet { /** * Computes and returns the maximum arity out of - * all the function, enabled or disabled. + * all enabled functions. * - * @return + * @return the problem's current maximum arity. */ public int getMaxArity(){ int arity = 0; - for (Function function : functionList) { + for (Integer function : allowedFunctions) { // if a higher arity is found, store it - if (function.getArity() > arity) { - arity = function.getArity(); + if (functionList.get(function).getArity() > arity) { + arity = functionList.get(function).getArity(); } } return arity; diff --git a/src/jcgp/backend/function/SymbolicRegressionFunctions.java b/src/jcgp/backend/function/SymbolicRegressionFunctions.java index 6f72723..9c6a3b1 100644 --- a/src/jcgp/backend/function/SymbolicRegressionFunctions.java +++ b/src/jcgp/backend/function/SymbolicRegressionFunctions.java @@ -208,7 +208,7 @@ public class SymbolicRegressionFunctions extends FunctionSet { } /** - * Exponential function. Returns the exponential of input 0. + * Exponential function. Returns e raised to input 0. * * @see Math */ diff --git a/src/jcgp/backend/parsers/ChromosomeParser.java b/src/jcgp/backend/parsers/ChromosomeParser.java index 92568cc..c35b5b9 100644 --- a/src/jcgp/backend/parsers/ChromosomeParser.java +++ b/src/jcgp/backend/parsers/ChromosomeParser.java @@ -125,7 +125,7 @@ public abstract class ChromosomeParser { resources.println("[Parser] File parsed successfully"); } else { - resources.println("[Parser] Error: the topology of the chromosome in " + file.getName() + " does not match that of the experiment"); + resources.println("[Parser] Error: the number of genes of the chromosome in " + file.getName() + " does not match that of the experiment"); } } |