gov.nasa.javaGenes.core
Class BreederElitist
java.lang.Object
gov.nasa.javaGenes.core.Breeder
gov.nasa.javaGenes.core.BreederElitist
- All Implemented Interfaces:
- java.io.Serializable
- public class BreederElitist
- extends Breeder
Implement elitist breeding.
- See Also:
- Serialized Form
Methods inherited from class gov.nasa.javaGenes.core.Breeder |
antiTournamentGetIndex, chooseBest, chooseWorst, generationIsComplete, generationJustStarting, generationNotComplete, getFitnessFunction, getGenerationIndex, getTotalNumberOfKidsProduced, isProtected, newChild, newChildrenCreated, pickOne, reportOnGeneration, setFitnessFunction, setGenerationIndex, setTotalNumberOfKidsProduced, stateRestore, stateSave, tournament, useTournament |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
children
protected Population children
preservedNumber
protected int preservedNumber
internalGenerationsPerExternalGeneration
protected int internalGenerationsPerExternalGeneration
internalGeneration
protected int internalGeneration
BreederElitist
public BreederElitist(Parameters p,
int inPreservedNumber)
toString
public java.lang.String toString()
breed
public Population breed(Population parents,
int kidsPerGeneration)
- Specified by:
breed
in class Breeder
breed
public Population breed(Population parents)
- Description copied from class:
Breeder
- execute the breeding. Return the population produced.
- Overrides:
breed
in class Breeder
- Returns:
- a new population
setPreserved
public void setPreserved(Population parents,
Population children,
int preservedNumber)
- the best parents become children without modifications