GenomeType - Type of genome used to represent a single element in the
genetic population, such as a Vector, for example@CodeReview(reviewer="Kevin R. Dixon",date="2008-07-23",changesNeeded=false,comments={"Moved previous code review as CodeReview annotation","Looks fine."}) @CodeReview(reviewer="Justin Basilico",date="2006-10-04",changesNeeded=false,comments={"Minor changes made.","Looks good."}) public class MutationReproducer<GenomeType> extends java.lang.Object implements Reproducer<GenomeType>
Perturber to the supplied population to produce a new population.| Constructor and Description |
|---|
MutationReproducer(Perturber<GenomeType> perturber,
Selector<GenomeType> selector)
Creates a new instance of MutationReproducer
|
| Modifier and Type | Method and Description |
|---|---|
Perturber<GenomeType> |
getPerturber()
Gets the perturber used for mutation.
|
Selector<GenomeType> |
getSelector()
Gets the selector used to select the population.
|
java.util.Collection<GenomeType> |
reproduce(java.util.Collection<EvaluatedGenome<GenomeType>> genomes)
Produces a new mutated population based on the supplied population.
|
void |
setPerturber(Perturber<GenomeType> perturber)
Sets the perturber used for mutation.
|
void |
setSelector(Selector<GenomeType> selector)
Sets the selector used to select the population.
|
public MutationReproducer(Perturber<GenomeType> perturber, Selector<GenomeType> selector)
perturber - The Perturber to use for mutating.selector - The Selector to use for selecting genomes to mutate.public java.util.Collection<GenomeType> reproduce(java.util.Collection<EvaluatedGenome<GenomeType>> genomes)
reproduce in interface Reproducer<GenomeType>genomes - The population to mutate.public Perturber<GenomeType> getPerturber()
public Selector<GenomeType> getSelector()
public void setPerturber(Perturber<GenomeType> perturber)
perturber - The new perturber.public void setSelector(Selector<GenomeType> selector)
selector - The new selector.