blob: f0be590e69b27e9d2934f686d95763b798000265 (
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
|
package jcgp.backend.population;
/**
* {@code Connection} declares the expected behaviour of any
* part of a chromosome that can be connected to, specifically
* nodes or inputs. Outputs are not connections since they
* mark the end of chromosome paths.
* <br><br>
* This interface provides a way to deal with connections
* generically without having to specify whether they are nodes
* or inputs. In this way a random connection can be picked and
* dealt with more easily, facilitating mutations.
*
* @author Eduardo Pedroni
*
*/
public interface Connection {
/**
* Compute and return the value of this connection. In
* the case of inputs no computation is necessary, this
* simply returns the value the input is set to. In the
* case of nodes, the value is computed based on the
* node's function and the value of its own connections.
*
* @return the connection's value.
*/
public Object getValue();
}
|