T
- The class chromosomes flowing across the stage.public class AlgorithmStage<T extends Chromosome> extends AbstractStage<T>
biggerIsBetter, fitness, ga
Constructor and Description |
---|
AlgorithmStage(GeneticAlgorithm<T> algorithm)
Builds a wrapper stage for the specified algorithm.
|
Modifier and Type | Method and Description |
---|---|
GeneticAlgorithm<T> |
getAlgorithm()
Returns the wrapped algorithm
|
void |
process(Population<T> in,
Population<T> out)
Processes the input population and tranforms it into the output population.
|
void |
setBiggerIsBetter(boolean flag,
boolean recursively)
Deprecated.
|
void |
setFitness(Fitness fit,
boolean recursively)
Change the
Fitness to this stage propagating the change recursively
according to the flag given as parameter |
dispose, getFitness, init, isBiggerBetter, isFitnessChanged, setBiggerIsBetter, setFitness
public AlgorithmStage(GeneticAlgorithm<T> algorithm)
algorithm
- the algorithm to wrap.public final GeneticAlgorithm<T> getAlgorithm()
@Deprecated public void setBiggerIsBetter(boolean flag, boolean recursively)
setBiggerIsBetter
in class AbstractStage<T extends Chromosome>
flag
- true, if the best individual has the higher fitnessrecursively
- true, to propagate this setting down, otherwise false.public void setFitness(Fitness fit, boolean recursively)
AbstractStage
Fitness
to this stage propagating the change recursively
according to the flag given as parametersetFitness
in class AbstractStage<T extends Chromosome>
public void process(Population<T> in, Population<T> out) throws StageException
AbstractStage
process
in class AbstractStage<T extends Chromosome>
in
- the input populationout
- the output populationStageException