Poster of Linux kernelThe best gift for a Linux geek
PGAChange

PGAChange

Section: PGAPack (8) Updated: 05/01/95
Local index Up
 

NAME

PGAChange - Repeatedly apply mutation to a string (with an increasing mutation rate) until one or more mutations have occurred.  

DESCRIPTION

This routine is usually used with PGADuplicate to modify a duplicate string. It is not intended to replace PGAMutation  

INPUT PARAMETERS

ctx
- context variable
p
- string index
pop
- symbolic constant of the population containing string p
 

OUTPUT PARAMETERS

none

 

SYNOPSIS

#include "pgapack.h"
void  PGAChange(ctx, p, pop)
PGAContext *ctx
int p
int pop
 

LOCATION

duplcate.c  

EXAMPLE

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);


 

Index

NAME
DESCRIPTION
INPUT PARAMETERS
OUTPUT PARAMETERS
SYNOPSIS
LOCATION
EXAMPLE

This document was created by man2html, using the manual pages.
Time: 22:02:08 GMT, April 16, 2011