diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2014-01-31 13:06:54 +0000 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2014-01-31 13:06:54 +0000 |
commit | a02f1fff03ab58416da812597e67a0c7e21fdbd5 (patch) | |
tree | 0192f0db1d1bc8d6d29433f4e84d4c94a89ed2ac /src/jcgp/chromosome/Chromosome.java | |
parent | 8f7874fa75c532bab994af8e6553d37afe42ec4c (diff) |
Created most of the classes that will be necessary, content is blank for now.
Diffstat (limited to 'src/jcgp/chromosome/Chromosome.java')
-rw-r--r-- | src/jcgp/chromosome/Chromosome.java | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/src/jcgp/chromosome/Chromosome.java b/src/jcgp/chromosome/Chromosome.java deleted file mode 100644 index cdf2e4b..0000000 --- a/src/jcgp/chromosome/Chromosome.java +++ /dev/null @@ -1,79 +0,0 @@ -package jcgp.chromosome; - -import java.util.ArrayList; - -import jcgp.CGP; -import jcgp.chromosome.element.Input; -import jcgp.chromosome.element.Node; -import jcgp.chromosome.element.Output; - -public class Chromosome { - - private ArrayList<Input> inputs; - private ArrayList<ArrayList<Node>> nodes; - private ArrayList<Output> outputs; - - /** - * Good citizen. - * - */ - public Chromosome() { - - inputs = new ArrayList<Input>(CGP.INPUTS); - for (int i = 0; i < CGP.INPUTS; i++) { - inputs.add(new Input()); - } - - // rows first - nodes = new ArrayList<ArrayList<Node>>(CGP.ROWS); - for (int r = 0; r < CGP.ROWS; r++) { - nodes.add(new ArrayList<Node>(CGP.COLUMNS)); - for (int c = 0; c < CGP.COLUMNS; c++) { - nodes.get(r).add(new Node()); - } - } - - outputs = new ArrayList<Output>(CGP.OUTPUTS); - for (int o = 0; o < CGP.OUTPUTS; o++) { - outputs.add(new Output()); - } - } - - public int getActiveNodeCount() { - return 0; - } - - /** - * @return the inputs - */ - public final ArrayList<Input> getInputs() { - return inputs; - } - - /** - * @return the nodes - */ - public final ArrayList<ArrayList<Node>> getNodes() { - return nodes; - } - - /** - * @return the outputs - */ - public final ArrayList<Output> getOutputs() { - return outputs; - } - - public final Node getNode(int row, int column) { - return nodes.get(row).get(column); - } - - public final Output getOutput(int index) { - return outputs.get(index); - } - - public final Input getInputs(int index) { - return inputs.get(index); - } - -} |