Function PGASetCrossoverSBXOncePerString

Function Documentation

void PGASetCrossoverSBXOncePerString(PGAContext *ctx, int val)

Compute random number for simulated binary crossover (SBX) polynomial distribution only once per string/individual.

Description

If set to PGA_TRUE all alleles will use the same value which means that the resulting string will point into the same direction as the vector between both parents. The default is PGA_FALSE indicating that a new random number is used for each string.

Example

PGAContext *ctx;

...
PGASetCrossoverSBXOncePerString (ctx, PGA_TRUE);

Parameters
  • ctx – context variable

  • val – flag indicating if random number is computed once per string

Returns

None