Function PGASetMutationProb

Function Documentation

void PGASetMutationProb(PGAContext *ctx, double mutation_prob)

Specify the probability that a given allele will be mutated.

Description

If this is called without calling PGASetMutationType(), the default mutation type is PGA_MUTATION_CONSTANT. The default probability is the reciprocal of the string length.

Example

PGAContext *ctx;

...
PGASetMutationProb (ctx, 0.001);

Parameters
  • ctx – context variable

  • mutation_prob – the mutation probability

Returns

None