Function _PGAGetEvaluation

Function Documentation

double _PGAGetEvaluation(PGAContext *ctx, int p, int pop, const double **aux)

Return the evaluation function value for string p in population pop and optionally a pointer to the auxiliary evaluations.

Description

This uses a trick for implementing optional arguments in C. The real function to use is without leading underscore. There is a macro that makes the last argument optional.

Example

PGAContext *ctx;
int p;
double eval;

...
eval = PGAGetEvaluation (ctx, p, PGA_NEWPOP);

or

const double *p;
...
eval = PGAGetEvaluation (ctx, p, PGA_NEWPOP, &p);

Parameters
  • ctx – context variable

  • p – string index

  • pop – symbolic constant of the population the string is in

  • aux – Pointer to Auxiliary evaluations

Returns

The evaluation function value for string p in population pop