Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)

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

java.lang.Object
  extended by org.uncommons.watchmaker.framework.operators.AbstractCrossover<List<T>>
      extended by org.uncommons.watchmaker.framework.operators.ListOrderCrossover<T>
Type Parameters:
T - The component type of the lists that are combined.
All Implemented Interfaces:
EvolutionaryOperator<List<T>>

public class ListOrderCrossover<T>
extends AbstractCrossover<List<T>>

Implements ordered cross-over between arbitrary lists. The algorithm is the Partially Mapped Cross-over (PMX) algorithm.

Author:
Daniel Dyer

Constructor Summary
ListOrderCrossover()
          Creates a cross-over operator with a cross-over probability of 1.
ListOrderCrossover(NumberGenerator<Probability> crossoverProbabilityVariable)
          Creates a cross-over operator where cross-over may or may not be applied to a given pair of parents depending on the crossoverProbability.
ListOrderCrossover(Probability crossoverProbability)
          Creates a cross-over operator with the specified cross-over probability.
 
Method Summary
protected  List<List<T>> mate(List<T> parent1, List<T> parent2, int numberOfCrossoverPoints, Random rng)
          Perform cross-over on a pair of parents to generate a pair of offspring.
 
Methods inherited from class org.uncommons.watchmaker.framework.operators.AbstractCrossover
apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListOrderCrossover

public ListOrderCrossover()
Creates a cross-over operator with a cross-over probability of 1.


ListOrderCrossover

public ListOrderCrossover(Probability crossoverProbability)
Creates a cross-over operator with the specified cross-over probability.

Parameters:
crossoverProbability - The probability that cross-over will be performed for any given pair.

ListOrderCrossover

public ListOrderCrossover(NumberGenerator<Probability> crossoverProbabilityVariable)
Creates a cross-over operator where cross-over may or may not be applied to a given pair of parents depending on the crossoverProbability.

Parameters:
crossoverProbabilityVariable - The probability that, once selected, a pair of parents will be subjected to cross-over rather than being copied, unchanged, into the output population.
Method Detail

mate

protected List<List<T>> mate(List<T> parent1,
                             List<T> parent2,
                             int numberOfCrossoverPoints,
                             Random rng)
Perform cross-over on a pair of parents to generate a pair of offspring.

Specified by:
mate in class AbstractCrossover<List<T>>
Parameters:
parent1 - One of two individuals that provides the source material for generating offspring.
parent2 - One of two individuals that provides the source material for generating offspring.
numberOfCrossoverPoints - The number of cross-overs performed on the two parents.
rng - A source of randomness used to determine the location of cross-over points.
Returns:
A list containing two evolved offspring.

Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)