public abstract class SelectionMethod extends BreedingSource
Typical Number of Individuals Produced Per produce(...) call
Always 1.
| Modifier and Type | Field and Description |
|---|---|
static int |
INDS_PRODUCED |
NO_PROBABILITY, P_PROB, probability| Constructor and Description |
|---|
SelectionMethod() |
| Modifier and Type | Method and Description |
|---|---|
void |
finishProducing(EvolutionState s,
int subpopulation,
int thread)
A default version of finishProducing, which does nothing.
|
void |
prepareToProduce(EvolutionState s,
int subpopulation,
int thread)
A default version of prepareToProduce which does nothing.
|
abstract int |
produce(int subpopulation,
EvolutionState state,
int thread)
An alternative form of "produce" special to Selection Methods;
selects an individual from the given subpopulation and
returns its position in that subpopulation.
|
int |
produce(int min,
int max,
int start,
int subpopulation,
Individual[] inds,
EvolutionState state,
int thread)
Produces n individuals from the given subpopulation
and puts them into inds[start...start+n-1],
where n = Min(Max(q,min),max), where q is the "typical" number of
individuals the BreedingSource produces in one shot, and returns
n.
|
boolean |
produces(EvolutionState state,
Population newpop,
int subpopulation,
int thread)
A default version of produces -- this method always returns
true under the assumption that the selection method works
with all Fitnesses.
|
int |
typicalIndsProduced()
Returns 1 (the typical default value)
|
clone, getProbability, pickRandom, preparePipeline, setProbability, setup, setupProbabilitiesequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdefaultBasepublic static final int INDS_PRODUCED
public int typicalIndsProduced()
typicalIndsProduced in class BreedingSourcepublic boolean produces(EvolutionState state, Population newpop, int subpopulation, int thread)
produces in class BreedingSourcepublic void prepareToProduce(EvolutionState s, int subpopulation, int thread)
prepareToProduce in class BreedingSourcepublic void finishProducing(EvolutionState s, int subpopulation, int thread)
finishProducing in class BreedingSourcepublic int produce(int min,
int max,
int start,
int subpopulation,
Individual[] inds,
EvolutionState state,
int thread)
BreedingSourceproduce in class BreedingSourcepublic abstract int produce(int subpopulation,
EvolutionState state,
int thread)
Copyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.