aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/function
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2014-04-13 10:41:25 +0100
committerEduardo Pedroni <ep625@york.ac.uk>2014-04-13 10:41:25 +0100
commite7d7e8506a511d78f9e323ac09587f79ad503f42 (patch)
tree8d87a718af29470b5bb8e5dfeb0ce18865f185cb /src/jcgp/backend/function
parentdbae5ce2e0765f229e11b692a2aba570286980f4 (diff)
Performance suddenly decreased, looking into why
Diffstat (limited to 'src/jcgp/backend/function')
-rw-r--r--src/jcgp/backend/function/IntegerArithmetic.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/jcgp/backend/function/IntegerArithmetic.java b/src/jcgp/backend/function/IntegerArithmetic.java
index c08a72a..9bb02b5 100644
--- a/src/jcgp/backend/function/IntegerArithmetic.java
+++ b/src/jcgp/backend/function/IntegerArithmetic.java
@@ -1,6 +1,5 @@
package jcgp.backend.function;
-import jcgp.backend.exceptions.InvalidArgumentsException;
import jcgp.backend.population.Connection;
public class IntegerArithmetic extends FunctionSet {
@@ -20,7 +19,7 @@ public class IntegerArithmetic extends FunctionSet {
@Override
public Integer run(Connection... connections) {
if (connections.length < 2) {
- throw new InvalidArgumentsException("Not enough connections were given.");
+ throw new IllegalArgumentException("Not enough connections were given.");
} else {
Integer arg1 = ((Integer) connections[0].getValue());
Integer arg2 = ((Integer) connections[1].getValue());
@@ -45,7 +44,7 @@ public class IntegerArithmetic extends FunctionSet {
@Override
public Integer run(Connection... connections) {
if (connections.length < 2) {
- throw new InvalidArgumentsException("Not enough connections were given.");
+ throw new IllegalArgumentException("Not enough connections were given.");
} else {
Integer arg1 = ((Integer) connections[0].getValue());
Integer arg2 = ((Integer) connections[1].getValue());
@@ -70,12 +69,11 @@ public class IntegerArithmetic extends FunctionSet {
@Override
public Integer run(Connection... connections) {
if (connections.length < 2) {
- throw new InvalidArgumentsException("Not enough connections were given.");
+ throw new IllegalArgumentException("Not enough connections were given.");
} else {
Integer arg1 = ((Integer) connections[0].getValue());
Integer arg2 = ((Integer) connections[1].getValue());
Integer result = arg1 * arg2;
-
return result;
}
}
@@ -95,7 +93,7 @@ public class IntegerArithmetic extends FunctionSet {
@Override
public Integer run(Connection... connections) {
if (connections.length < 2) {
- throw new InvalidArgumentsException("Not enough connections were given.");
+ throw new IllegalArgumentException("Not enough connections were given.");
} else {
Integer arg1 = ((Integer) connections[0].getValue());
Integer arg2 = ((Integer) connections[1].getValue());