Function PGACharacterCopyString

Function Documentation

void PGACharacterCopyString(PGAContext *ctx, int p1, int pop1, int p2, int pop2)

Copy one character-valued string to another, assumes the strings are of the same length.

Description

Note that this function is set in PGASetUp() as the copy string user function for the char datatype by default.

Example

Copy character string x to y (both are implicitly assumed to be the same length)

PGAContext *ctx;
int x, y;

...
PGACharacterCopyString (ctx, x, PGA_OLDPOP, y, PGA_NEWPOP);

Parameters
  • ctx – context variable

  • p1 – string to copy

  • pop1 – symbolic constant of population containing string p1

  • p2 – string to copy p1 to

  • pop2 – symbolic constant of population containing string p2

Returns

None