PGAChange(3)

PGAChange3

Repeatedly apply mutation to a string (with an increasing mutation rate) until one or more mutations have occurred. this routine is usually used with pgaduplicate to modify a duplicate string. it is not intended to replace pgamutation

Usage

void PGAChange(ctx, p, pop)

PGAContext *ctx

int p

int pop

Input parameters

ctx

- context variable

p

- string index

pop

- symbolic constant of the population containing string p

Output parameters

none

Location

duplcate.c

Examples

Example:
Change any string in PGA_NEWPOP that is an exact copy of a string
in PGA_OLDPOP.  To be complete, we should check the population again
if any changes are made; for simplicity, we don't.
PGAContext *ctx;
int b, n;
:
n  = PGAGetPopsize(ctx);
for (b=0; b<n; b++)
if (PGADuplicate(ctx, b, PGA_NEWPOP, PGA_OLDPOP, n))
PGAChange(ctx, b, PGA_NEWPOP);

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.