|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.cognition.learning.algorithm.genetic.reproducer.CrossoverReproducer<GenomeType>
GenomeType
- Type of genome used to represent a single element in the
genetic population, such as a Vector, for example@CodeReviews(reviews={@CodeReview(reviewer="Kevin R. Dixon",date="2008-07-23",changesNeeded=false,comments={"This class still has open task from last code review, but I suspect it\'s due to lack of interest.","Moved previous code review to CodeReview annotation","Otherwise, looks fine."}),@CodeReview(reviewer="Justin Basilico",date="2006-10-04",changesNeeded=false,comments={"Class looks fine.","It may want to include some randomness in case the selector that it calls is deterministic and returns the same population twice."})}) public class CrossoverReproducer<GenomeType>
The CrossoverReproducer takes a population of genomes, and applies the supplied CrossoverFunction to produce a new population.
Constructor Summary | |
---|---|
CrossoverReproducer(Selector<GenomeType> selector,
CrossoverFunction<GenomeType> crossoverFunction)
Creates a new instance of CrossoverReproducer |
Method Summary | |
---|---|
CrossoverFunction<GenomeType> |
getCrossoverFunction()
Gets the CrossoverFunction. |
Selector<GenomeType> |
getSelector()
Gets the selector. |
ArrayList<GenomeType> |
reproduce(Collection<EvaluatedGenome<GenomeType>> genomes)
Produces a new population of genomes from the supplied population using crossover. |
void |
setCrossoverFunction(CrossoverFunction<GenomeType> crossoverFunction)
Sets the CrossoverFunction. |
void |
setSelector(Selector<GenomeType> selector)
Sets the selector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CrossoverReproducer(Selector<GenomeType> selector, CrossoverFunction<GenomeType> crossoverFunction)
selector
- The selector for the population to use.crossoverFunction
- The crossover function to use.Method Detail |
---|
public ArrayList<GenomeType> reproduce(Collection<EvaluatedGenome<GenomeType>> genomes)
reproduce
in interface Reproducer<GenomeType>
genomes
- The population to reproduce.
public Selector<GenomeType> getSelector()
public CrossoverFunction<GenomeType> getCrossoverFunction()
public void setSelector(Selector<GenomeType> selector)
selector
- The new selector.public void setCrossoverFunction(CrossoverFunction<GenomeType> crossoverFunction)
crossoverFunction
- The new CrossoverFunction.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |