PGASetUserFunction(3)

PGASetUserFunction3

Specifies the name of a user-written function call to provide a specific ga capability (e.g., crossover, mutation, etc.). this function must be used when using a non-native datatype and must be called once for each of: pga_userfunction_createstring -- string creation pga_userfunction_mutation -- mutation pga_userfunction_crossover -- crossover pga_userfunction_printstring -- string output pga_userfunction_copystring -- duplication pga_userfunction_duplicate -- duplicate checking pga_userfunction_initstring -- initialization pga_userfunction_builddatatype -- mpi datatype creation pga_userfunction_stopcond -- stopping conditions pga_userfunction_endofgen -- auxiliary functions at the end of each generation it may be called when using a native datatype to replace the built-in functions pgapack has for that datatype (for example, if the integer data type is used for a traveling salesperson problem, the user may want to provide their own custom crossover operator). see the user guide and the examples in the examples directory for more details.

Usage

PGAContext *ctx

int constant

void *f

Input parameters

ctx

- context variable

constant

- symbolic constant of the user function to set

f

- name of the function to use

Output parameters

none

Location

user.c

Examples

Example:
void MyStringInit(PGAContext *, void *);
PGAContext *ctx;
:
PGASetUserFunction(ctx, PGA_USERFUNCTION_INITSTRING, MyStringInit);

Releases

8 releases since Debian 1.1 (Buzz); the text changed 1 time.

  1. 1.1
  2. 1.2–3.1

From pgapack 1.0.0.1-3 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.