Function PGAGetBestReport

Function Documentation

double PGAGetBestReport(PGAContext *ctx, int pop, int idx)

Return the best evaluation value in population pop for the given evaluation index.

Description

The evaluation function index must be 0 < idx <= NumAuxEval. So for single evaluation only the index 0 is allowed and the return is the evaluation as from PGAGetBestIndex(). Note that this accesses the pre-computed statistics and therefore only PGA_OLDPOP is allowed for the population constant.

Example

PGAContext *ctx;
double best;

...
best = PGAGetBestReport (ctx, PGA_OLDPOP, 1);

Parameters
  • ctx – context variable

  • pop – symbolic constant of the population to find the best eval, only PGA_OLDPOP is allowed

  • idx – Index of the evaluation function, 0 for the one return by your evaluation function 1 .. NumAuxEval for the auxiliary evaluations

Returns

Index of the string with the best evaluation function value