Package ec.spatial

# Class SpatialBreeder

java.lang.Object
ec.Breeder
ec.simple.SimpleBreeder
ec.spatial.SpatialBreeder

All Implemented Interfaces:
  `Setup`, `Singleton`, `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 BreedingSources 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

  `backupPopulation, clonePipelineAndPopulation, elite, eliteFrac, newIndividuals, NOT_SET, P_CLONE_PIPELINE_AND_POPULATION, P_ELITE, P_ELITE_FRAC, P_REEVALUATE_ELITES, P_SEQUENTIAL_BREEDING, pool, reevaluateElites`

  ### Fields inherited from class ec.Breeder

  `sequentialBreeding`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SpatialBreeder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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

  `breedPopChunkProduce, breedPopulation, loadElites, nextSubpopulationSize, numElites, postProcess, shouldBreedSubpop, unmarkElitesEvaluated, usingElitism`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SpatialBreeder

    public SpatialBreeder()

- ## Method Details

  - ### 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`