es.udc.gii.common.eaf.algorithm.operator.reproduction.crossover
Class RandomCrossOver

java.lang.Object
  extended by es.udc.gii.common.eaf.algorithm.operator.reproduction.ReproductionOperator
      extended by es.udc.gii.common.eaf.algorithm.operator.reproduction.crossover.CrossOverOperator
          extended by es.udc.gii.common.eaf.algorithm.operator.reproduction.crossover.RandomCrossOver
All Implemented Interfaces:
Operator, Configurable

public class RandomCrossOver
extends CrossOverOperator

Random Crossover is a fairly simple crossover operator. Basically, the operator choose n random points in the chromosomes of the individuals and generate two new individuals by exchanging the genes between the individuals about this n points.

To config this operator the xml code is:

 <Operator>
      <Class>es.udc.gii.common.eaf.algorithm.operator.reproduction.crossover.RandomCrossOver</Class>
      <Probability>value</Probability>
 </Operator>
 
 
Where probability is a double value in the range [0, 100] which represents the probability of crossover. If this does not appear in the configuration, the parameter is set to the default values.

Default values:

Since:
1.0
Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)

Field Summary
private  int points
           
 
Constructor Summary
RandomCrossOver()
           
RandomCrossOver(int probability, int points)
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the specific element that implements this method.
protected  java.util.List<Individual> crossOver(EvolutionaryAlgorithm ea, java.util.List<Individual> individuals)
           
 
Methods inherited from class es.udc.gii.common.eaf.algorithm.operator.reproduction.crossover.CrossOverOperator
getCrossPoints, getProbability, operate, setProbability, toString
 
Methods inherited from class es.udc.gii.common.eaf.algorithm.operator.reproduction.ReproductionOperator
checkBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

points

private int points
Constructor Detail

RandomCrossOver

public RandomCrossOver()

RandomCrossOver

public RandomCrossOver(int probability,
                       int points)
Method Detail

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Description copied from interface: Configurable
Configures the specific element that implements this method.

Specified by:
configure in interface Configurable
Overrides:
configure in class CrossOverOperator
Parameters:
conf - a Configuration object.
See Also:
Configuration

crossOver

protected java.util.List<Individual> crossOver(EvolutionaryAlgorithm ea,
                                               java.util.List<Individual> individuals)
Specified by:
crossOver in class CrossOverOperator