T
- The class chromosomes flowing across the stage.public abstract class ExclusiveDispenser<T extends Chromosome> extends Dispenser<T>
distribute(Individual)
to specify the branch number in which store the
specified Individual.Parallel
Constructor and Description |
---|
ExclusiveDispenser(int span)
Constructs a new exclusive dispencer with the specified amplitude
|
Modifier and Type | Method and Description |
---|---|
abstract int |
distribute(Individual<T> ind)
Returns the branch number where to add the specified individual.
|
void |
distribute(Population<T> in,
Population<T>[] branches)
Distributes the specified population between those ones in the specified array.
|
void |
mergePopulation(Population<T>[] branches,
Population<T> out)
Merges the populations within the specified array in the specified one.
|
void |
postDistribute(Population<T>[] branches)
Callback method invoked just after distribution of individuals is done.
|
void |
postMerge(Population<T> population)
Callback method invoked just after merge of individuals is done.
|
void |
preDistribute(Population<T> population)
Callback method invoked just before distribution of individuals begins.
|
void |
preMerge(Population<T>[] branches)
Callback method invoked just before merge of branches begins.
|
public ExclusiveDispenser(int span)
span
- the dispencer amplitudepublic final void distribute(Population<T> in, Population<T>[] branches)
distribute(Individual)
method
distribute
in class Dispenser<T extends Chromosome>
in
- the population to be distributedbranches
- the array of sub populations of the initial onepublic abstract int distribute(Individual<T> ind)
ind
- the individual to distributepublic final void mergePopulation(Population<T>[] branches, Population<T> out)
distribute(Population, Population[])
method
out will be resized to fit the input population size.
mergePopulation
in class Dispenser<T extends Chromosome>
out
- the final populationbranches
- the populations to be mergedpublic void preDistribute(Population<T> population)
population
- the population to distributepublic void postDistribute(Population<T>[] branches)
branches
- populations as distributedpublic void preMerge(Population<T>[] branches)
branches
- populations as resulting from the different branchespublic void postMerge(Population<T> population)
population
- the merged population