PGAGetMutationType3
Returns the type of mutation used
Usage
int PGAGetMutationType(ctx)
PGAContext *ctx
Input parameters
- ctx
-
- context variable
Output parameters
- none
Location
mutation.c
Examples
Example:
PGAContext *ctx;
int mutatetype;
:
mutatetype = PGAGetMutationType(ctx);
switch (mutatetype) {
case PGA_MUTATION_CONSTANT:
printf("Mutation Type = PGA_MUTATION_CONSTANT0);
break;
case PGA_MUTATION_RANGE:
printf("Mutation Type = PGA_MUTATION_RANGE0);
break;
case PGA_MUTATION_UNIFORM:
printf("Mutation Type = PGA_MUTATION_UNIFORM0);
break;
case PGA_MUTATION_GAUSSIAN:
printf("Mutation Type = PGA_MUTATION_GAUSSIAN0);
break;
case PGA_MUTATION_PERMUTE:
printf("Mutation Type = PGA_MUTATION_PERMUTE0);
break;
}