PGAGetSelectType3
Returns the type of selection selected
Usage
#include "pgapack.h" int PGAGetSelectType(ctx) PGAContext *ctx
Input parameters
- ctx
-
- context variable
Output parameters
- none
Location
select.c
Examples
Example:
PGAContext *ctx;
int selecttype;
:
selecttype = PGAGetSelectType(ctx);
switch (selecttype) {
case PGA_SELECT_PROPORTIONAL:
printf("Selection Type = PGA_SELECT_PROPORTIONAL0);
break;
case PGA_SELECT_SUS:
printf("Selection Type = PGA_SELECT_SUS0);
break;
case PGA_SELECT_TOURNAMENT:
printf("Selection Type = PGA_SELECT_TOURNAMENT0);
break;
case PGA_SELECT_PTOURNAMENT:
printf("Selection Type = PGA_SELECT_PTOURNAMENT0);
break;
}
Releases
Unchanged in 12 releases since Debian 1.1 (Buzz).