org.biojavax.ga.functions
Class OrderCrossover
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojavax.ga.functions.AbstractCrossOverFunction
org.biojavax.ga.functions.OrderCrossover
- All Implemented Interfaces:
- Changeable, CrossOverFunction
public class OrderCrossover
- extends AbstractCrossOverFunction
This does a 2-point-crossover on two chromosomes keeping the Symbols in each
chromosome constant. The method is commonly named OX - operator
- Author:
- Susanne Merz
Constructor Summary |
OrderCrossover()
Sets the maximal number of crossover points to two and the crossover
probability to 0.5 and initializes this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrderCrossover
public OrderCrossover()
- Sets the maximal number of crossover points to two and the crossover
probability to 0.5 and initializes this object.
performCrossOver
public GACrossResult performCrossOver(SymbolList chromA,
SymbolList chromB)
throws ChangeVetoException
- Description copied from interface:
CrossOverFunction
- Performs a cross between the pair of chromosomes
- Parameters:
chromA
- The first chromosome in the crosschromB
- The second chromosome in the cross
- Returns:
- A
GACross
that holds the results of the cross
- Throws:
ChangeVetoException
- if the chromosomes are unmodifiable