Function PGAIntegerMutation
Defined in File integer.c
Function Documentation
-
int PGAIntegerMutation(PGAContext *ctx, int p, int pop, double mr)
Randomly mutates an integer-valued gene with a specified probability.
Description
This routine is called from
PGAMutate()
.Note that this function is set in
PGASetUp()
as the mutation user function for the integer datatype by default.- Parameters:
ctx – context variable
p – string index
pop – symbolic constant of the population string p is in
mr – probability of mutating an integer-valued gene
- Returns:
Returns the number of mutations