SinglePointCrossover

Single-point crossover: an alternate crossover operator. A cut point k is chosen uniformly in [1, d-1] (where d is the dimension). The first offspring takes coordinates 0..k-1 from parent 1 and k..d-1 from parent 2; the second offspring is the complement. Two offspring are produced. When d == 1 there is no interior cut point, so the parents are copied unchanged. The returned points are not clamped or rounded; the solver does that via ksl.simopt.problem.ProblemDefinition.toInputMap.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun crossover(parent1: DoubleArray, parent2: DoubleArray, solver: GeneticAlgorithmSolver): List<DoubleArray>

Recombines two parents into one or more offspring.

Link copied to clipboard
open override fun toString(): String