Function PGASetPrintOptions

Function Documentation

void PGASetPrintOptions(PGAContext *ctx, int option)

Set flags to indicate what GA statistics should be printed whenever output is printed.

Description

May be called more than once to specify different report options. Valid choices are PGA_REPORT_AVERAGE, PGA_REPORT_OFFLINE, PGA_REPORT_ONLINE, PGA_REPORT_WORST, PGA_REPORT_GENE_DISTANCE, and PGA_REPORT_STRING to specify offline analysis, online analysis, the worst string in the population, the mean genetic distance of the population, and the actual allele values of the best string. The best string is always printed. Note that reporting of mean genetic distance is quadratic in the population size and probably should be used only when trying to diagnose premature convergence problems. See Constants for Reporting for the constants and section Report Options in the user guide for details.

Example

PGAContext *ctx;

...
PGASetPrintOptions (ctx, PGA_REPORT_WORST);

Parameters
  • ctx – context variable

  • option – symbolic constant to specify a print option

Returns

None