Function PGAGetCrossoverType
Defined in File cross.c
Function Documentation
-
int PGAGetCrossoverType(PGAContext *ctx)
Return the type of crossover selected.
Example
PGAContext *ctx; int crosstype; ... crosstype = PGAGetCrossoverType (ctx); switch (crosstype) { case PGA_CROSSOVER_ONEPT: printf ("Crossover Type = PGA_CROSSOVER_ONEPT\n"); break; case PGA_CROSSOVER_TWOPT: printf ("Crossover Type = PGA_CROSSOVER_TWOPT\n"); break; case PGA_CROSSOVER_UNIFORM: printf ("Crossover Type = PGA_CROSSOVER_UNIFORM\n"); break; case PGA_CROSSOVER_SBX: printf ("Crossover Type = PGA_CROSSOVER_SBX\n"); break; case PGA_CROSSOVER_EDGE: printf ("Crossover Type = PGA_CROSSOVER_EDGE\n"); break; }
- Parameters:
ctx – context variable
- Returns:
Return the integer corresponding to the symbolic constant used to specify the crossover type.