Method Summary |
|
public void | addChromosome(IChromosome a_toAdd) Adds a Chromosome to this Population. |
public void | addChromosomes(Population a_population) Adds all the Chromosomes in the given Population. |
public void | clear() Clears the list of chromosomes. |
public Object | clone() |
public int | compareTo(Object a_pop) This method is not producing symmetric results as -1 is more often returned
than 1 (see description of return value).
Parameters: a_pop - the other population to compare 1: a_pop is null or having fewer chromosomes or equal numberof chromosomes but at least one not contained. |
public boolean | contains(IChromosome a_chromosome) Determines whether the given chromosome is contained within the population. |
protected IChromosome | createChromosome(String a_chromClassName, String a_persistentRepresentation) Creates a new Chromosome instance.
Taken and adapted from CompositeGene. |
public IChromosome | determineFittestChromosome() Determines the fittest Chromosome in the Population (the one with the
highest fitness value) and memorizes it. |
public IChromosome | determineFittestChromosome(int a_startIndex, int a_endIndex) Determines the fittest Chromosome in the population (the one with the
highest fitness value) within the given indices and memorizes it. |
public List | determineFittestChromosomes(int a_numberOfChromosomes) Sorts the Chromosome list and returns the fittest n Chromosomes in
the population. |
public boolean | equals(Object a_pop) The equals-method. |
public IChromosome | getChromosome(int a_index) |
public List | getChromosomes() the list of Chromosome's in the Population. |
public Configuration | getConfiguration() |
public List | getGenome(boolean a_resolveCompositeGenes) Returns the genotype of the population, i.e. |
public String | getPersistentRepresentation() Returns a persistent representation of this chromosome, see interface Gene
for description. |
public boolean | isChanged() |
public boolean | isSorted() |
public Iterator | iterator() Iterator for the Chromosome list in the Population. |
public void | keepPopSizeConstant() Cares that the population size does not exceed the maximum size given in
the configuration. |
IChromosome | removeChromosome(int a_index) Removes a chromosome in the list at the given index. |
protected void | setChanged(boolean a_changed) Mark that for the population the fittest chromosome may have changed. |
public void | setChromosome(int a_index, IChromosome a_chromosome) Sets in the given Chromosome on the given index in the list of chromosomes. |
public void | setChromosomes(List a_chromosomes) Replaces all chromosomes in the population with the give list of
chromosomes. |
protected void | setSorted(boolean a_sorted) Mark the population as sorted. |
public void | setValueFromPersistentRepresentation(String a_representation) Counterpart of getPersistentRepresentation. |
public int | size() |
protected void | sort(Comparator a_comparator) Sorts the chromosomes within the population utilzing the given comparator. |
public void | sortByFitness() Sorts the chromosomes within the population according to their fitness
value using ChromosomFitnessComparator. |
final protected static List | split(String a_string) Splits the input a_string into individual chromosome representations.
Taken and adapted from CompositeGene. |
public IChromosome[] | toChromosomes() |