|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jenes.stage.Dispenser<T> jenes.stage.ExclusiveDispenser<T>
T
- The class chromosomes flowing across the stage.public abstract class ExclusiveDispenser<T extends Chromosome>
An abstract dispencer useful when each individual can be in only one parallel branch, so the
distribute method is exclusive.
The only method to implement is distribute(Individual)
to specify the branch number in which store the
specified Individual.
Note: the predistribute method of this class has empty implementation.
Override it if you need to evaluate preDistrubute statistics.
Parallel
Field Summary |
---|
Fields inherited from class jenes.stage.Dispenser |
---|
span |
Constructor Summary | |
---|---|
ExclusiveDispenser(int span)
Constructs a new exclusive dispencer with the specified amplitude |
Method Summary | |
---|---|
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 |
preDistribute(Population<T> population)
Sets up the switcher state according to the population's state. |
Methods inherited from class jenes.stage.Dispenser |
---|
span |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExclusiveDispenser(int span)
span
- the dispencer amplitudeMethod Detail |
---|
public 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 void preDistribute(Population<T> population)
population
- the population to distributepublic abstract int distribute(Individual<T> ind)
ind
- the individual to distribute
public 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 merged
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |