.TH PGASetRealInitPercent 2 "05/01/95" " " "PGAPack" .SH NAME PGASetRealInitPercent \- sets the upper and lower bounds for randomly initializing real-valued genes. .SH DESCRIPTION For each gene these bounds define an interval from which the initial allele value is selected uniformly randomly. With this routine the user specifies a median value and a percent offset for each allele. .SH INPUT PARAMETERS .PD 0 .TP ctx - context variable .PD 0 .TP median - an array containing the mean value of the interval .PD 0 .TP percent - an array containing the percent offset to add and subtract to the median to define the interval .PD 1 .SH OUTPUT PARAMETERS .PD 0 .TP none .PD 1 .SH SYNOPSIS .nf #include "pgapack.h" void PGASetRealInitPercent(ctx, median, percent) PGAContext *ctx double *median double *percent .fi .SH LOCATION real.c .SH EXAMPLE .nf Set the initialization routines to select a value for each real-valued gene i uniformly randomly from the interval [i-v,i+v], where $v = i/2$. Assumes all strings are the same length. PGAContext *ctx; double *median, *percent; int i, stringlen; : stringlen = PGAGetStringLength(ctx); median = (double *) malloc(stringlen*sizeof(double)); percent = (double *) malloc(stringlen*sizeof(double)); for(i=0;i