Class HUXCrossover<S extends BinarySolution>
java.lang.Object
org.uma.jmetal.operator.crossover.impl.HUXCrossover<S>
- All Implemented Interfaces:
Serializable,CrossoverOperator<S>,Operator<List<S>,List<S>>
This class allows to apply a HUX crossover operator using two parent solutions. NOTE: the
operator is applied to the first encoding.variable of the solutions, and the type of the
solutions must be Binary
- Version:
- 1.0
- Author:
- Antonio J. Nebro, Juan J. Durillo
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHUXCrossover(double crossoverProbability) ConstructorHUXCrossover(double crossoverProbability, RandomGenerator<Double> randomGenerator) Constructor -
Method Summary
Modifier and TypeMethodDescriptiondoubledoCrossover(double probability, S parent1, S parent2) Perform the crossover operationExecute() methodintintvoidsetCrossoverProbability(double crossoverProbability)
-
Constructor Details
-
HUXCrossover
public HUXCrossover(double crossoverProbability) Constructor -
HUXCrossover
Constructor
-
-
Method Details
-
crossoverProbability
public double crossoverProbability()- Specified by:
crossoverProbabilityin interfaceCrossoverOperator<S extends BinarySolution>
-
setCrossoverProbability
public void setCrossoverProbability(double crossoverProbability) -
execute
-
doCrossover
Perform the crossover operation- Parameters:
probability- Crossover setProbabilityparent1- The first parentparent2- The second parent- Returns:
- An array containing the two offspring
- Throws:
JMetalException
-
numberOfRequiredParents
public int numberOfRequiredParents()- Specified by:
numberOfRequiredParentsin interfaceCrossoverOperator<S extends BinarySolution>
-
numberOfGeneratedChildren
public int numberOfGeneratedChildren()- Specified by:
numberOfGeneratedChildrenin interfaceCrossoverOperator<S extends BinarySolution>
-