aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/population/MutableElement.java
blob: 114a4abeb5e674115c565018228823fb70b36f46 (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
package jcgp.population;

public interface MutableElement {
	
	public void setConnection(Connection newConnection);

	/**
	 * This method returns true if and only if:</br>
	 * 	- the elements being compared are not the same instance;</br>
	 *  - the connections of the compared elements are not the same instance;</br>
	 *  - the elements have the same function (in the case of Node);</br>
	 *  - the grid position of the elements themselves are the same;</br>
	 *  - the grid position of all equivalent connections are the same;</br></br>
	 * 
	 * The relationship computed by this method is:</br>
	 *  - symmetric: a.copyOf(b) == b.copyOf(a);</br>
	 *  - not reflexive: a.copyOf(a) returns false;</br>
	 *  - not transitive: if a.copyOf(b) is true and b.copyOf(c) is true, a.copyOf(c) is not necessarily true;</br>
	 * 
	 * @param m
	 * @return
	 */
	boolean copyOf(MutableElement m);
	
}