diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2014-02-13 22:41:26 +0000 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2014-02-13 22:41:26 +0000 |
commit | 6419b69faeb4736db1ccb50cfa5a030f9aa818aa (patch) | |
tree | ca424a5ea85abf044cd4b22c3c43608163ae5f74 /README | |
parent | 3326c58f4d2d7e8c77738277dcd093aa864ad2a5 (diff) |
Added methods in Chromosome to compare active and all nodes. Associated tests also written.
Diffstat (limited to 'README')
-rw-r--r-- | README | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -120,6 +120,14 @@ Population tests under way. 13/2 Writing the test for the population copy constructor will require the production of a method which compares two chromosomes. -It might be useful to incorporate this into the program as it is an interesting utility function. + +Therefore, two new methods will be written for Chromosome: compareTo and compareActiveTo. Compare returns true if the two chromosomes +are exclusively equivalent, and compareActive returns true if the active nodes within the two chromosomes are exclusively equivalent. + +Compare methods done, including their "dependency": copyOf method in MutableElement. This method is akin to equals(), with the exception that +it returns false when the compared objects are pointers to a common instance. + +Minor update: Node now passes only the necessary number of arguments into its function; this allows the node to compute its active +connections as it knows which connections the function will use (based on arity). |