aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/population/Output.java
blob: ce4f7761265951b7cb6d0bfb505fd4f7fbffb931 (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
34
35
package jcgp.population;

import jcgp.Parameters;


public class Output implements MutableElement {
	
	private Connection source;
	private int row;
	
	public Output(int row) {
		this.row = row;
	}

	public int calculate() {
		return source.getValue();
	}

	@Override
	public void setConnection(Connection newConnection) {
		source = newConnection;
		
	}

	@Override
	public int getColumn() {
		return Parameters.getColumns();
	}

	@Override
	public int getRow() {
		return row;
	}

}