File position: /EMOC/src/operator/uniform_crossover.h and /EMOC/src/operator/uniform_crossover.cpp
void UniformCrossover(Individual *parent1, Individual *parent2, Individual *offspring1, Individual *offspring2)
Do the uniform crossover on parent1
and parent2
, the results are stored in offspring1
and offspring2
. Note this crossover is for binary encoding problems.
Parameter: |
parent1: Individual*, default=None     The pointer to the first parent individual to do uniform crossover.
parent2: Individual*, default=None     The pointer to the second parent individual to do uniform crossover.
offspring1: Individual*, default=None     The pointer to the first offspring individual of uniform crossover results. The memory of the offspring need to be allocated outside the function.
offspring2: Individual*, default=None     The pointer to the second offspring individual of uniform crossover results. The memory of the offspring need to be allocated outside the function. |
Returns: |
void
|