Class CycleCrossover
java.lang.Object
org.uma.jmetal.operator.crossover.impl.CycleCrossover
- All Implemented Interfaces:
Serializable,CrossoverOperator<PermutationSolution<Integer>>,Operator<List<PermutationSolution<Integer>>,List<PermutationSolution<Integer>>>
public class CycleCrossover
extends Object
implements CrossoverOperator<PermutationSolution<Integer>>
Cycle Crossover (CX) operator for permutation-based genetic algorithms. This operator identifies
cycles between two parent permutations and exchanges them to produce offspring. It ensures that
each gene occupies the same position in the offspring as it did in one of the parents, preserving
positional information and maintaining valid permutations without duplicates or omissions of
genes.
- Author:
- Nicolás R. Uribe
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleexecute(List<PermutationSolution<Integer>> solutions) intint
-
Constructor Details
-
CycleCrossover
public CycleCrossover(double probability)
-
-
Method Details
-
execute
- Specified by:
executein interfaceOperator<List<PermutationSolution<Integer>>,List<PermutationSolution<Integer>>> - Parameters:
solutions- The data to process
-
crossoverProbability
public double crossoverProbability()- Specified by:
crossoverProbabilityin interfaceCrossoverOperator<PermutationSolution<Integer>>
-
numberOfRequiredParents
public int numberOfRequiredParents()- Specified by:
numberOfRequiredParentsin interfaceCrossoverOperator<PermutationSolution<Integer>>
-
numberOfGeneratedChildren
public int numberOfGeneratedChildren()- Specified by:
numberOfGeneratedChildrenin interfaceCrossoverOperator<PermutationSolution<Integer>>
-