Function PGARunMutationOrCrossover

Function Documentation

void PGARunMutationOrCrossover(PGAContext *ctx, int oldpop, int newpop)

Perform crossover or mutation (but not both) from one population to create the next.

Description

Assumes PGASelect() has been called.

Example

PGAContext *ctx;

...
PGARunMutationOrCrossover (ctx, PGA_OLDPOP, PGA_NEWPOP);

Parameters
  • ctx – context variable

  • oldpop – symbolic constant of old population

  • newpop – symbolic constant of new population

Returns

newpop is modified by side-effect