Function PGAGetOptDirFlag

Function Documentation

int PGAGetOptDirFlag(PGAContext *ctx)

Return a symbolic constant that represents the direction of optimization.

Example

PGAContext *ctx;
int optdir;

...
optdir = PGAGetOptDirFlag (ctx);
switch (optdir) {
case PGA_MAXIMIZE:
    printf ("Optimization direction = PGA_MAXIMIZE\n");
    break;
case PGA_MINIMIZE:
    printf ("Optimization direction = PGA_MINIMIZE\n");
    break;
}

Parameters
  • ctx – context variable

Returns

The integer corresponding to the symbolic constant used to specify the direction of optimization