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

java.lang.Object
  extended by gov.sandia.cognition.learning.algorithm.genetic.reproducer.MultiReproducer<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={"This class still has an open task... I suspect this is due to a lack of interest.","Moved previous code review as CodeReview annotation.","Looks fine."}),@CodeReview(reviewer="Justin Basilico",date="2006-10-04",changesNeeded=false,comments={"Minor changes made.","Looks fine otherwise."})})
public class MultiReproducer<GenomeType>
extends Object
implements Reproducer<GenomeType>

The MultiReproducer class implements a Reproducer that takes multiple Reproducers and applies them to a population.

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

Constructor Summary
MultiReproducer(Collection<Reproducer<GenomeType>> reproducers)
          Creates a new instance of MultiReproducer.
 
Method Summary
 Collection<Reproducer<GenomeType>> getReproducers()
          Gets the reproducers to use for reproducing.
 ArrayList<GenomeType> reproduce(Collection<EvaluatedGenome<GenomeType>> genomes)
          Applies the supplied reproducers to the population of genomes.
 void setReproducers(Collection<Reproducer<GenomeType>> reproducers)
          Sets the reproducers to use for reproducing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiReproducer

public MultiReproducer(Collection<Reproducer<GenomeType>> reproducers)
Creates a new instance of MultiReproducer.

Parameters:
reproducers - The reproducers to use.
Method Detail

reproduce

public ArrayList<GenomeType> reproduce(Collection<EvaluatedGenome<GenomeType>> genomes)
Applies the supplied reproducers to the population of genomes.

Specified by:
reproduce in interface Reproducer<GenomeType>
Parameters:
genomes - The current population of genomes along with their associated costs.
Returns:
A new population of genomes.

getReproducers

public Collection<Reproducer<GenomeType>> getReproducers()
Gets the reproducers to use for reproducing.

Returns:
The reproducers.

setReproducers

public void setReproducers(Collection<Reproducer<GenomeType>> reproducers)
Sets the reproducers to use for reproducing.

Parameters:
reproducers - The new reproducers.