|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface allows any class to be evolvable by GeneticAlgorithm.
It is derived from Comparable so they classes can be efficiently sorted by the
GA. Invariably, this is done by fitness.
| Method Summary | |
void |
calculateFitness()
Calculate the fitness of this object. |
double |
getFitness()
Return the fitness of this object. |
Evolvable |
mate(Evolvable partner)
Mate with another Evolvable type. |
void |
mutate()
Mutate the class data. |
void |
randomInitialize()
Initialize the class to random values. |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Method Detail |
public void randomInitialize()
public void mutate()
public Evolvable mate(Evolvable partner)
Evolvable type. It is entirely up to the class
implementator how to implement the mating; one-point, two-point crossover etc.
partner - the other mate.
this and partner.public void calculateFitness()
public double getFitness()
|
This documentation is part of the Generation5 JDK.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||