org.jgap.supergenes |
Provides methods for testing the Supergene. To test this method,
we use the following task: given amount in pennies [1..99], express it in
pennies, nickels (5 pennies), dimes (10 pennies) and quarters (25 pennies),
additionally ensuring that numbers of pennies and nickels are both
even or both odd. The Supergene, used in SupergeneTest , encloses pennies and nickels and is valid
if this condition is satisfied. The alternative algorithm (withoutSupergeneTest ) does
exactly the same task without using supergenes.
|
Java Source File Name | Type | Comment |
AbstractSupergene.java | Class | Combined implementation of both Supergene and SupergeneValidator.
A working supergene can be easily created from this class just by
adding genes and overriding
org.jgap.supergenes.AbstractSupergene.isValid(Gene[] a_caseSupergene a_forSupergene) isValid (Gene [], Supergene) method. |
AllSupergenesTests.java | Class | Test suite for supergene. |
InstantiableSupergeneForTesting.java | Class | Non-abstract Supergene ued for testing purposes only. |
Supergene.java | Interface | Supergene represents several genes, which usually control closely
related aspects of the phenotype. |
SupergeneInternalParserTest.java | Class | Tests the Supergene internal parser. |
SupergenePersistentRepresentationTest.java | Class | Test persistent representation of the AbstractSupergene. |
SupergeneValidator.java | Interface | A class, deciding, if the supergene allele combination is valid. |
Validator.java | Class | The abstract supergeneValidator, hiding the getPersisten()
and setFromPersistent() methods that are not always required. |