jmetal.operators.crossover
Class SinglePointCrossover

java.lang.Object
  extended by jmetal.core.Operator
      extended by jmetal.operators.crossover.Crossover
          extended by jmetal.operators.crossover.SinglePointCrossover
All Implemented Interfaces:
java.io.Serializable

public class SinglePointCrossover
extends Crossover

This class allows to apply a Single Point crossover operator using two parent solutions.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jmetal.core.Operator
parameters_
 
Constructor Summary
SinglePointCrossover(java.util.HashMap<java.lang.String,java.lang.Object> parameters)
          Constructor Creates a new instance of the single point crossover operator
 
Method Summary
 Solution[] doCrossover(double probability, Solution parent1, Solution parent2)
          Perform the crossover operation.
 java.lang.Object execute(java.lang.Object object)
          Executes the operation
 
Methods inherited from class jmetal.core.Operator
getParameter, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SinglePointCrossover

public SinglePointCrossover(java.util.HashMap<java.lang.String,java.lang.Object> parameters)
Constructor Creates a new instance of the single point crossover operator

Method Detail

doCrossover

public Solution[] doCrossover(double probability,
                              Solution parent1,
                              Solution parent2)
                       throws JMException
Perform the crossover operation.

Parameters:
probability - Crossover probability
parent1 - The first parent
parent2 - The second parent
Returns:
An array containig the two offsprings
Throws:
JMException

execute

public java.lang.Object execute(java.lang.Object object)
                         throws JMException
Executes the operation

Specified by:
execute in class Operator
Parameters:
object - An object containing an array of two solutions
Returns:
An object containing an array with the offSprings
Throws:
JMException