public class GeneDuplicationPipeline extends BreedingPipeline
GeneDuplicationPipeline is designed to duplicate a sequence of genes from the chromosome and append them to the end of the chromosome. The sequence of genes copied are randomly determined. That is to say, a random begining index is selected and a random ending index is selected from the chromosome. Then this area is copied (begining inclusive, ending exclusive) and appended to the end of the chromosome. Since randomness is a factor several checks are performed to make sure the begining and ending indicies are valid. For example, since the ending index is exclusive, the ending index cannot equal the begining index (a new ending index would be randomly seleceted in this case). Likewise the begining index cannot be larger than the ending index (they would be swapped in this case).
Default Base
ec.vector.breed.GeneDuplicationPipeline
Modifier and Type | Field and Description |
---|---|
static int |
NUM_SOURCES |
static java.lang.String |
P_DUPLICATION |
DYNAMIC_SOURCES, likelihood, mybase, P_LIKELIHOOD, P_NUMSOURCES, P_SOURCE, sources, V_SAME, V_STUB
NO_PROBABILITY, P_PROB, probability
Constructor and Description |
---|
GeneDuplicationPipeline() |
Modifier and Type | Method and Description |
---|---|
Parameter |
defaultBase()
Returns the default base for this prototype.
|
int |
numSources()
Returns the number of sources to this pipeline.
|
int |
produce(int min,
int max,
int subpopulation,
java.util.ArrayList<Individual> inds,
EvolutionState state,
int thread,
java.util.HashMap<java.lang.String,java.lang.Object> misc)
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.
|
clone, fillStubs, finishProducing, individualReplaced, maxChildProduction, minChildProduction, preparePipeline, prepareToProduce, produces, setup, sourcesAreProperForm, typicalIndsProduced
getProbability, pickRandom, setProbability, setupProbabilities
public static final java.lang.String P_DUPLICATION
public static final int NUM_SOURCES
public Parameter defaultBase()
Prototype
public int numSources()
BreedingPipeline
numSources
in class BreedingPipeline
public int produce(int min, int max, int subpopulation, java.util.ArrayList<Individual> inds, EvolutionState state, int thread, java.util.HashMap<java.lang.String,java.lang.Object> misc)
BreedingSource
produce
in class BreedingSource