UniformCrossover

class UniformCrossover(swapProbability: Double = defaultSwapProbability) : CrossoverOperatorIfc(source)

Uniform crossover: an alternate crossover operator. For each coordinate independently, the two parents' values are swapped with probability swapProbability; otherwise they are inherited as is. Two complementary offspring are produced. The returned points are not clamped or rounded; the solver does that via ksl.simopt.problem.ProblemDefinition.toInputMap.

Parameters

swapProbability

the per-coordinate probability of swapping the parents' values. Must be in 0,1. The default is defaultSwapProbability.

Constructors

Link copied to clipboard
constructor(swapProbability: Double = defaultSwapProbability)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

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