From e7d7e8506a511d78f9e323ac09587f79ad503f42 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sun, 13 Apr 2014 10:41:25 +0100 Subject: Performance suddenly decreased, looking into why --- src/jcgp/backend/function/IntegerArithmetic.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/jcgp/backend/function') 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()); -- cgit v1.2.3