aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/population/Output.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/population/Output.java')
-rw-r--r--src/jcgp/population/Output.java69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/jcgp/population/Output.java b/src/jcgp/population/Output.java
deleted file mode 100644
index 5cc6dcf..0000000
--- a/src/jcgp/population/Output.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package jcgp.population;
-
-import java.util.ArrayList;
-
-public class Output extends Gene implements MutableElement {
-
- private Connection source;
- private Chromosome chromosome;
- private int index;
-
- public Output(Chromosome chromosome, int index) {
- this.chromosome = chromosome;
- this.index = index;
- //this.source = new SimpleObjectProperty<Connection>();
- }
-
- public Object calculate() {
- Object result = source.getValue();
- return result;
- }
-
- @Override
- public void setConnection(int index, Connection newConnection) {
- source = newConnection;
- chromosome.recomputeActiveNodes();
- }
-
- public int getIndex() {
- return index;
- }
-
- public Connection getSource() {
- return source;
- }
-
-// public SimpleObjectProperty<Connection> sourceProperty() {
-// return source;
-// }
-
- public void getActiveNodes(ArrayList<Node> activeNodes) {
- if (source instanceof Node) {
- ((Node) source).getActive(activeNodes);
- }
- }
-
- @Override
- public boolean copyOf(MutableElement m) {
- if (this != m) {
- if (m instanceof Output) {
- Output o = (Output) m;
- if (index == o.getIndex()) {
- if (source != o.getSource()) {
- if (source instanceof Input && o.getSource() instanceof Input) {
- if (((Input) source).getIndex() == ((Input) o.getSource()).getIndex()) {
- return true;
- }
- } else if (source instanceof Node && o.getSource() instanceof Node) {
- if (((Node) source).getRow() == ((Node) o.getSource()).getRow() &&
- ((Node) source).getColumn() == ((Node) o.getSource()).getColumn()) {
- return true;
- }
- }
- }
- }
- }
- }
- return false;
- }
-}