Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)

org.uncommons.watchmaker.framework.operators
Class IdentityOperator<T>

java.lang.Object
  extended by org.uncommons.watchmaker.framework.operators.IdentityOperator<T>
Type Parameters:
T - The type of evolvable entity that this operator is used with.
All Implemented Interfaces:
EvolutionaryOperator<T>

public class IdentityOperator<T>
extends Object
implements EvolutionaryOperator<T>

Evolutionary operator that simply returns the selected candidates unaltered. This can be useful when combined with SplitEvolution so that a proportion of the selected candidates can be copied unaltered into the next generation while the remainder are evolved.

Author:
Daniel Dyer

Constructor Summary
IdentityOperator()
           
 
Method Summary
 List<T> apply(List<T> selectedCandidates, Random rng)
          Returns the selected candidates unaltered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityOperator

public IdentityOperator()
Method Detail

apply

public List<T> apply(List<T> selectedCandidates,
                     Random rng)
Returns the selected candidates unaltered.

Specified by:
apply in interface EvolutionaryOperator<T>
Parameters:
selectedCandidates - The candidates to "evolve" (or do nothing to in this case).
rng - A source of randomness (not used).
Returns:
The unaltered candidates.

Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)