org.jgap.impl
Class ReproductionOperator
java.lang.Object
org.jgap.impl.ReproductionOperator
- All Implemented Interfaces:
- GeneticOperator, java.io.Serializable
- public class ReproductionOperator
- extends java.lang.Object
- implements GeneticOperator
The reproduction operator loops through each of the Chromosomes in the
population and adds them to the list of candidate chromosomes. This
guarantees that each Chromosome in the current population remains a
candidate for selection for the next population. Note that if a
reproduction operator is not included in the list of configured genetic
operators, then Chromosomes in the genotype population may not become
candidates for natural selection.
- Since:
- 1.0
- Author:
- Neil Rotstan, Klaus Meffert
- See Also:
- Serialized Form
|
Method Summary |
void |
operate(Population a_population,
java.util.List a_candidateChromosomes)
The operate method will be invoked on each of the genetic operators
referenced by the current Configuration object during the evolution
phase. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReproductionOperator
public ReproductionOperator()
operate
public void operate(Population a_population,
java.util.List a_candidateChromosomes)
- The operate method will be invoked on each of the genetic operators
referenced by the current Configuration object during the evolution
phase. Operators are given an opportunity to run in the order that
they are added to the Configuration. Implementations of this method
may reference the population of Chromosomes as it was at the beginning
of the evolutionary phase and/or they may instead reference the
candidate Chromosomes, which are the results of prior genetic operators.
In either case, only Chromosomes added to the list of candidate
chromosomes will be considered for natural selection. Implementations
should never modify the original population, but should first make copies
of the Chromosomes selected for modification and operate upon the copies.
- Specified by:
operate in interface GeneticOperator
- Parameters:
a_population - The population of chromosomes from the current
evolution prior to exposure to any genetic operators.
Chromosomes in this array should never be modified.a_candidateChromosomes - The pool of chromosomes that are candidates
for the next evolved population. Only these
chromosomes will go to the natural
phase, so it's important to add any
modified copies of Chromosomes to this
list if it's desired for them to be
considered for natural selection.- Since:
- 1.0