public class StubPipeline extends ReproductionPipeline
Typical Number of Individuals Produced Per produce(...) call
...as many as the child produces
Number of Sources
1
Parameters
| base.stub-source classname, inherits and != ec.BreedingSource |
(the prototypical "stub pipeline" Breeding Source) |
Parameter bases
| base.stub-source | i_prototype (the stub pipeline) |
Default Base
breed.stub
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
P_STUB |
static java.lang.String |
P_STUB_PIPELINE |
BreedingSource |
stubPipeline |
NUM_SOURCES, P_REPRODUCEDYNAMIC_SOURCES, likelihood, mybase, P_LIKELIHOOD, P_NUMSOURCES, P_SOURCE, sources, V_SAME, V_STUBNO_PROBABILITY, P_PROB, probability| Constructor and Description |
|---|
StubPipeline() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a new individual cloned from a prototype,
and suitable to begin use in its own evolutionary
context.
|
Parameter |
defaultBase()
Returns the default base for this prototype.
|
void |
fillStubs(EvolutionState state,
BreedingSource source) |
void |
setup(EvolutionState state,
Parameter base)
Sets up the BreedingPipeline.
|
numSources, producefinishProducing, individualReplaced, maxChildProduction, minChildProduction, preparePipeline, prepareToProduce, produces, sourcesAreProperForm, typicalIndsProducedgetProbability, pickRandom, setProbability, setupProbabilitiespublic static final java.lang.String P_STUB
public static final java.lang.String P_STUB_PIPELINE
public BreedingSource stubPipeline
public Parameter defaultBase()
PrototypedefaultBase in interface PrototypedefaultBase in class ReproductionPipelinepublic void setup(EvolutionState state, Parameter base)
BreedingSourceThe most common modification is to normalize it with some other set of probabilities, then set all of them up in increasing summation; this allows the use of the fast static BreedingSource-picking utility method, BreedingSource.pickRandom(...). In order to use this method, for example, if four breeding source probabilities are {0.3, 0.2, 0.1, 0.4}, then they should get normalized and summed by the outside owners as: {0.3, 0.5, 0.6, 1.0}.
setup in interface Prototypesetup in interface Setupsetup in class ReproductionPipelinePrototype.setup(EvolutionState,Parameter)public java.lang.Object clone()
PrototypeTypically this should be a full "deep" clone. However, you may share certain elements with other objects rather than clone hem, depending on the situation:
Implementations.
public Object clone()
{
try
{
return super.clone();
}
catch ((CloneNotSupportedException e)
{ throw new InternalError(); } // never happens
}
public Object clone()
{
try
{
MyObject myobj = (MyObject) (super.clone());
// put your deep-cloning code here...
}
catch ((CloneNotSupportedException e)
{ throw new InternalError(); } // never happens
return myobj;
}
public Object clone()
{
MyObject myobj = (MyObject) (super.clone());
// put your deep-cloning code here...
return myobj;
}
clone in interface Prototypeclone in class BreedingPipelinepublic void fillStubs(EvolutionState state, BreedingSource source)
fillStubs in class BreedingPipeline