Class ArithmeticCrossover
java.lang.Object
org.uma.jmetal.operator.crossover.impl.ArithmeticCrossover
- All Implemented Interfaces:
Serializable,CrossoverOperator<DoubleSolution>,Operator<List<DoubleSolution>,List<DoubleSolution>>
This class implements the Arithmetic Crossover operator for real-valued solutions.
The arithmetic crossover creates offspring that are a weighted arithmetic mean of the parent solutions.
For each variable, a random weight is used to combine the parent values.
Reference: Michalewicz, Z. (1996). Genetic Algorithms + Data Structures = Evolution Programs. Springer-Verlag, Berlin.
- Author:
- Antonio J. Nebro
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionArithmeticCrossover(double crossoverProbability) Constructor with default parametersArithmeticCrossover(double crossoverProbability, RepairDoubleSolution solutionRepair) Constructor with repair strategyArithmeticCrossover(double crossoverProbability, RepairDoubleSolution solutionRepair, RandomGenerator<Double> randomGenerator) Constructor with all parameters -
Method Summary
-
Constructor Details
-
ArithmeticCrossover
public ArithmeticCrossover(double crossoverProbability) Constructor with default parameters- Parameters:
crossoverProbability- Crossover probability (must be in [0,1])
-
ArithmeticCrossover
Constructor with repair strategy- Parameters:
crossoverProbability- Crossover probability (must be in [0,1])solutionRepair- Strategy for repairing solutions
-
ArithmeticCrossover
public ArithmeticCrossover(double crossoverProbability, RepairDoubleSolution solutionRepair, RandomGenerator<Double> randomGenerator) Constructor with all parameters- Parameters:
crossoverProbability- Crossover probability (must be in [0,1])solutionRepair- Strategy for repairing solutionsrandomGenerator- Random number generator
-
-
Method Details
-
execute
- Specified by:
executein interfaceOperator<List<DoubleSolution>,List<DoubleSolution>> - Parameters:
solutions- The data to process
-
crossoverProbability
public double crossoverProbability()- Specified by:
crossoverProbabilityin interfaceCrossoverOperator<DoubleSolution>
-
numberOfRequiredParents
public int numberOfRequiredParents()- Specified by:
numberOfRequiredParentsin interfaceCrossoverOperator<DoubleSolution>
-
numberOfGeneratedChildren
public int numberOfGeneratedChildren()- Specified by:
numberOfGeneratedChildrenin interfaceCrossoverOperator<DoubleSolution>
-