aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/function/FunctionSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend/function/FunctionSet.java')
-rw-r--r--src/jcgp/backend/function/FunctionSet.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jcgp/backend/function/FunctionSet.java b/src/jcgp/backend/function/FunctionSet.java
index 926ed68..6a549cd 100644
--- a/src/jcgp/backend/function/FunctionSet.java
+++ b/src/jcgp/backend/function/FunctionSet.java
@@ -72,16 +72,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[function].getArity() > arity) {
+ arity = functionList[function].getArity();
}
}
return arity;