blob: f3199b8b1c56dc3519b4a198c268912b2b6e576b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package jcgp.population;
import java.util.ArrayList;
public class Input implements Connection {
private int value = 0, index;
public Input(int index) {
this.index = index;
}
public void setValue(int newValue) {
value = newValue;
}
@Override
public int getValue() {
return value;
}
public int getIndex() {
return index;
}
@Override
public void getActive(ArrayList<Connection> activeNodes) {
if (!activeNodes.contains(this)) {
activeNodes.add(this);
}
}
}
|