Function _PGASetEvaluation
Defined in File evaluate.c
Function Documentation
-
void _PGASetEvaluation(PGAContext *ctx, int p, int pop, double val, const double *aux)
Set the evaluation function value for a string to a specified value.
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. Also sets the evaluation up to date flag to
PGA_TRUE
.Example
Set the evaluation function value of string
p
in populationPGA_NEWPOP
to 123.456.PGAContext *ctx; int p; double aux [...]; ... PGASetEvaluation (ctx, p, PGA_NEWPOP, 123.456);
or
PGASetEvaluation (ctx, p, PGA_NEWPOP, 123.456, aux);
- Parameters
ctx – context variable
p – string index
pop – symbolic constant of the population string p is in
val – the (user) evaluation value to assign to string p
aux – Auxiliary evaluations
- Returns
Sets the evaluation function value of string p and the EvalUpToDate flag via side effect