ec.simple
Class SimpleBreeder
java.lang.Object
|
+--ec.Breeder
|
+--ec.simple.SimpleBreeder
- Direct Known Subclasses:
- SteadyStateBreeder
- public class SimpleBreeder
- extends Breeder
Breeds each subpopulation separately, with no inter-population exchange,
and using a generational approach. A SimpleBreeder 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
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SimpleBreeder
public SimpleBreeder()
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.
breedPopulation
public Population breedPopulation(EvolutionState state)
throws java.lang.CloneNotSupportedException
- A simple breeder that doesn't attempt to do any cross-
population breeding. Basically it applies pipelines,
one per thread, to various subchunks of a new population.
- Overrides:
- breedPopulation in class Breeder
breedPopChunk
public void breedPopChunk(Population newpop,
EvolutionState state,
int[] numinds,
int[] from,
int threadnum)
throws java.lang.CloneNotSupportedException
- 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.