public class PMXCrossover extends Object implements CrossoverOperator<PermutationSolution<Integer>>
| Constructor and Description |
|---|
PMXCrossover(double crossoverProbability)
Constructor
|
PMXCrossover(double crossoverProbability,
RandomGenerator<Double> randomGenerator)
Constructor
|
PMXCrossover(double crossoverProbability,
RandomGenerator<Double> crossoverRandomGenerator,
BoundedRandomGenerator<Integer> cuttingPointRandomGenerator)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
List<PermutationSolution<Integer>> |
doCrossover(double probability,
List<PermutationSolution<Integer>> parents)
Perform the crossover operation
|
List<PermutationSolution<Integer>> |
execute(List<PermutationSolution<Integer>> parents)
Executes the operation
|
double |
getCrossoverProbability() |
int |
getNumberOfGeneratedChildren() |
int |
getNumberOfRequiredParents() |
void |
setCrossoverProbability(double crossoverProbability) |
public PMXCrossover(double crossoverProbability)
public PMXCrossover(double crossoverProbability,
RandomGenerator<Double> randomGenerator)
public PMXCrossover(double crossoverProbability,
RandomGenerator<Double> crossoverRandomGenerator,
BoundedRandomGenerator<Integer> cuttingPointRandomGenerator)
public double getCrossoverProbability()
public void setCrossoverProbability(double crossoverProbability)
public List<PermutationSolution<Integer>> execute(List<PermutationSolution<Integer>> parents)
execute in interface Operator<List<PermutationSolution<Integer>>,List<PermutationSolution<Integer>>>parents - An object containing an array of two solutionspublic List<PermutationSolution<Integer>> doCrossover(double probability, List<PermutationSolution<Integer>> parents)
probability - Crossover probabilityparents - Parentspublic int getNumberOfRequiredParents()
getNumberOfRequiredParents in interface CrossoverOperator<PermutationSolution<Integer>>public int getNumberOfGeneratedChildren()
getNumberOfGeneratedChildren in interface CrossoverOperator<PermutationSolution<Integer>>Copyright © 2018. All rights reserved.