ec.spatial
Class SpatialBreeder

java.lang.Object
  extended by ec.Breeder
      extended by ec.simple.SimpleBreeder
          extended by ec.spatial.SpatialBreeder
All Implemented Interfaces:
Setup, Singleton, java.io.Serializable

public class SpatialBreeder
extends SimpleBreeder

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 BreedingPipelines is obtained from a population's Species for each operating breeding thread.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ec.simple.SimpleBreeder
elite, P_ELITE, P_REEVALUATE_ELITES, reevaluateElites
 
Constructor Summary
SpatialBreeder()
           
 
Method Summary
protected  void breedPopChunk(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.
 void setup(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
breedPopulation, computeSubpopulationLength, loadElites, unmarkElitesEvaluated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpatialBreeder

public SpatialBreeder()
Method Detail

setup

public void setup(EvolutionState state,
                  Parameter base)
Description copied from interface: Setup
Sets 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:
setup in interface Setup
Overrides:
setup in class SimpleBreeder

breedPopChunk

protected void breedPopChunk(Population newpop,
                             EvolutionState state,
                             int[] numinds,
                             int[] from,
                             int threadnum)
Description copied from class: SimpleBreeder
A 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:
breedPopChunk in class SimpleBreeder