Function PGACreateIndividual

Function Documentation

static void PGACreateIndividual(PGAContext *ctx, int p, int pop, int initflag)

Initialize to zero various data structures of an individual and call the appropriate function to create and initialize the string for the specific data type.

Example

PGAContext *ctx;
int p;

...
PGACreateIndividual (ctx, p, PGA_NEWPOP, PGA_TRUE);

Parameters
  • ctx – Context variable

  • p – String index

  • pop – Symbolic constant of the population string p is in

  • initflag – If the value is PGA_TRUE, the string is randomly initialized, otherwise it is set to zero

Returns

None