public class PMXCrossover extends Object implements CrossoverOperator<PermutationSolution<Integer>>
| Constructor and Description |
|---|
PMXCrossover(double crossoverProbability)
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
|
int |
getNumberOfParents()
Two parents are required to apply this operator.
|
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 getNumberOfParents()
getNumberOfParents in interface CrossoverOperator<PermutationSolution<Integer>>Copyright © 2017. All rights reserved.