|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jgap.Genotype
Genotypes represent fixed-length collections or "populations" of Chromosomes. As an instance of a genotype is evolved, all of its Chromosomes are also evolved.
| Constructor Summary | |
Genotype(org.jgap.Chromosome[] initialChromosomes,
org.jgap.FitnessFunction fitnessFunc,
org.jgap.NaturalSelector selector)
Constructs a new Genotype instance with the given array of Chromosomes and the given fitness function. |
|
| Method Summary | |
void |
evolve()
Evolve the collection of Chromosomes within this Genotype. |
org.jgap.Chromosome[] |
getChromosomes()
Retrieve the array of Chromosomes that make up this Genotype instance. |
org.jgap.Chromosome |
getFittestChromosome()
Retrieve the Chromosome in the population with the highest fitness value. |
static org.jgap.Genotype |
randomInitialGenotype(int populationSize,
int chromosomeSize,
org.jgap.FitnessFunction fitnessFunc,
org.jgap.NaturalSelector selector)
Convenience method that returns a newly constructed Genotype instance consisting of the given number of Chromosomes of the given size and instantiated with the given fitness function. |
static org.jgap.Genotype |
randomInitialGenotype(int populationSize,
int chromosomeSize,
int mutationRate,
org.jgap.FitnessFunction fitnessFunc,
org.jgap.NaturalSelector selector)
Convenience method that returns a newly constructed Genotype with the given fitness function and consisting of the given number of Chromosomes instantiated with the given size and mutation rate. |
java.lang.String |
toString()
Return a string representation of this Genotype instance, useful for debugging purposes. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Genotype(org.jgap.Chromosome[] initialChromosomes,
org.jgap.FitnessFunction fitnessFunc,
org.jgap.NaturalSelector selector)
| Method Detail |
public org.jgap.Chromosome[] getChromosomes()
public org.jgap.Chromosome getFittestChromosome()
public void evolve()
public java.lang.String toString()
toString in class java.lang.Object
public static org.jgap.Genotype randomInitialGenotype(int populationSize,
int chromosomeSize,
org.jgap.FitnessFunction fitnessFunc,
org.jgap.NaturalSelector selector)
public static org.jgap.Genotype randomInitialGenotype(int populationSize,
int chromosomeSize,
int mutationRate,
org.jgap.FitnessFunction fitnessFunc,
org.jgap.NaturalSelector selector)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||