Function PGAGetDEVariant

Function Documentation

int PGAGetDEVariant(PGAContext *ctx)

Return the variant of Differential Evolution.

Example

PGAContext *ctx;
int variant;

...
variant = PGAGetDEVariant (ctx);
switch (variant) {
case PGA_DE_VARIANT_RAND:
    printf ("DE Variant = PGA_DE_VARIANT_RAND\n");
    break;
case PGA_DE_VARIANT_BEST:
    printf ("DE Variant = PGA_DE_VARIANT_BEST\n");
    break;
case PGA_DE_VARIANT_EITHER_OR:
    printf ("DE Variant = PGA_DE_VARIANT_EITHER_OR\n");
    break;
}

Parameters
  • ctx – context variable

Returns

Returns the integer corresponding to the symbolic constant used to specify the variant of differential evolution