Class EvolutionPipeline<T>
- java.lang.Object
-
- org.uncommons.watchmaker.framework.operators.EvolutionPipeline<T>
-
- Type Parameters:
T
- The type of evolved candidate that this pipeline operates on.
- All Implemented Interfaces:
EvolutionaryOperator<T>
public class EvolutionPipeline<T> extends Object implements EvolutionaryOperator<T>
A compound evolutionary operator that applies multiple operators (of the same type) in series.
By combining EvolutionPipeline operators with
SplitEvolution
operators, elaborate evolutionary schemes can be constructed.
-
-
Constructor Summary
Constructors Constructor Description EvolutionPipeline(List<EvolutionaryOperator<T>> pipeline)
Creates a pipeline consisting of the specified operators in the order that they are supplied.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<T>
apply(List<T> selectedCandidates, Random rng)
Applies each operation in the pipeline in turn to the selection.
-
-
-
Constructor Detail
-
EvolutionPipeline
public EvolutionPipeline(List<EvolutionaryOperator<T>> pipeline)
Creates a pipeline consisting of the specified operators in the order that they are supplied.- Parameters:
pipeline
- An ordered list of operators that make up the pipeline.
-
-
Method Detail
-
apply
public List<T> apply(List<T> selectedCandidates, Random rng)
Applies each operation in the pipeline in turn to the selection.- Specified by:
apply
in interfaceEvolutionaryOperator<T>
- Parameters:
selectedCandidates
- The candidates to subjected to evolution.rng
- A source of randomness used by all stochastic processes in the pipeline.- Returns:
- A list of evolved candidates.
-
-