diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2014-02-10 09:33:54 +0000 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2014-02-10 09:33:54 +0000 |
commit | 6e7747e5b85f4ca93683ed5166f6e480cc58e6fa (patch) | |
tree | e1243f2eb6f743a547b89362e37e516e22f647e8 /src/jcgp/population/Node.java | |
parent | 0e34bfdb60c28a6118ec93893ddc7ceb6fa50cb5 (diff) |
Refactored the resources mechanics, implemented a few of the chromosome tests
Diffstat (limited to 'src/jcgp/population/Node.java')
-rw-r--r-- | src/jcgp/population/Node.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/jcgp/population/Node.java b/src/jcgp/population/Node.java index fd0cd47..3dbabb2 100644 --- a/src/jcgp/population/Node.java +++ b/src/jcgp/population/Node.java @@ -1,7 +1,7 @@ package jcgp.population; -import jcgp.CGP.Parameters; -import jcgp.CGP.Utilities; +import jcgp.Parameters; +import jcgp.Utilities; import jcgp.function.Function; @@ -9,14 +9,15 @@ public class Node implements MutableElement, Connection { private Function function; private Connection[] connections; - private int column; + private int column, row; - public Node(int col) { - column = col; + public Node(int row, int column) { + this.column = column; + this.row = row; } @Override - public int evaluate() { + public int getValue() { return function.run(connections); } @@ -45,4 +46,9 @@ public class Node implements MutableElement, Connection { return column; } + + @Override + public int getRow() { + return row; + } } |