gov.sandia.cognition.learning.algorithm.genetic.reproducer
Class MutationReproducer<GenomeType>

java.lang.Object
  extended by gov.sandia.cognition.learning.algorithm.genetic.reproducer.MutationReproducer<GenomeType>
Type Parameters:
GenomeType - Type of genome used to represent a single element in the genetic population, such as a Vector, for example
All Implemented Interfaces:
Reproducer<GenomeType>, Serializable

@CodeReviews(reviews={@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 Object
implements Reproducer<GenomeType>

The MutationReproducer class implements a Reproducer that applies a Perturber to the supplied population to produce a new population.

Since:
1.0
Author:
Jonathan McClain, Justin Basilico
See Also:
Serialized Form

Constructor Summary
MutationReproducer(Perturber<GenomeType> perturber, Selector<GenomeType> selector)
          Creates a new instance of MutationReproducer
 
Method Summary
 Perturber<GenomeType> getPerturber()
          Gets the perturber used for mutation.
 Selector<GenomeType> getSelector()
          Gets the selector used to select the population.
 Collection<GenomeType> reproduce(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutationReproducer

public MutationReproducer(Perturber<GenomeType> perturber,
                          Selector<GenomeType> selector)
Creates a new instance of MutationReproducer

Parameters:
perturber - The Perturber to use for mutating.
selector - The Selector to use for selecting genomes to mutate.
Method Detail

reproduce

public Collection<GenomeType> reproduce(Collection<EvaluatedGenome<GenomeType>> genomes)
Produces a new mutated population based on the supplied population.

Specified by:
reproduce in interface Reproducer<GenomeType>
Parameters:
genomes - The population to mutate.
Returns:
The new population.

getPerturber

public Perturber<GenomeType> getPerturber()
Gets the perturber used for mutation.

Returns:
The perturber used for mutation.

getSelector

public Selector<GenomeType> getSelector()
Gets the selector used to select the population.

Returns:
The selector.

setPerturber

public void setPerturber(Perturber<GenomeType> perturber)
Sets the perturber used for mutation.

Parameters:
perturber - The new perturber.

setSelector

public void setSelector(Selector<GenomeType> selector)
Sets the selector used to select the population.

Parameters:
selector - The new selector.