Function PGASetMutationBoundedFlag
Defined in File mutation.c
Function Documentation
-
void PGASetMutationBoundedFlag(PGAContext *ctx, int val)
If this flag is set to true, then for Integer and Real strings whenever a gene is mutated, if it underflows (overflows) the lower (upper) bound it is reset to the lower (upper) bound.
Description
When this is enabled, all allele values remain within the range the integer strings were initialized on. If this flag is
PGA_FALSE
(the default), the alleles may take any values.Example
PGAContext *ctx; ... PGASetMutationBoundedFlag (ctx, PGA_TRUE);
- Parameters:
ctx – context variable
val – flag to indicate if mutation is bounded
- Returns:
None