Function PGASetMutationType
Defined in File mutation.c
Function Documentation
-
void PGASetMutationType(PGAContext *ctx, int mutation_type)
Set type of mutation to use.
Description
Only effects integer- and real-valued strings. Binary-valued strings are always complemented. In character-valued strings, one alphabetic character is replaced with another chosen uniformly randomly. The alphabetic characters will be lower, upper, or mixed case depending on how the strings were initialized.
Valid choices are
PGA_MUTATION_CONSTANT
(Real/Integer),PGA_MUTATION_RANGE
(Real/Integer),PGA_MUTATION_UNIFORM
(Real),PGA_MUTATION_GAUSSIAN
(Real),PGA_MUTATION_PERMUTE
(Integer),PGA_MUTATION_DE
(Real), andPGA_MUTATION_POLY
(Real/Integer). The default for integer-valued strings conforms to how the strings were initialized. The default for real-valued strings isPGA_MUTATION_GAUSSIAN
. See Constants for Mutation Types for the constants and section Mutation in the user guide for more details.Example
PGAContext *ctx; ... PGASetMutationType (ctx, PGA_MUTATION_UNIFORM);
- Parameters:
ctx – context variable
mutation_type – symbolic constant to specify the mutation type
- Returns:
None