aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/population/Input.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend/population/Input.java')
-rw-r--r--src/jcgp/backend/population/Input.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/jcgp/backend/population/Input.java b/src/jcgp/backend/population/Input.java
new file mode 100644
index 0000000..83fba07
--- /dev/null
+++ b/src/jcgp/backend/population/Input.java
@@ -0,0 +1,29 @@
+package jcgp.backend.population;
+
+public class Input extends Gene implements Connection {
+
+ private Object value = 0;
+ private int index;
+
+ public Input(int index) {
+ this.index = index;
+ }
+
+ public void setValue(Object newValue) {
+ value = newValue;
+ }
+
+ @Override
+ public Object getValue() {
+ return value;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ @Override
+ public String getDescription() {
+ return "i: " + index;
+ }
+}