aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/chromosome/element
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/chromosome/element')
-rw-r--r--src/jcgp/chromosome/element/ChromosomeElement.java7
-rw-r--r--src/jcgp/chromosome/element/Input.java11
-rw-r--r--src/jcgp/chromosome/element/MutableElement.java12
-rw-r--r--src/jcgp/chromosome/element/Node.java26
-rw-r--r--src/jcgp/chromosome/element/Output.java26
5 files changed, 82 insertions, 0 deletions
diff --git a/src/jcgp/chromosome/element/ChromosomeElement.java b/src/jcgp/chromosome/element/ChromosomeElement.java
new file mode 100644
index 0000000..2dc9107
--- /dev/null
+++ b/src/jcgp/chromosome/element/ChromosomeElement.java
@@ -0,0 +1,7 @@
+package jcgp.chromosome.element;
+
+public abstract class ChromosomeElement {
+
+ public abstract int evaluate();
+
+}
diff --git a/src/jcgp/chromosome/element/Input.java b/src/jcgp/chromosome/element/Input.java
new file mode 100644
index 0000000..de051dc
--- /dev/null
+++ b/src/jcgp/chromosome/element/Input.java
@@ -0,0 +1,11 @@
+package jcgp.chromosome.element;
+
+public class Input extends ChromosomeElement {
+
+ @Override
+ public int evaluate() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+}
diff --git a/src/jcgp/chromosome/element/MutableElement.java b/src/jcgp/chromosome/element/MutableElement.java
new file mode 100644
index 0000000..ed7e23c
--- /dev/null
+++ b/src/jcgp/chromosome/element/MutableElement.java
@@ -0,0 +1,12 @@
+package jcgp.chromosome.element;
+
+import jcgp.chromosome.Chromosome;
+import jcgp.chromosome.functions.FunctionSet;
+
+public interface MutableElement {
+
+ public void initialise(Chromosome chromosome, FunctionSet functions);
+
+ public void mutate(Chromosome chromosome, FunctionSet functions);
+
+}
diff --git a/src/jcgp/chromosome/element/Node.java b/src/jcgp/chromosome/element/Node.java
new file mode 100644
index 0000000..f97c680
--- /dev/null
+++ b/src/jcgp/chromosome/element/Node.java
@@ -0,0 +1,26 @@
+package jcgp.chromosome.element;
+
+import jcgp.chromosome.Chromosome;
+import jcgp.chromosome.functions.FunctionSet;
+
+public class Node extends ChromosomeElement implements MutableElement {
+
+ @Override
+ public void initialise(Chromosome chromosome, FunctionSet functions) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mutate(Chromosome chromosome, FunctionSet functions) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public int evaluate() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+}
diff --git a/src/jcgp/chromosome/element/Output.java b/src/jcgp/chromosome/element/Output.java
new file mode 100644
index 0000000..261e77d
--- /dev/null
+++ b/src/jcgp/chromosome/element/Output.java
@@ -0,0 +1,26 @@
+package jcgp.chromosome.element;
+
+import jcgp.chromosome.Chromosome;
+import jcgp.chromosome.functions.FunctionSet;
+
+public class Output extends ChromosomeElement implements MutableElement {
+
+ @Override
+ public void initialise(Chromosome chromosome, FunctionSet functions) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mutate(Chromosome chromosome, FunctionSet functions) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public int evaluate() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+}