Package ec.spatial
Class SpatialBreeder
java.lang.Object
ec.Breeder
ec.simple.SimpleBreeder
ec.spatial.SpatialBreeder
- All Implemented Interfaces:
Setup,Singleton,Serializable
A slight modification of the simple breeder for spatially-embedded EAs.
Breeds each subpopulation separately, with no inter-population exchange,
and using a generational approach. A SpatialBreeder may have multiple
threads; it divvys up a subpopulation into chunks and hands one chunk
to each thread to populate. One array of BreedingSources is obtained
from a population's Species for each operating breeding thread.
- See Also:
-
Field Summary
Fields inherited from class ec.simple.SimpleBreeder
backupPopulation, clonePipelineAndPopulation, elite, eliteFrac, newIndividuals, NOT_SET, P_CLONE_PIPELINE_AND_POPULATION, P_ELITE, P_ELITE_FRAC, P_REEVALUATE_ELITES, P_SEQUENTIAL_BREEDING, pool, reevaluateElitesFields inherited from class ec.Breeder
sequentialBreeding -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbreedPopChunk(Population newpop, EvolutionState state, int[] numinds, int[] from, int threadnum) A private helper function for breedPopulation which breeds a chunk of individuals in a subpopulation for a given thread.voidsetup(EvolutionState state, Parameter base) Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.Methods inherited from class ec.simple.SimpleBreeder
breedPopChunkProduce, breedPopulation, loadElites, nextSubpopulationSize, numElites, postProcess, shouldBreedSubpop, unmarkElitesEvaluated, usingElitism
-
Constructor Details
-
SpatialBreeder
public SpatialBreeder()
-
-
Method Details
-
setup
Description copied from interface:SetupSets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.- Specified by:
setupin interfaceSetup- Overrides:
setupin classSimpleBreeder
-
breedPopChunk
protected void breedPopChunk(Population newpop, EvolutionState state, int[] numinds, int[] from, int threadnum) Description copied from class:SimpleBreederA private helper function for breedPopulation which breeds a chunk of individuals in a subpopulation for a given thread. Although this method is declared public (for the benefit of a private helper class in this file), you should not call it.- Overrides:
breedPopChunkin classSimpleBreeder
-