Function PGAGetMutationType
Defined in File mutation.c
Function Documentation
-
int PGAGetMutationType(PGAContext *ctx)
Return the type of mutation used.
Example
PGAContext *ctx; int mutatetype; ... mutatetype = PGAGetMutationType (ctx); switch (mutatetype) { case PGA_MUTATION_CONSTANT: printf ("Mutation Type = PGA_MUTATION_CONSTANT\n"); break; case PGA_MUTATION_RANGE: printf ("Mutation Type = PGA_MUTATION_RANGE\n"); break; case PGA_MUTATION_UNIFORM: printf ("Mutation Type = PGA_MUTATION_UNIFORM\n"); break; case PGA_MUTATION_GAUSSIAN: printf ("Mutation Type = PGA_MUTATION_GAUSSIAN\n"); break; case PGA_MUTATION_PERMUTE: printf ("Mutation Type = PGA_MUTATION_PERMUTE\n"); break; case PGA_MUTATION_DE: printf ("Mutation Type = PGA_MUTATION_DE\n"); break; case PGA_MUTATION_POLY: printf ("Mutation Type = PGA_MUTATION_POLY\n"); break; }
- Parameters:
ctx – context variable
- Returns:
Returns the integer corresponding to the symbolic constant used to specify the type of mutation specified