JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.core
Class BreederElitist

java.lang.Object
  extended bygov.nasa.javaGenes.core.Breeder
      extended bygov.nasa.javaGenes.core.BreederElitist
All Implemented Interfaces:
java.io.Serializable

public class BreederElitist
extends Breeder

Implement elitist breeding.

See Also:
Serialized Form

Field Summary
protected  Population children
           
protected  int internalGeneration
           
protected  int internalGenerationsPerExternalGeneration
           
protected  int preservedNumber
           
 
Fields inherited from class gov.nasa.javaGenes.core.Breeder
childMakerProvider, debug, tournamentProbability
 
Constructor Summary
BreederElitist(Parameters p, int inPreservedNumber)
           
 
Method Summary
 Population breed(Population parents)
          execute the breeding.
 Population breed(Population parents, int kidsPerGeneration)
           
 void setPreserved(Population parents, Population children, int preservedNumber)
          the best parents become children without modifications
 java.lang.String toString()
           
 
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
 

Field Detail

children

protected Population children

preservedNumber

protected int preservedNumber

internalGenerationsPerExternalGeneration

protected int internalGenerationsPerExternalGeneration

internalGeneration

protected int internalGeneration
Constructor Detail

BreederElitist

public BreederElitist(Parameters p,
                      int inPreservedNumber)
Method Detail

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


JavaGenes, NASA Ames. Written largely by Al Globus